diff options
author | Git <git@what.cd> | 2013-08-28 23:08:41 +0000 |
---|---|---|
committer | Git <git@what.cd> | 2013-08-28 23:08:41 +0000 |
commit | 3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663 (patch) | |
tree | 0dfbaae1ba2bc758afcdf45dacb3471552f9849c /static/functions/browse.js | |
parent | db7ddd03782cae2be19499450d3948c5950e43fa (diff) | |
download | Gazelle-3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663.zip Gazelle-3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663.tar.gz Gazelle-3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663.tar.bz2 |
Empty commit
Diffstat (limited to 'static/functions/browse.js')
-rw-r--r-- | static/functions/browse.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/static/functions/browse.js b/static/functions/browse.js index 2dfddf3..e94e643 100644 --- a/static/functions/browse.js +++ b/static/functions/browse.js @@ -105,8 +105,17 @@ function toggle_group(groupid, link, event) { if (allGroups || relevantRow.has_class('groupid_' + groupid)) { row = $(group_rows[i]); // idk why we need this :S if (row.has_class('group')) { - $('a.show_torrents_link', row.raw()).raw().title = (showing) ? 'Collapse this group. Hold "Ctrl" while clicking to collapse all groups/editions in this section.' : 'Expand this group. Hold "Ctrl" while clicking to expand all groups/editions in this section.'; - $('a.show_torrents_link', row.raw()).raw().parentNode.className = (showing) ? 'hide_torrents' : 'show_torrents'; + var section; + if (location.pathname.search('/artist.php$') !== -1) { + section = 'in this release type.'; + } else { + section = 'on this page.'; + } + var tooltip = showing + ? 'Collapse this group. Hold "Ctrl" while clicking to collapse all groups '+section + : 'Expand this group. Hold "Ctrl" while clicking to expand all groups '+section; + $('a.show_torrents_link', row).updateTooltip(tooltip); + $('a.show_torrents_link', row).raw().parentNode.className = (showing) ? 'hide_torrents' : 'show_torrents'; } else { if (showing) { // show the row depending on whether the edition it's in is collapsed or not @@ -145,8 +154,11 @@ function toggle_edition(groupid, editionid, lnk, event) { for (var i = 0; i < group_rows.results(); i++) { var row = $(group_rows.raw(i)); if (row.has_class('edition') && (allEditions || row.raw(0) == clickedRow)) { - $('a', row.raw()).raw().innerHTML = (showing) ? '−' : '+'; - $('a', row.raw()).raw().title = (showing) ? 'Collapse this edition. Hold "Ctrl" to collapse all editions in this torrent group.' : 'Expand this edition. Hold "Ctrl" to expand all editions in this torrent group.'; + var tooltip = showing + ? 'Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.' + : 'Expand this edition. Hold "Ctrl" while clicking to expand all editions in this torrent group.'; + $('a', row).raw().innerHTML = (showing) ? '−' : '+'; + $('a', row).updateTooltip(tooltip); continue; } if (allEditions || row.has_class('edition_' + editionid)) { |