diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-06 19:23:03 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-06 19:23:03 +0200 |
| commit | 6f3eada2c3a5c0a21c9b3fef3bef3f655b0892e4 (patch) | |
| tree | 82d444e6c02f7cb18f41dba24a045ad16d0cd4a4 /addons/web_editor/static | |
| parent | 7095cb5af5ddef5e89e2bc1da8add6bfff1ed10e (diff) | |
| parent | f687a27b79e2072ffe0de11722fa8ab1f7c9a6fd (diff) | |
[MERGE] forward port branch saas-15 up to f687a27b79e
Diffstat (limited to 'addons/web_editor/static')
| -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 + ")"); |
