mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-19 22:58:30 +00:00
fix uploading plugins in shit browsers
This commit is contained in:
parent
cee416b1b5
commit
e7907a63ee
@ -61,7 +61,7 @@ Deluge.preferences.InstallPluginWindow = Ext.extend(Ext.Window, {
|
|||||||
fileUpload: true,
|
fileUpload: true,
|
||||||
items: [{
|
items: [{
|
||||||
xtype: 'fileuploadfield',
|
xtype: 'fileuploadfield',
|
||||||
id: 'pluginEgg',
|
width: 240,
|
||||||
emptyText: _('Select an egg'),
|
emptyText: _('Select an egg'),
|
||||||
fieldLabel: _('Plugin Egg'),
|
fieldLabel: _('Plugin Egg'),
|
||||||
name: 'file',
|
name: 'file',
|
||||||
@ -88,9 +88,10 @@ Deluge.preferences.InstallPluginWindow = Ext.extend(Ext.Window, {
|
|||||||
onUploadSuccess: function(fp, upload) {
|
onUploadSuccess: function(fp, upload) {
|
||||||
this.hide();
|
this.hide();
|
||||||
if (upload.result.success) {
|
if (upload.result.success) {
|
||||||
var filename = this.form.getForm().findField('pluginEgg').value;
|
var filename = this.form.getForm().getFieldValues().file;
|
||||||
var path = upload.result.files[0]
|
filename = filename.split('\\').slice(-1)[0]
|
||||||
this.form.getForm().findField('pluginEgg').setValue('');
|
var path = upload.result.files[0];
|
||||||
|
this.form.getForm().setValues({file: ''});
|
||||||
deluge.client.web.upload_plugin(filename, path, {
|
deluge.client.web.upload_plugin(filename, path, {
|
||||||
success: this.onUploadPlugin,
|
success: this.onUploadPlugin,
|
||||||
scope: this,
|
scope: this,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user