diff options
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index fc35b025403..48d8d139aed 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -413,7 +413,6 @@ this.$('#website-top-edit').hide(); this.$('#website-top-view').show(); - this.$buttons.edit.show(); var $edit_button = this.$buttons.edit .prop('disabled', website.no_editor); @@ -855,6 +854,7 @@ var def = $.Deferred(); var editor = this.editor = CKEDITOR.inline(root, self._config()); editor.on('instanceReady', function () { + $("[data-oe-type=selection]").attr("contenteditable",false); editor.setReadOnly(false); // ckeditor set root to editable, disable it (only inner // sections are editable) @@ -924,15 +924,9 @@ fetch_editables: function (root) { return $(root).find('[data-oe-model]') + .not('[data-oe-type = "selection"]') .not('link, script') - .not('.oe_snippet_editor') - .filter(function () { - var $this = $(this); - // keep view sections and fields which are *not* in - // view sections for top-level editables - return $this.data('oe-model') === 'ir.ui.view' - || !$this.closest('[data-oe-model = "ir.ui.view"]').length; - }); + .not('.oe_snippet_editor'); }, _current_editor: function () { @@ -1492,6 +1486,10 @@ 'click button.filepicker': function () { this.$('input[type=file]').click(); }, + 'click .js_disable_optimization': function () { + this.$('input[name="disable_optimization"]').val('1'); + this.$('button.filepicker').click(); + }, 'change input[type=file]': 'file_selection', 'submit form': 'form_submit', 'change input.url': "change_input", |
