web: fix the toolbar actions

Use the proper method for getting the torrent ids instead of the
implementation within the toolbar. Using the one on the torrent
grid will be more likely to work.
This commit is contained in:
Damien Churchill 2011-10-04 18:34:14 +01:00
commit 713953ec03

View file

@ -157,11 +157,7 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
},
onTorrentAction: function(item) {
var selection = deluge.torrents.getSelections();
var ids = [];
Ext.each(selection, function(record) {
ids.push(record.id);
});
var ids = deluge.torrents.getSelectedIds();
switch (item.id) {
case 'remove':