mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
add a failure callback when uploading a torrent file
This commit is contained in:
parent
e2840148af
commit
81d28b686f
1 changed files with 5 additions and 0 deletions
|
@ -80,6 +80,7 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
|
||||||
this.form.getForm().submit({
|
this.form.getForm().submit({
|
||||||
url: '/upload',
|
url: '/upload',
|
||||||
waitMsg: _('Uploading your torrent...'),
|
waitMsg: _('Uploading your torrent...'),
|
||||||
|
failure: this.onUploadFailure,
|
||||||
success: this.onUploadSuccess,
|
success: this.onUploadSuccess,
|
||||||
scope: this
|
scope: this
|
||||||
});
|
});
|
||||||
|
@ -93,6 +94,10 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
|
||||||
this.fireEvent('add', this.torrentId, info);
|
this.fireEvent('add', this.torrentId, info);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onUploadFailure: function(form, action) {
|
||||||
|
this.hide();
|
||||||
|
},
|
||||||
|
|
||||||
onUploadSuccess: function(fp, upload) {
|
onUploadSuccess: function(fp, upload) {
|
||||||
this.hide();
|
this.hide();
|
||||||
if (upload.result.success) {
|
if (upload.result.success) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue