mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
21fe4e5534
commit
c9a8095b5a
@ -228,7 +228,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
<form class="manage_form" name="torrents" id="notificationform_<?=$FilterID?>" action="">
|
||||
<table class="torrent_table cats checkboxes border">
|
||||
<tr class="colhead">
|
||||
<td style="text-align: center;"><input type="checkbox" name="toggle" onclick="toggleBoxes(<?=$FilterID?>, this.checked)" /></td>
|
||||
<td style="text-align: center;"><input type="checkbox" name="toggle" onclick="toggleChecks('notificationform_<?=$FilterID?>', this, '.notify_box')" /></td>
|
||||
<td class="small cats_col"></td>
|
||||
<td style="width: 100%;">Name<?=$TorrentCount <= NOTIFICATIONS_MAX_SLOWSORT ? ' / <a href="'.header_link('year').'">Year</a>' : ''?></td>
|
||||
<td>Files</td>
|
||||
|
@ -1,13 +1,16 @@
|
||||
function toggleChecks(formElem,masterElem) {
|
||||
if (masterElem.checked) {
|
||||
checked = true;
|
||||
/**
|
||||
* Check or uncheck checkboxes in formElem
|
||||
* If masterElem is false, toggle each box, otherwise use masterElem's status on all boxes
|
||||
* If elemSelector is false, act on all checkboxes in formElem
|
||||
*/
|
||||
function toggleChecks(formElem, masterElem, elemSelector) {
|
||||
elemSelector = elemSelector || 'input:checkbox';
|
||||
if (masterElem) {
|
||||
$('#'+formElem+' '+elemSelector).prop('checked', masterElem.checked);
|
||||
} else {
|
||||
checked = false;
|
||||
}
|
||||
for (s = 0; s < $('#'+formElem).raw().elements.length; s++) {
|
||||
if ($('#'+formElem).raw().elements[s].type == "checkbox") {
|
||||
$('#'+formElem).raw().elements[s].checked=checked;
|
||||
}
|
||||
$('#'+formElem+' '+elemSelector).each(function() {
|
||||
this.checked = !this.checked;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,28 +23,3 @@ function clearSelected(filterId) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleBoxes(filterId, value) {
|
||||
var filterForm = $('#notificationform_' + filterId);
|
||||
var checkBoxes = $('.notify_box_' + filterId, filterForm);
|
||||
for (var i = checkBoxes.length - 1; i >= 0; i--) {
|
||||
$(checkBoxes[i]).prop('checked', value);
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove these */
|
||||
function GroupClear(form) {
|
||||
for (var i = 0; i < form.elements.length; i++ ) {
|
||||
if (form.elements[i].type == 'checkbox' && form.elements[i].name != 'toggle') {
|
||||
if (form.elements[i].checked == true) {
|
||||
Clear(form.elements[i].value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SuperGroupClear() {
|
||||
for (var i = 0; i < document.forms.length; i++ ) {
|
||||
GroupClear(document.forms[i]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user