mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-12 18:36:29 +00:00
Empty commit
This commit is contained in:
parent
411a012015
commit
8bd65bfe06
@ -1,5 +1,8 @@
|
||||
CHANGE LOG
|
||||
|
||||
2015-11-14 by techietrash
|
||||
Fix ctrl+click group collapsing/expanding on OSX
|
||||
|
||||
2015-11-06 by newman
|
||||
Add proper title to torrent stats page. Update token history to display deleted torrents.
|
||||
|
||||
|
@ -20,7 +20,9 @@
|
||||
}
|
||||
|
||||
if (isset($_GET['pp'])) {
|
||||
$PerPage = $_GET['pp'];
|
||||
|
||||
$PerPage = $_GET['pp'];
|
||||
|
||||
} elseif (isset($LoggedUser['PostsPerPage'])) {
|
||||
$PerPage = $LoggedUser['PostsPerPage'];
|
||||
} else {
|
||||
|
@ -387,7 +387,7 @@ function compare($X, $Y) {
|
||||
<tr class="releases_<?=$ReleaseType?> group discog<?=$SnatchedGroupClass . $HideDiscog?>">
|
||||
<td class="center">
|
||||
<div id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Collapse this group. Hold "Ctrl" while clicking to collapse all groups in this release type."></a>
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all groups in this release type."></a>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="5" class="big_info">
|
||||
@ -442,7 +442,7 @@ function compare($X, $Y) {
|
||||
|
||||
?>
|
||||
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent discog<?=$SnatchedGroupClass . $HideDiscog . $HideTorrents?>">
|
||||
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $TorrentList[$Group['GroupID']])?></strong></td>
|
||||
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $TorrentList[$Group['GroupID']])?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ function compare($X, $Y) {
|
||||
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">
|
||||
<td class="center">
|
||||
<div id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Collapse this group. Hold "Ctrl" while clicking to collape all groups on this page."></a>
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collape all groups on this page."></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
@ -133,7 +133,7 @@ function compare($X, $Y) {
|
||||
$EditionID++;
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] === 1 ? ' hidden' : '')?>">
|
||||
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ function compare($X, $Y) {
|
||||
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">
|
||||
<td class="center">
|
||||
<div id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Collapse this group. Hold "Ctrl" while clicking to collapse all groups on this page."></a>
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all groups on this page."></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
@ -157,7 +157,7 @@ function compare($X, $Y) {
|
||||
$EditionID++;
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
|
||||
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -203,7 +203,7 @@
|
||||
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">
|
||||
<td class="center">
|
||||
<div id="showimg_<?=$GroupID?>" class="show_torrents">
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Expand this group. Hold "Ctrl" while clicking to expand all groups on this page."></a>
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event);" title="Expand this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to expand all groups on this page."></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center cats_col">
|
||||
@ -279,7 +279,7 @@
|
||||
$EditionID++;
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass?> hidden">
|
||||
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
?>
|
||||
<td class="center">
|
||||
<div id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event)" title="Collapse this group. Hold "Ctrl" while clicking to collapse all groups on this page."></a>
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event)" title="Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all groups on this page."></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center cats_col">
|
||||
@ -630,7 +630,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
|
||||
<td colspan="9" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Data, $GroupInfo)?></strong></td>
|
||||
<td colspan="9" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Data, $GroupInfo)?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ function filelist($Str) {
|
||||
|
||||
?>
|
||||
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent">
|
||||
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group." class="tooltip">−</a> <?=Torrents::edition_string($Torrent, $TorrentDetails)?></strong></td>
|
||||
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event);" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group." class="tooltip">−</a> <?=Torrents::edition_string($Torrent, $TorrentDetails)?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ function filelist($Str) {
|
||||
$EditionID++;
|
||||
?>
|
||||
<tr class="releases_<?=($ReleaseType)?> groupid_<?=($GroupID)?> edition group_torrent">
|
||||
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=($GroupID)?>, <?=($EditionID)?>, this, event);" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?= Torrents::edition_string($Torrent, $TorrentDetails) ?></strong></td>
|
||||
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=($GroupID)?>, <?=($EditionID)?>, this, event);" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?= Torrents::edition_string($Torrent, $TorrentDetails) ?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -132,7 +132,7 @@
|
||||
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$CollageID?><?=$GroupID?>">
|
||||
<td class="center">
|
||||
<div id="showimg_<?=$CollageID?><?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$CollageID?><?=$GroupID?>, this, event);" title="Expand this group. Hold "Ctrl" while clicking to expand all groups on this page."></a>
|
||||
<a href="#" class="tooltip show_torrents_link" onclick="toggle_group(<?=$CollageID?><?=$GroupID?>, this, event);" title="Expand this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to expand all groups on this page."></a>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="5" class="big_info">
|
||||
@ -174,7 +174,7 @@
|
||||
$EditionID++;
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition<?=$SnatchedGroupClass?> hidden">
|
||||
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$CollageID?><?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$CollageID?><?=$GroupID?>, <?=$EditionID?>, this, event);" class="tooltip" title="Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.">−</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
@ -86,13 +86,14 @@ function add_tag(tag) {
|
||||
}
|
||||
|
||||
function toggle_group(groupid, link, event) {
|
||||
var showRow = true;
|
||||
var clickedRow = link;
|
||||
while (clickedRow.nodeName != 'TR') {
|
||||
clickedRow = clickedRow.parentNode;
|
||||
}
|
||||
var group_rows = clickedRow.parentNode.children;
|
||||
var showing = $(clickedRow).nextElementSibling().has_class('hidden');
|
||||
var allGroups = event.ctrlKey;
|
||||
var allGroups = (event.ctrlKey || event.metaKey); // detect ctrl or cmd
|
||||
|
||||
// for dealing with Mac OS X
|
||||
// http://stackoverflow.com/a/3922353
|
||||
@ -101,7 +102,8 @@ function toggle_group(groupid, link, event) {
|
||||
|| event.keyCode == 93 // WebKit (right apple)
|
||||
|| event.keyCode == 224 // Firefox
|
||||
|| event.keyCode == 17 // Opera
|
||||
) ? 91 : null;
|
||||
) ? true : null;
|
||||
|
||||
|
||||
for (var i = 0; i < group_rows.length; i++) {
|
||||
var row = $(group_rows[i]);
|
||||
@ -111,6 +113,9 @@ function toggle_group(groupid, link, event) {
|
||||
if (row.has_class('colhead')) {
|
||||
continue;
|
||||
}
|
||||
if (row.has_class('torrent')) {
|
||||
continue; // Prevents non-grouped torrents from disappearing when collapsing all groups
|
||||
}
|
||||
var relevantRow = row.has_class('group') ? $(group_rows[i + 1]) : row;
|
||||
if (allGroups || allGroupsMac || relevantRow.has_class('groupid_' + groupid)) {
|
||||
row = $(group_rows[i]); // idk why we need this :S
|
||||
@ -122,8 +127,8 @@ function toggle_group(groupid, link, event) {
|
||||
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;
|
||||
? 'Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all groups '+section
|
||||
: 'Expand this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> 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 {
|
||||
@ -160,19 +165,28 @@ function toggle_edition(groupid, editionid, lnk, event) {
|
||||
}
|
||||
//var showing = has_class(nextElementSibling(clickedRow), 'hidden');
|
||||
var showing = $(clickedRow).nextElementSibling().has_class('hidden');
|
||||
var allEditions = event.ctrlKey;
|
||||
var allEditions = (event.ctrlKey || event.metaKey); // detect ctrl and cmd
|
||||
// for dealing with Mac OS X
|
||||
// http://stackoverflow.com/a/3922353
|
||||
var allEditionsMac = (
|
||||
event.keyCode == 91 // WebKit (left apple)
|
||||
|| event.keyCode == 93 // WebKit (right apple)
|
||||
|| event.keyCode == 224 // Firefox
|
||||
|| event.keyCode == 17 // Opera
|
||||
) ? true : null;
|
||||
|
||||
var group_rows = $('tr.groupid_' + groupid);
|
||||
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)) {
|
||||
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.';
|
||||
? 'Collapse this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all editions in this torrent group.'
|
||||
: 'Expand this edition. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> 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)) {
|
||||
if (allEditions || allEditionsMac || row.has_class('edition_' + editionid)) {
|
||||
if (showing && !row.has_class('torrentdetails')) {
|
||||
row.gshow();
|
||||
} else {
|
||||
@ -282,4 +296,4 @@ function ToggleEditionRows() {
|
||||
$('#edition_title').gtoggle();
|
||||
$('#edition_label').gtoggle();
|
||||
$('#edition_catalogue').gtoggle();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user