mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
implement the handler for the torrent menu
This commit is contained in:
parent
b4404feed7
commit
342001c642
1 changed files with 12 additions and 1 deletions
|
@ -285,7 +285,18 @@ Deluge.plugins.LabelPlugin = Ext.extend(Deluge.Plugin, {
|
|||
},
|
||||
|
||||
onTorrentMenuClick: function(item, e) {
|
||||
alert(item.label);
|
||||
var ids = deluge.torrents.getSelectedIds();
|
||||
Ext.each(ids, function(id, i) {
|
||||
if (ids.length == i +1 ) {
|
||||
deluge.client.label.set_torrent(id, item.label, {
|
||||
success: function() {
|
||||
deluge.ui.update();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
deluge.client.label.set_torrent(id, item.label);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Deluge.registerPlugin('Label', Deluge.plugins.LabelPlugin);
|
||||
|
|
Loading…
Add table
Reference in a new issue