summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/editor/snippets.options.js
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2020-06-30 13:23:20 +0000
committerqsm-odoo <qsm@odoo.com>2020-06-30 14:19:16 +0000
commit7827da3e7a00a3d93bcbe114179f7a73000431a1 (patch)
treea10e1d7a4981cb947684ad04765580f1a50f6f09 /addons/website/static/src/js/editor/snippets.options.js
parent904fea38a25b76b53f5e622e068e6b8e74ff0acb (diff)
[IMP] website: add the possibility to hide the logo
Part of https://github.com/odoo/odoo/pull/49142 task-2229551
Diffstat (limited to 'addons/website/static/src/js/editor/snippets.options.js')
-rw-r--r--addons/website/static/src/js/editor/snippets.options.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js
index 655692237f2..c9d3efad3dc 100644
--- a/addons/website/static/src/js/editor/snippets.options.js
+++ b/addons/website/static/src/js/editor/snippets.options.js
@@ -1518,6 +1518,27 @@ options.registry.collapse = options.Class.extend({
},
});
+options.registry.Header = options.Class.extend({
+
+ //--------------------------------------------------------------------------
+ // Private
+ //--------------------------------------------------------------------------
+
+ /**
+ * Needs to be done manually for now because data-dependencies
+ * doesn't work with "AND" conditions.
+ * TODO: improve this.
+ *
+ * @override
+ */
+ async _computeWidgetVisibility(widgetName, params) {
+ if (widgetName === 'option_logo_height_scrolled') {
+ return !this.$('.navbar-brand').hasClass('d-none');
+ }
+ return this._super(...arguments);
+ },
+});
+
options.registry.topMenuTransparency = options.Class.extend({
//--------------------------------------------------------------------------