diff options
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/snippets.editor.js | 2 | ||||
| -rw-r--r-- | addons/web_editor/static/src/js/snippets.options.js | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js index 42f2103f95f..e5d184117f4 100644 --- a/addons/web_editor/static/src/js/snippets.editor.js +++ b/addons/web_editor/static/src/js/snippets.editor.js @@ -1118,7 +1118,7 @@ data.Editor = Class.extend({ }).bind(this)); // Activate the overlay - $style_button.toggleClass("hidden", $ul.children(":not(.divider):not(.hidden)").length === 0); + $style_button.toggleClass("hidden", $ul.children(":not(.o_main_header):not(.divider):not(.hidden)").length === 0); this.$overlay.toggleClass("oe_active", !!focus); function _do_action_focus(style, $dest) { diff --git a/addons/web_editor/static/src/js/snippets.options.js b/addons/web_editor/static/src/js/snippets.options.js index 4d533cadd00..1444f404ff6 100644 --- a/addons/web_editor/static/src/js/snippets.options.js +++ b/addons/web_editor/static/src/js/snippets.options.js @@ -576,15 +576,18 @@ odoo.define('web_editor.snippets.options', function (require) { registry.background = SnippetOption.extend({ start: function () { var res = this._super.apply(this, arguments); - this.$target.off(".background-option") - .on("background-color-event.background-option", (function (e, type) { - e.stopPropagation(); - if (e.currentTarget !== e.target) return; - this.$el.find("li:first > a").trigger(type); - }).bind(this)); + this.bind_bg_events(); return res; }, + bind_bg_events: function () { + this.$target.off(".background-option") + .on("background-color-event.background-option", (function (e, type) { + e.stopPropagation(); + if (e.currentTarget !== e.target) return; + this.$el.find("li:first > a").trigger(type); + }).bind(this)); + }, background: function (type, value, $li) { if (value && value.length) { this.$target.css("background-image", "url(" + value + ")"); |
