Module: deluge Branch: master Commit: e2840148afa589453a54721e73108ef2c6aabf68
Author: Damien Churchill <[email protected]> Date: Sun Mar 14 00:44:04 2010 +0000 remove a torrent from the grid as well as displaying an error message --- deluge/ui/web/js/deluge-all/Deluge.Add.js | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/Deluge.Add.js b/deluge/ui/web/js/deluge-all/Deluge.Add.js index 14d4fe0..2f15573 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.Add.js +++ b/deluge/ui/web/js/deluge-all/Deluge.Add.js @@ -535,6 +535,7 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, { }, onTorrentAdd: function(torrentId, info) { + var r = this.grid.getStore().getById(torrentId); if (!info) { Ext.MessageBox.show({ title: _('Error'), @@ -544,14 +545,13 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, { icon: Ext.MessageBox.ERROR, iconCls: 'x-deluge-icon-error' }); - return; + this.grid.getStore().remove(r); + } else { + r.set('info_hash', info['info_hash']); + r.set('text', info['name']); + this.grid.getStore().commitChanges(); + this.optionsPanel.addTorrent(info); } - - var r = this.grid.getStore().getById(torrentId); - r.set('info_hash', info['info_hash']); - r.set('text', info['name']); - this.grid.getStore().commitChanges(); - this.optionsPanel.addTorrent(info); }, onUrl: function(button, event) { -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
