[9.1.14] footer sur 3 rangs

This commit is contained in:
fredtempez 2019-06-22 19:44:13 +02:00
parent f63178c29b
commit d4fb3bf48d
4 changed files with 38 additions and 26 deletions

View File

@ -584,6 +584,7 @@ footer {
#footerDisplayCopyright,
#footerDisplayVersion,
#footerDisplaySiteMap,
#footerDisplayLegal,
#footerZwiiCMS {
font-size: inherit;
}

View File

@ -70,17 +70,21 @@ class theme extends common {
public static $footerblocks = [
1 => [
'hide' => 'Masqué',
'center' => 'Affiché'
] , 2 => [
'center' => 'Affiché' ],
2 => [
'hide' => 'Masqué',
'left' => 'Bloc Gauche',
'right' => 'Bloc Droite'
] , 3 => [
'right' => 'Bloc Droite' ],
3 => [
'hide' => 'Masqué',
'left' => 'Bloc Gauche',
'center' => 'Bloc Central',
'right' => 'Bloc Droite'
]
'right' => 'Bloc Droite' ],
4 => [
'hide' => 'Masqué',
'top' => 'Bloc haut',
'middle' => 'Bloc au milieu',
'bottom' => 'Bloc inférieur' ]
];
public static $fontWeights = [
@ -217,9 +221,10 @@ class theme extends common {
'100% 100%' => 'Image étirée'
];
public static $footerTemplate = [
'1' => 'Pleine page (100%)',
'2' => 'Deux colonnes ( 1/2 - 1/2)',
'3' => 'Trois colonnes (1/3 - 1/3 - 1/3)'
'1' => 'Colonne unique',
'2' => 'Colonnes, 2 bloc 50% - 50%',
'3' => 'Colonnes, 3 blocs 33% - 33% - 33%',
'4' => 'Trois lignes en pleine largeur'
];
/**

View File

@ -119,6 +119,7 @@ $(".themeFooterContent").on("change",function() {
$("#themeFooterTemplate").on("change",function() {
// Nettoyage des sélecteurs des contenus
var newOptions = {
4: {'hide' : 'Masqué', 'top' : 'Bloc en haut', 'middle' : 'Bloc au milieu', 'bottom' : 'Bloc inférieur'} ,
3: {'hide': 'Masqué', 'left': 'Bloc Gauche', 'center': 'Bloc Central', 'right': 'Bloc Droite'} ,
2: {'hide': 'Masqué', 'left': 'Bloc Gauche', 'right': 'Bloc Droite'} ,
1: {'hide': 'Masqué', 'center': 'Affiché'}
@ -166,6 +167,23 @@ $("#themeFooterTemplate").on("change",function() {
$("#footer" + position + "Center").addClass('col4');
$("#footer" + position + "Right").addClass('col4');
break;
case "4":
$("#footer" + position + "Left").css("display","");
$("#footer" + position + "Left").removeAttr('class');
$("#footer" + position + "Left").addClass('col12');
//$("#footer" + position + "Left").css("footersite > " + "#footer" + position + "Left","order: " + $("#footer" + position + "Left").val() );
$("#footer" + position + "Center").css("display","");
$("#footer" + position + "center").removeAttr('class');
$("#footer" + position + "Center").addClass('col12');
//$("#footer" + position + "Center").css("footersite > " + "#footer" + position + "Center","order: " + $("#footer" + position + "Left").val() );
$("#footer" + position + "Right").css("display","");
$("#footer" + position + "Right").removeAttr('class');
$("#footer" + position + "Right").addClass('col12');
//$("#footer" + position + "Right").css("footersite > "+ "#footer" + position + "Right","order: " + $("#footer" + position + "Left").val() );
break;
}
});
@ -183,7 +201,6 @@ $("#themeFooterSocialsPosition").on("change", function() {
}
}
}).trigger("change");
$("#themeFooterTextPosition").on("change", function() {
if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
@ -195,11 +212,9 @@ $("#themeFooterTextPosition").on("change", function() {
$("#footerCopyright").hide();
}
}
}).trigger("change");
$("#themeFooterCopyrightPosition").on("change", function() {
if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterTextPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterTextPosition").prop('selectedIndex',0);
@ -210,7 +225,6 @@ $("#themeFooterCopyrightPosition").on("change", function() {
$("#footerSocials").hide();
}
}
}).trigger("change");
@ -218,8 +232,10 @@ $("#themeFooterCopyrightPosition").on("change", function() {
$("#themeFooterLegalCheck").on("change",function() {
if($(this).is(":checked")) {
$("#themeFooterLegalPageId").show();
$("#footerDisplayLegal").show();
} else {
$("#themeFooterLegalPageId").hide();
$("#footerDisplayLegal").hide();
}
});
@ -236,10 +252,10 @@ $("#themeFooterLoginLink").on("change", function() {
// Numéro de version
$("#themefooterDisplayVersion").on("change", function() {
if($(this).is(":checked")) {
$("#footerDisplayVersion").slideDown();
$("#footerDisplayVersion").show();
}
else {
$("#footerDisplayVersion").slideUp();
$("#footerDisplayVersion").hide();
}
}).trigger("change");
@ -265,16 +281,6 @@ $("#themefooterDisplaySiteMap").on("change", function() {
// Numéro de version
$("#themefooterDisplayVersion").on("change", function() {
if($(this).is(":checked")) {
$("#footerDisplayVersion").show();
}
else {
$("#footerDisplayVersion").hide();
}
}).trigger("change");
// Aperçu du texte
$("#themeFooterText").on("change keydown keyup", function() {

View File

@ -104,7 +104,7 @@
$footerBlockPosition = $module::$footerblocks [$this->getData(['theme', 'footer', 'template'])];
?>
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
'label' => 'Nombre de colonnes',
'label' => 'Gabarits de mise en page',
'selected' => $this->getData(['theme', 'footer', 'template']),
'help' => 'Le changement de la mise en page entraîne la réinitalisation de la position des contenus.'
]); ?>