WebUI: Implement start torrents by category

This commit is contained in:
buinsky 2016-01-22 08:43:07 +03:00
parent 24584503d9
commit f7833c9f0c
4 changed files with 31 additions and 0 deletions

View file

@ -385,6 +385,22 @@ initializeWindows = function() {
setCategoryFilter(CATEGORIES_ALL);
};
startTorrentsByCategoryFN = function (categoryHash) {
var h = torrentsTable.getFilteredTorrentsHashes('all', categoryHash);
if (h.length) {
h.each(function (hash, index) {
new Request({
url: 'command/resume',
method: 'post',
data: {
hash: hash
}
}).send();
});
updateMainData();
}
};
['pauseAll', 'resumeAll'].each(function(item) {
addClickEvent(item, function(e) {
new Event(e).stop();