mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 10:56:26 +00:00
26 lines
781 B
JavaScript
26 lines
781 B
JavaScript
function clearItem(torrentId) {
|
|
ajax.get("?action=notify_clear_item&torrentid=" + torrentId + "&auth=" + authkey, function() {
|
|
$("#torrent" + torrentId).remove();
|
|
});
|
|
}
|
|
|
|
function clearSelected(filterId) {
|
|
var checkBoxes, checkedBoxes = [];
|
|
if (filterId) {
|
|
var filterForm = $('#notificationform_' + filterId);
|
|
checkBoxes = $('.notify_box_' + filterId, filterForm);
|
|
} else {
|
|
checkBoxes = $('.notify_box');
|
|
}
|
|
for (var i = checkBoxes.length - 1; i >= 0; i--) {
|
|
if (checkBoxes[i].checked) {
|
|
checkedBoxes.push(checkBoxes[i].value);
|
|
}
|
|
}
|
|
ajax.get("?action=notify_clear_items&torrentids=" + checkedBoxes.join(',') + "&auth=" + authkey, function() {
|
|
for (var i = checkedBoxes.length - 1; i >= 0; i--) {
|
|
$('#torrent' + checkedBoxes[i]).remove();
|
|
}
|
|
});
|
|
}
|