From d4fb3bf48db3650b67164cddce3f3365aff2ca16 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 22 Jun 2019 19:44:13 +0200 Subject: [PATCH] [9.1.14] footer sur 3 rangs --- core/layout/common.css | 1 + core/module/theme/theme.php | 23 ++++++++----- core/module/theme/view/footer/footer.js.php | 38 ++++++++++++--------- core/module/theme/view/footer/footer.php | 2 +- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/core/layout/common.css b/core/layout/common.css index e532455f..a42eca8c 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -584,6 +584,7 @@ footer { #footerDisplayCopyright, #footerDisplayVersion, #footerDisplaySiteMap, +#footerDisplayLegal, #footerZwiiCMS { font-size: inherit; } diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index c37e7423..b64f07be 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -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' ]; /** diff --git a/core/module/theme/view/footer/footer.js.php b/core/module/theme/view/footer/footer.js.php index bb71f190..9e859d5d 100755 --- a/core/module/theme/view/footer/footer.js.php +++ b/core/module/theme/view/footer/footer.js.php @@ -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() { diff --git a/core/module/theme/view/footer/footer.php b/core/module/theme/view/footer/footer.php index ac1667d7..07463888 100755 --- a/core/module/theme/view/footer/footer.php +++ b/core/module/theme/view/footer/footer.php @@ -104,7 +104,7 @@ $footerBlockPosition = $module::$footerblocks [$this->getData(['theme', 'footer', 'template'])]; ?> '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.' ]); ?>