summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-11-17 10:42:23 +0000
committerqsm-odoo <qsm@odoo.com>2020-11-17 11:17:02 +0000
commit333a9124608ff655bd9ad5e63044a5cb7ef9c636 (patch)
treee28fb4c5a21f1b69ed09b9b753ca7227435ab645 /addons/website/static/src
parenteb3aa203fa3033b6583a6ffddca7e80e6e1de0d2 (diff)
[FIX] website: remove multi snippets zones in the header
task-2387598 closes odoo/odoo#61835 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/editor/wysiwyg_multizone.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/website/static/src/js/editor/wysiwyg_multizone.js b/addons/website/static/src/js/editor/wysiwyg_multizone.js
index ce83b958703..596d40db72d 100644
--- a/addons/website/static/src/js/editor/wysiwyg_multizone.js
+++ b/addons/website/static/src/js/editor/wysiwyg_multizone.js
@@ -85,6 +85,15 @@ var WysiwygMultizone = Wysiwyg.extend({
}
}
+ // TODO remove this code in master by migrating users who did not
+ // receive the XML change about the 'oe_structure_solo' class (the
+ // header original XML is now correct but we changed specs after
+ // release to not allow multi snippets drop zones in the header).
+ const $headerZones = this._getEditableArea().filter((i, el) => el.closest('header#top') !== null);
+ // oe_structure_multi to ease custo in stable
+ const selector = '.oe_structure[id*="oe_structure"]:not(.oe_structure_multi)';
+ $headerZones.find(selector).addBack(selector).addClass('oe_structure_solo');
+
return this._super.apply(this, arguments).then(() => {
// Showing Mega Menu snippets if one dropdown is already opened
if (this.$('.o_mega_menu').hasClass('show')) {