summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-10-21 14:59:56 +0200
committerChristophe Simonis <chs@odoo.com>2014-10-21 14:59:56 +0200
commita42167d085e8c4989412c39ec4e21685ebd93cd2 (patch)
treefc8cf942fe689de94aec631d5b8d7365693de5d0 /addons/website/static/src/js/website.editor.js
parentd822766296fed8f72d3168c675d4cf0b89e73f0c (diff)
parent262eb662de489d98b76dece7305b594399161014 (diff)
[MERGE] forward port of branch 8.0 up to 262eb66
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 4dda0ffbd35..6eb75694d03 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -1484,11 +1484,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',