add a failure callback when uploading a torrent file
This commit is contained in:
parent
e2840148af
commit
81d28b686f
|
@ -80,6 +80,7 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
this.form.getForm().submit({
|
||||
url: '/upload',
|
||||
waitMsg: _('Uploading your torrent...'),
|
||||
failure: this.onUploadFailure,
|
||||
success: this.onUploadSuccess,
|
||||
scope: this
|
||||
});
|
||||
|
@ -92,6 +93,10 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
info['filename'] = request.options.filename;
|
||||
this.fireEvent('add', this.torrentId, info);
|
||||
},
|
||||
|
||||
onUploadFailure: function(form, action) {
|
||||
this.hide();
|
||||
},
|
||||
|
||||
onUploadSuccess: function(fp, upload) {
|
||||
this.hide();
|
||||
|
|
Loading…
Reference in New Issue