mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
fix the remove torrent dialog
This commit is contained in:
parent
037871e1b3
commit
034606b203
3 changed files with 19 additions and 15 deletions
|
@ -52,7 +52,7 @@
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
items: [
|
items: [
|
||||||
{boxLabel: _('Compact'), value: 'true'},
|
{boxLabel: _('Compact'), value: 'true'},
|
||||||
{boxLabel: _('Full'), value: 'false'}
|
{boxLabel: _('Full'), value: 'false',style: 'margin-right: 10px;'}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,19 @@ Ext.deluge.RemoveWindow = Ext.extend(Ext.Window, {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
remove: function(removeData) {
|
||||||
|
Ext.each(this.torrentIds, function(torrentId) {
|
||||||
|
Deluge.Client.core.remove_torrent(torrentId, removeData, {
|
||||||
|
success: function() {
|
||||||
|
this.onRemoved(torrentId);
|
||||||
|
},
|
||||||
|
scope: this,
|
||||||
|
torrentId: torrentId
|
||||||
|
});
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
show: function(ids) {
|
show: function(ids) {
|
||||||
Ext.deluge.RemoveWindow.superclass.show.call(this);
|
Ext.deluge.RemoveWindow.superclass.show.call(this);
|
||||||
this.torrentIds = ids;
|
this.torrentIds = ids;
|
||||||
|
@ -69,28 +82,19 @@ Ext.deluge.RemoveWindow = Ext.extend(Ext.Window, {
|
||||||
onCancel: function() {
|
onCancel: function() {
|
||||||
this.hide();
|
this.hide();
|
||||||
this.torrentIds = null;
|
this.torrentIds = null;
|
||||||
this.chkgrp.setValue([false, false]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onRemove: function() {
|
onRemove: function() {
|
||||||
Deluge.Client.core.remove_torrent(this.torrentIds, false, {
|
this.remove(false);
|
||||||
success: this.onRemoved,
|
|
||||||
scope: this
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onRemoveData: function() {
|
onRemoveData: function() {
|
||||||
Deluge.Client.core.remove_torrent(this.torrentIds, true, {
|
this.remove(true);
|
||||||
success: this.onRemoved,
|
|
||||||
scope: this
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onRemoved: function() {
|
onRemoved: function(torrentId) {
|
||||||
Deluge.Events.fire('torrentRemoved', this.torrentIds);
|
Deluge.Events.fire('torrentRemoved', torrentId);
|
||||||
this.torrentIds = null;
|
|
||||||
this.hide();
|
this.hide();
|
||||||
this.chkgrp.setValue([false, false]);
|
|
||||||
Deluge.UI.update();
|
Deluge.UI.update();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue