From 3fe3f55cf5ef8a72cc7e19821ed6d07dc329d3c2 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 25 Jul 2016 15:02:44 +0200 Subject: [PATCH] [FIX] web_editor: allow adding options on predefined bg classes The editor allows using background image options on snippets which use a background-image. For this to work, the oe_img_bg css class has to be on this snippet. The problem is that the class is absent when using some themes as the select_class method removes it to place its own value. Now, the oe_img_bg class is (re)added when a select_class method is used within the background image option. --- addons/web_editor/static/src/js/snippets.options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/snippets.options.js b/addons/web_editor/static/src/js/snippets.options.js index 3f933f4c191..357fa19c9ed 100644 --- a/addons/web_editor/static/src/js/snippets.options.js +++ b/addons/web_editor/static/src/js/snippets.options.js @@ -383,7 +383,7 @@ odoo.define('web_editor.snippets.options', function (require) { }, select_class : function (type, value, $li) { this.background(type, '', $li); - this._super(type, value, $li); + this._super(type, value ? (value + " oe_img_bg") : value, $li); }, choose_image: function (type, value, $li) { if(type !== "click") return;