diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-10-01 19:18:14 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-10-01 19:18:14 +0200 |
| commit | 709c9868de7c4ac4985ed4e0055ae3e3e49742ad (patch) | |
| tree | e90227a947bddf47b3043fcbe8b99529a22aa7dd /addons/website/static/src/js/website.editor.js | |
| parent | 85f26244a71a0b9a7faa283d6d24fdde6bae899a (diff) | |
| parent | e8831932464814ed5f9e3a0af33f98891a466417 (diff) | |
[MERGE] forward port of branch 8.0 up to e883193
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", |
