[FIX] website: use relative url in background image

Use .css convert into absolute url
This commit is contained in:
Christophe Matthieu
2015-06-17 19:00:45 +02:00
parent 93e6b08e7c
commit 4ee19ac990
2 changed files with 4 additions and 1 deletions
@@ -1863,6 +1863,9 @@ define(['summernote/summernote'], function () {
$(document.body).trigger("media-saved", [self.active.media, self.old_media]);
self.trigger("saved", [self.active.media, self.old_media]);
setTimeout(function () {
if (!self.active.media.parentNode) {
return;
}
range.createFromNode(self.active.media).select();
click_event(self.active.media, "mousedown");
if (!this.only_images) {
@@ -1059,7 +1059,7 @@
},
background: function(type, value, $li) {
if (value && value.length) {
this.$bg.css("background-image", 'url(' + value + ')');
this.$bg.attr("style", 'background-image: url(' + value + ')' + this.$bg.attr("style").replace(/background-image:[^;]+/, '') );
this.$bg.addClass("oe_img_bg");
} else {
this.$bg.css("background-image", "");