mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-13 08:17:57 +00:00
WebUI: Implement delete torrents by category
This commit is contained in:
parent
2c24c0bfbf
commit
ead592647a
@ -131,6 +131,7 @@
|
||||
<li><a href="#DeleteUnusedCategories"><img src="theme/list-remove" alt="QBT_TR(Remove unused categories)QBT_TR"/> QBT_TR(Remove unused categories)QBT_TR</a></li>
|
||||
<li class="separator"><a href="#StartTorrentsByCategory"><img src="theme/media-playback-start" alt="QBT_TR(Resume torrents)QBT_TR"/> QBT_TR(Resume torrents)QBT_TR</a></li>
|
||||
<li><a href="#PauseTorrentsByCategory"><img src="theme/media-playback-pause" alt="QBT_TR(Pause torrents)QBT_TR"/> QBT_TR(Pause torrents)QBT_TR</a></li>
|
||||
<li><a href="#DeleteTorrentsByCategory"><img src="theme/edit-delete" alt="QBT_TR(Delete torrents)QBT_TR"/> QBT_TR(Delete torrents)QBT_TR</a></li>
|
||||
</ul>
|
||||
<div id="desktopFooterWrapper">
|
||||
<div id="desktopFooter">
|
||||
|
@ -34,6 +34,9 @@
|
||||
},
|
||||
PauseTorrentsByCategory : function (element, ref) {
|
||||
pauseTorrentsByCategoryFN(element.id);
|
||||
},
|
||||
DeleteTorrentsByCategory : function (element, ref) {
|
||||
deleteTorrentsByCategoryFN(element.id);
|
||||
}
|
||||
},
|
||||
offsets : {
|
||||
|
@ -417,6 +417,25 @@ initializeWindows = function() {
|
||||
}
|
||||
};
|
||||
|
||||
deleteTorrentsByCategoryFN = function (categoryHash) {
|
||||
var h = torrentsTable.getFilteredTorrentsHashes('all', categoryHash);
|
||||
if (h.length) {
|
||||
new MochaUI.Window({
|
||||
id: 'confirmDeletionPage',
|
||||
title: "QBT_TR(Deletion confirmation)QBT_TR",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'confirmdeletion.html?hashes=' + h.join("|"),
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
padding: 10,
|
||||
width: 424,
|
||||
height: 140
|
||||
});
|
||||
updateMainData();
|
||||
}
|
||||
};
|
||||
|
||||
['pauseAll', 'resumeAll'].each(function(item) {
|
||||
addClickEvent(item, function(e) {
|
||||
new Event(e).stop();
|
||||
|
Loading…
Reference in New Issue
Block a user