[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.
This commit is contained in:
qsm-odoo
2016-07-25 17:00:24 +02:00
parent 19e3757ffb
commit 3fe3f55cf5
@@ -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;