[9.1.14] Corrections footer

This commit is contained in:
fredtempez 2019-06-22 08:23:09 +02:00
parent b5edd4ead9
commit 2586da1d53
3 changed files with 50 additions and 39 deletions

View File

@ -32,7 +32,7 @@ class common {
const TEMP_DIR = 'site/tmp/'; const TEMP_DIR = 'site/tmp/';
// Numéro de version // Numéro de version
const ZWII_VERSION = '9.1.13'; const ZWII_VERSION = '9.1.14.dev';
public static $actions = []; public static $actions = [];
public static $coreModuleIds = [ public static $coreModuleIds = [
@ -1083,15 +1083,15 @@ class core extends common {
// Pied de page // Pied de page
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor'])); $colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
if($this->getData(['theme', 'footer', 'margin'])) { 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 { } else {
$css .= 'footer{margin:0;padding:0}'; $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 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{background-color:' . $colors['normal'] . ';color:' . $this->getData(['theme', 'footer', 'textColor']) . '}';
$css .= 'footer a{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 > div {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
$css .= 'footer .container-large > #footersiteLeft, #footersiteCenter, #footersiteRight {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 .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}';
$css .= '#footerText{text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}'; $css .= '#footerText{text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}'; $css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';

View File

@ -284,35 +284,46 @@ class theme extends common {
public function footer() { public function footer() {
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
$this->setData(['theme', 'footer', [ if ( $this->getInput('themeFooterCopyrightPosition') === 'hide' &&
'backgroundColor' => $this->getInput('themeFooterBackgroundColor'), $this->getInput('themeFooterSocialsPosition') === 'hide' &&
'copyrightAlign' => $this->getInput('themeFooterCopyrightAlign'), $this->getInput('themeFooterTextPosition') === 'hide' ) {
'height' => $this->getInput('themeFooterHeight'), // Valeurs en sortie
'loginLink' => $this->getInput('themeFooterLoginLink'), $this->addOutput([
'margin' => $this->getInput('themeFooterMargin', helper::FILTER_BOOLEAN), 'notification' => 'Sélectionnez au moment un contenu à afficher',
'position' => $this->getInput('themeFooterPosition'), 'redirect' => helper::baseUrl() . 'theme/footer',
'socialsAlign' => $this->getInput('themeFooterSocialsAlign'), 'state' => false
'text' => $this->getInput('themeFooterText', null), ]);
'textAlign' => $this->getInput('themeFooterTextAlign'), } else {
'textColor' => $this->getInput('themeFooterTextColor'), $this->setData(['theme', 'footer', [
'copyrightPosition' => $this->getInput('themeFooterCopyrightPosition'), 'backgroundColor' => $this->getInput('themeFooterBackgroundColor'),
'textPosition' => $this->getInput('themeFooterTextPosition'), 'copyrightAlign' => $this->getInput('themeFooterCopyrightAlign'),
'socialsPosition' => $this->getInput('themeFooterSocialsPosition'), 'height' => $this->getInput('themeFooterHeight'),
'textTransform' => $this->getInput('themeFooterTextTransform'), 'loginLink' => $this->getInput('themeFooterLoginLink'),
'font' => $this->getInput('themeFooterFont'), 'margin' => $this->getInput('themeFooterMargin', helper::FILTER_BOOLEAN),
'fontSize' => $this->getInput('themeFooterFontSize'), 'position' => $this->getInput('themeFooterPosition'),
'fontWeight' => $this->getInput('themeFooterFontWeight'), 'socialsAlign' => $this->getInput('themeFooterSocialsAlign'),
'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN), 'text' => $this->getInput('themeFooterText', null),
'displaySiteMap' => $this->getInput('themefooterDisplaySiteMap', helper::FILTER_BOOLEAN), 'textAlign' => $this->getInput('themeFooterTextAlign'),
'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN), 'textColor' => $this->getInput('themeFooterTextColor'),
'template' => $this->getInput('themeFooterTemplate') 'copyrightPosition' => $this->getInput('themeFooterCopyrightPosition'),
]]); 'textPosition' => $this->getInput('themeFooterTextPosition'),
// Valeurs en sortie 'socialsPosition' => $this->getInput('themeFooterSocialsPosition'),
$this->addOutput([ 'textTransform' => $this->getInput('themeFooterTextTransform'),
'notification' => 'Modifications enregistrées', 'font' => $this->getInput('themeFooterFont'),
'redirect' => helper::baseUrl() . 'theme', 'fontSize' => $this->getInput('themeFooterFontSize'),
'state' => true 'fontWeight' => $this->getInput('themeFooterFontWeight'),
]); 'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN),
'displaySiteMap' => $this->getInput('themefooterDisplaySiteMap', helper::FILTER_BOOLEAN),
'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN),
'template' => $this->getInput('themeFooterTemplate')
]]);
// Valeurs en sortie
$this->addOutput([
'notification' => 'Modifications enregistrées',
'redirect' => helper::baseUrl() . 'theme',
'state' => true
]);
}
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([

View File

@ -25,9 +25,9 @@ $("input, select").on("change", function() {
var css = "footer{background-color:" + colors.normal + ";color:" + textColor + "}"; var css = "footer{background-color:" + colors.normal + ";color:" + textColor + "}";
css += "footer a{color:" + textColor + "}"; css += "footer a{color:" + textColor + "}";
// Hauteur du pied de page // 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 > 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}"; //css += "footer .container-large > div{padding:0}";
// Alignement du contenu // Alignement du contenu
css += "#footerSocials{text-align:" + $("#themeFooterSocialsAlign").val() + "}"; 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() + "}"; 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 // Marge
if($("#themeFooterMargin").is(":checked")) { if($("#themeFooterMargin").is(":checked")) {
css += 'footer{margin:0 20px 20px;padding: 1px 20px;}'; css += 'footer{margin:0 10px 10px;padding: 1px 10px;}';
} }
else { else {
css += 'footer{margin:0;padding:0}'; css += 'footer{margin:0;padding:0}';
@ -97,7 +97,7 @@ $(".themeFooterContent").on("change",function() {
$("#footerSocials").show().appendTo("#footer" + position + "Right"); $("#footerSocials").show().appendTo("#footer" + position + "Right");
break; break;
} }
switch($("#themeFooterCopyrightPosition").val()) { switch($("#themeFooterCopyrightPosition").val()) {
case 'hide': case 'hide':
$("#footerCopyright").hide(); $("#footerCopyright").hide();
break; break;
@ -112,6 +112,7 @@ $(".themeFooterContent").on("change",function() {
break; break;
} }
}).trigger("change"); }).trigger("change");
// Fin Position dans les blocs // Fin Position dans les blocs
// Modification dynamique de la mise en page // Modification dynamique de la mise en page
@ -130,7 +131,7 @@ $("#themeFooterTemplate").on("change",function() {
.attr("value", key).text(value)); .attr("value", key).text(value));
}); });
var position = $("#themeFooterPosition").val(); var position = $("#themeFooterPosition").val();
// Masquer le contenus // Masquer les contenus
$("#footerCopyright").hide(); $("#footerCopyright").hide();
$("#footerText").hide(); $("#footerText").hide();
$("#footerSocials").hide(); $("#footerSocials").hide();
@ -184,7 +185,6 @@ $("#themeFooterSocialsPosition").on("change", function() {
}).trigger("change"); }).trigger("change");
$("#themeFooterTextPosition").on("change", function() { $("#themeFooterTextPosition").on("change", function() {
if ($(this).prop('selectedIndex') >= 1 ) { if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) { if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterSocialsPosition").prop('selectedIndex',0); $("#themeFooterSocialsPosition").prop('selectedIndex',0);