Browse Source

theme site bug option marges

master
Fred Tempez 8 months ago
parent
commit
3b74d630d2
  1. 35
      core/module/theme/view/site/site.js.php

35
core/module/theme/view/site/site.js.php

@ -11,36 +11,24 @@
* @link http://zwiicms.fr/
*/
/*
* Chargement de l'aperçu
/**
* Aperçu en direct
*/
$(document).ready(function() {
$("input, select").on("change",function() {
/**
* Option de marge si la taille n'est pas fluide
*/
if ($('#themeSiteWidth').val() === '100%') {
$("#themeSiteMargin").prop("checked", true);
$("#themeSiteMargin").addClass("disabled");
console.log ("pop");
$("#themeSiteMarginWrapper").prop("checked", true);
$("#themeSiteMarginWrapper").hide();
} else {
$("#themeSiteMargin").addClass("enabled");
$("#themeSiteMarginWrapper").show();
}
// Charger l'aperçu initial
previewDOM();
});
/**
* Aperçu en direct
*/
$("input, select").on("change",function() {
previewDOM();
});
function previewDOM() {
/**
* Aperçu dans la boîte
*/
@ -96,7 +84,6 @@ function previewDOM() {
// Couleur ou image de fond
var backgroundImage = <?php echo json_encode(helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme','body','image'])); ?>;
console.log(backgroundImage);
var backgroundcolor = <?php echo json_encode($this->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() + "}";
@ -125,4 +112,6 @@ function previewDOM() {
.text(css)
.appendTo("head");
};
}).trigger("change");

Loading…
Cancel
Save