Module: deluge
Branch: 1.3-stable
Commit: e7907a63eeb480927f720431f2f9eaebfec6a02a

Author: Damien Churchill <[email protected]>
Date:   Wed May  5 12:25:34 2010 +0100

fix uploading plugins in shit browsers

---

 .../deluge-all/preferences/InstallPluginWindow.js  |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/preferences/InstallPluginWindow.js 
b/deluge/ui/web/js/deluge-all/preferences/InstallPluginWindow.js
index 7c1b8fe..abc1614 100644
--- a/deluge/ui/web/js/deluge-all/preferences/InstallPluginWindow.js
+++ b/deluge/ui/web/js/deluge-all/preferences/InstallPluginWindow.js
@@ -61,7 +61,7 @@ Deluge.preferences.InstallPluginWindow = 
Ext.extend(Ext.Window, {
                        fileUpload: true,
                        items: [{
                                xtype: 'fileuploadfield',
-                               id: 'pluginEgg',
+                               width: 240,
                                emptyText: _('Select an egg'),
                                fieldLabel: _('Plugin Egg'),
                                name: 'file',
@@ -88,9 +88,10 @@ Deluge.preferences.InstallPluginWindow = 
Ext.extend(Ext.Window, {
        onUploadSuccess: function(fp, upload) {
                this.hide();
                if (upload.result.success) {
-                       var filename = 
this.form.getForm().findField('pluginEgg').value;
-                       var path = upload.result.files[0]
-                       this.form.getForm().findField('pluginEgg').setValue('');
+                       var filename = 
this.form.getForm().getFieldValues().file;
+                       filename = filename.split('\\').slice(-1)[0]
+                       var path = upload.result.files[0];
+                       this.form.getForm().setValues({file: ''});
                        deluge.client.web.upload_plugin(filename, path, {
                                success: this.onUploadPlugin,
                                scope: this,

-- 
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.

Reply via email to