[FIX] website: use dom element instead of jquery class to click input file
For some reasons, the browser will prevent to open the system file browser when clicking the input file with javascript using the jquery class element, but it works when using the standard js dom element.
This commit is contained in:
parent
ba272ad69a
commit
08f222d707
|
@ -1379,11 +1379,17 @@
|
|||
this.changed($(e.target));
|
||||
},
|
||||
'click button.filepicker': function () {
|
||||
this.$('input[type=file]').click();
|
||||
var filepicker = this.$('input[type=file]');
|
||||
if (!_.isEmpty(filepicker)){
|
||||
filepicker[0].click();
|
||||
}
|
||||
},
|
||||
'click .js_disable_optimization': function () {
|
||||
this.$('input[name="disable_optimization"]').val('1');
|
||||
this.$('button.filepicker').click();
|
||||
var filepicker = this.$('button.filepicker');
|
||||
if (!_.isEmpty(filepicker)){
|
||||
filepicker[0].click();
|
||||
}
|
||||
},
|
||||
'change input[type=file]': 'file_selection',
|
||||
'submit form': 'form_submit',
|
||||
|
|
Loading…
Reference in New Issue