diff options
| author | Christophe Matthieu <chm@odoo.com> | 2019-02-14 15:46:27 +0000 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2019-02-18 09:45:38 +0000 |
| commit | b7818fe036d84ccb67828edafa47a5194cb91d4c (patch) | |
| tree | 69d7aad8c57a8d33789945606181cb9483f40063 /addons/website/static/src | |
| parent | e096dc9b6685b369d036b0a524ba006733263581 (diff) | |
[FIX] website: don't not edit not editable contents or branded hr, br...
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/editor/editor_menu.js | 4 | ||||
| -rw-r--r-- | addons/website/static/src/js/editor/wysiwyg_multizone.js | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/website/static/src/js/editor/editor_menu.js b/addons/website/static/src/js/editor/editor_menu.js index 19cffd3f3aa..0e967b2f679 100644 --- a/addons/website/static/src/js/editor/editor_menu.js +++ b/addons/website/static/src/js/editor/editor_menu.js @@ -136,12 +136,14 @@ var EditorMenu = Widget.extend({ return $wrapwrap.find('[data-oe-model]') .not('.o_not_editable') .filter(function () { - return !$(this).closest('.o_not_editable').length; + var $parent = $(this).closest('.o_editable, .o_not_editable'); + return !$parent.length || $parent.hasClass('o_editable'); }) .not('link, script') .not('[data-oe-readonly]') .not('img[data-oe-field="arch"], br[data-oe-field="arch"], input[data-oe-field="arch"]') .not('.oe_snippet_editor') + .not('hr, br, input, textarea') .add('.o_editable'); }, diff --git a/addons/website/static/src/js/editor/wysiwyg_multizone.js b/addons/website/static/src/js/editor/wysiwyg_multizone.js index 1d264eff436..00098cd5b54 100644 --- a/addons/website/static/src/js/editor/wysiwyg_multizone.js +++ b/addons/website/static/src/js/editor/wysiwyg_multizone.js @@ -199,7 +199,6 @@ var WysiwygMultizone = Wysiwyg.extend({ self.$('[data-oe-readonly]').addClass('o_not_editable').attr('contenteditable', false); self.$('.oe_structure').attr('contenteditable', false).addClass('o_fake_not_editable'); self.$('[data-oe-field][data-oe-type="image"]').attr('contenteditable', false).addClass('o_fake_not_editable'); - self.$('[data-oe-field]:not([contenteditable])').attr('contenteditable', true).addClass('o_fake_editable'); }); }, /** |
