diff --git a/core/module/theme/view/site/site.js.php b/core/module/theme/view/site/site.js.php index 2f497288..a13c7582 100644 --- a/core/module/theme/view/site/site.js.php +++ b/core/module/theme/view/site/site.js.php @@ -86,10 +86,10 @@ $("input, select").on("change",function() { css += "#site{border-radius:" + $("#themeSiteRadius").val() + ";box-shadow:" + $("#themeSiteShadow").val() + " #212223}"; // Couleur ou image de fond - var backgroundImage = getData(['theme','body','image']) !== '') { echo json_encode(helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme','body','image']));} else { echo 'null';} ?> ; + var backgroundImage = getData(['theme','body','image'])); ?>; var backgroundcolor = getdata(['theme','body','backgroundColor'])); ?>; if(backgroundImage ) { - css += "div.bodybackground{background-image:url(" + backgroundImage + ");background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}"; + css += "div.bodybackground{background-image:url(" + window.location.origin + window.location.pathname + '/site/file/source/' + backgroundImage + ");background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}"; css += "div.bodybackground{background-color:rgba(0,0,0,0);}"; } else {