[FIX] website: don't not edit not editable contents or branded hr, br...

This commit is contained in:
Christophe Matthieu
2019-02-18 09:45:38 +00:00
parent e096dc9b66
commit b7818fe036
2 changed files with 3 additions and 2 deletions
@@ -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');
},
@@ -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');
});
},
/**