Module: deluge Branch: master Commit: 81d28b686f0ae2966f8d07b9c9588c1ea2b2d7d5
Author: Damien Churchill <[email protected]> Date: Sun Mar 14 08:46:21 2010 +0000 add a failure callback when uploading a torrent file --- deluge/ui/web/js/deluge-all/Deluge.Add.File.js | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/Deluge.Add.File.js b/deluge/ui/web/js/deluge-all/Deluge.Add.File.js index 31bf844..bbbf700 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.Add.File.js +++ b/deluge/ui/web/js/deluge-all/Deluge.Add.File.js @@ -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(); -- 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.
