forked from ZwiiCMS-Team/ZwiiCMS
[9.1.14] Corrections footer
This commit is contained in:
parent
b5edd4ead9
commit
2586da1d53
@ -32,7 +32,7 @@ class common {
|
||||
const TEMP_DIR = 'site/tmp/';
|
||||
|
||||
// Numéro de version
|
||||
const ZWII_VERSION = '9.1.13';
|
||||
const ZWII_VERSION = '9.1.14.dev';
|
||||
|
||||
public static $actions = [];
|
||||
public static $coreModuleIds = [
|
||||
@ -1083,15 +1083,15 @@ class core extends common {
|
||||
// Pied de page
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
|
||||
if($this->getData(['theme', 'footer', 'margin'])) {
|
||||
$css .= 'footer{margin:0 20px 20px;padding: 1px 20px;}';
|
||||
$css .= 'footer{margin:0 10px 10px;padding: 1px 10px;}';
|
||||
} else {
|
||||
$css .= 'footer{margin:0;padding:0}';
|
||||
}
|
||||
$css .= 'footer span{color:' . $this->getData(['theme', 'footer', 'textColor']) . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'footer', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'footer', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'footer', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'footer', 'textTransform']) . '}';
|
||||
$css .= 'footer{background-color:' . $colors['normal'] . ';color:' . $this->getData(['theme', 'footer', 'textColor']) . '}';
|
||||
$css .= 'footer a{color:' . $this->getData(['theme', 'footer', 'textColor']) . '}';
|
||||
$css .= 'footer .container > #footersiteLeft, #footersiteCenter, #footersiteRight {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
|
||||
$css .= 'footer .container-large > #footersiteLeft, #footersiteCenter, #footersiteRight {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
|
||||
//$css .= 'footer .container > div {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
|
||||
$css .= '#footersiteLeft, #footersiteCenter, #footersiteRight {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
|
||||
$css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}';
|
||||
$css .= '#footerText{text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
|
||||
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
|
||||
|
@ -284,6 +284,16 @@ class theme extends common {
|
||||
public function footer() {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
if ( $this->getInput('themeFooterCopyrightPosition') === 'hide' &&
|
||||
$this->getInput('themeFooterSocialsPosition') === 'hide' &&
|
||||
$this->getInput('themeFooterTextPosition') === 'hide' ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' => 'Sélectionnez au moment un contenu à afficher',
|
||||
'redirect' => helper::baseUrl() . 'theme/footer',
|
||||
'state' => false
|
||||
]);
|
||||
} else {
|
||||
$this->setData(['theme', 'footer', [
|
||||
'backgroundColor' => $this->getInput('themeFooterBackgroundColor'),
|
||||
'copyrightAlign' => $this->getInput('themeFooterCopyrightAlign'),
|
||||
@ -314,6 +324,7 @@ class theme extends common {
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Personnalisation du pied de page',
|
||||
|
@ -25,9 +25,9 @@ $("input, select").on("change", function() {
|
||||
var css = "footer{background-color:" + colors.normal + ";color:" + textColor + "}";
|
||||
css += "footer a{color:" + textColor + "}";
|
||||
// Hauteur du pied de page
|
||||
css += "footer .container > div{margin:" + $("#themeFooterHeight").val() + " 0}";
|
||||
css += "#footersiteLeft, #footersiteCenter, #footersiteRight {margin:" + $("#themeFooterHeight").val() + " 0}";
|
||||
//css += "footer .container > div{padding:0}";
|
||||
css += "footer .container-large > div{margin:" + $("#themeFooterHeight").val() + " 0}";
|
||||
//css += "footer .container-large > div{margin:" + $("#themeFooterHeight").val() + " 0}";
|
||||
//css += "footer .container-large > div{padding:0}";
|
||||
// Alignement du contenu
|
||||
css += "#footerSocials{text-align:" + $("#themeFooterSocialsAlign").val() + "}";
|
||||
@ -37,7 +37,7 @@ $("input, select").on("change", function() {
|
||||
css += "footer span{color:" + $("#themeFooterTextColor").val() + ";font-family:'" + footerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeFooterFontWeight").val() + ";font-size:" + $("#themeFooterFontSize").val() + ";text-transform:" + $("#themeFooterTextTransform").val() + "}";
|
||||
// Marge
|
||||
if($("#themeFooterMargin").is(":checked")) {
|
||||
css += 'footer{margin:0 20px 20px;padding: 1px 20px;}';
|
||||
css += 'footer{margin:0 10px 10px;padding: 1px 10px;}';
|
||||
}
|
||||
else {
|
||||
css += 'footer{margin:0;padding:0}';
|
||||
@ -112,6 +112,7 @@ $(".themeFooterContent").on("change",function() {
|
||||
break;
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Fin Position dans les blocs
|
||||
|
||||
// Modification dynamique de la mise en page
|
||||
@ -130,7 +131,7 @@ $("#themeFooterTemplate").on("change",function() {
|
||||
.attr("value", key).text(value));
|
||||
});
|
||||
var position = $("#themeFooterPosition").val();
|
||||
// Masquer le contenus
|
||||
// Masquer les contenus
|
||||
$("#footerCopyright").hide();
|
||||
$("#footerText").hide();
|
||||
$("#footerSocials").hide();
|
||||
@ -184,7 +185,6 @@ $("#themeFooterSocialsPosition").on("change", function() {
|
||||
}).trigger("change");
|
||||
|
||||
$("#themeFooterTextPosition").on("change", function() {
|
||||
|
||||
if ($(this).prop('selectedIndex') >= 1 ) {
|
||||
if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
|
||||
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
|
||||
|
Loading…
Reference in New Issue
Block a user