summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-10-13 10:54:37 +0000
committerqsm-odoo <qsm@odoo.com>2020-10-14 07:53:27 +0000
commit6a4587022ced3e1d72ff8c34a64c7a39e7572520 (patch)
treee472debd547aaa5cbfb331bcf177709958b54d10 /addons/web_editor/static/src/js
parentf019cd677e68312f90604be6abd04a1b1755ae4d (diff)
[FIX] website, *: restore navbar options for 'Boxed' header
*: web_editor The selector targeting the navbar for the related editor options was not correct to target the navbar of the 'Boxed' version of the header. Part of https://github.com/odoo/odoo/pull/59842 task-2312878
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.editor.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js
index f72aa15720b..25d16386ff9 100644
--- a/addons/web_editor/static/src/js/editor/snippets.editor.js
+++ b/addons/web_editor/static/src/js/editor/snippets.editor.js
@@ -1557,6 +1557,14 @@ var SnippetsMenu = Widget.extend({
var $html = $(html);
var $scroll = $html.siblings('#o_scroll');
+ // TODO remove me in master: introduced in a 14.0 fix to allow users to
+ // customize their navbar with 'Boxed' website header, which they could
+ // not because of a wrong XML selector they may not update.
+ const $headerNavFix = $html.find('[data-js="HeaderNavbar"][data-selector="#wrapwrap > header > nav"]');
+ if ($headerNavFix.length) {
+ $headerNavFix[0].dataset.selector = '#wrapwrap > header nav.navbar';
+ }
+
this.templateOptions = [];
var selectors = [];
var $styles = $html.find('[data-selector]');