From 15c9ac7e5d4368975a1a389451fb6aae23c53658 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 23 Jun 2019 23:37:12 +0200 Subject: [PATCH] [9.1.14.dev] footer sur 3 lignes OK --- core/core.php | 1 + core/layout/main.php | 5 +++ core/module/theme/theme.php | 6 ++-- core/module/theme/view/footer/footer.js.php | 35 ++++++++++++--------- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/core/core.php b/core/core.php index 3eb3d5e0..96be658d 100644 --- a/core/core.php +++ b/core/core.php @@ -924,6 +924,7 @@ class common { // Version 9.1.13 if($this->getData(['core', 'dataVersion']) < 9113) { $this->setData(['theme','footer','template', 3 ]); + $this->setData(['theme','footer','margin', true ]); $this->setData(['core', 'dataVersion', 9113]); $this->SaveData(); } diff --git a/core/layout/main.php b/core/layout/main.php index fd861806..365a2744 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -237,6 +237,11 @@ $class['center'] = "col4"; $class['right'] = "col4"; break; + case '4' : + $class['left'] = "col12"; + $class['center'] = "col12"; + $class['right'] = "col12"; + break; }?>
diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index b64f07be..9820bf26 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -82,9 +82,9 @@ class theme extends common { 'right' => 'Bloc Droite' ], 4 => [ 'hide' => 'Masqué', - 'top' => 'Bloc haut', - 'middle' => 'Bloc au milieu', - 'bottom' => 'Bloc inférieur' ] + 'left' => 'En haut', + 'center' => 'Au milieu', + 'right' => 'En bas' ] ]; public static $fontWeights = [ diff --git a/core/module/theme/view/footer/footer.js.php b/core/module/theme/view/footer/footer.js.php index 9e859d5d..d6882d93 100755 --- a/core/module/theme/view/footer/footer.js.php +++ b/core/module/theme/view/footer/footer.js.php @@ -75,24 +75,24 @@ $(".themeFooterContent").on("change",function() { break; case "left": $("#footerText").show().appendTo("#footer" + position + "Left"); - break; - case "center": + break; + case "center": $("#footerText").show().appendTo("#footer" + position + "Center"); - break; - case "right": + break; + case "right": $("#footerText").show().appendTo("#footer" + position + "Right"); break; } switch($("#themeFooterSocialsPosition").val()) { case 'hide': $("#footerSocials").hide(); - break; + break; case 'left': $("#footerSocials").show().appendTo("#footer" + position + "Left"); - break; + break; case 'center': $("#footerSocials").show().appendTo("#footer" + position + "Center"); - break; + break; case 'right': $("#footerSocials").show().appendTo("#footer" + position + "Right"); break; @@ -100,13 +100,13 @@ $(".themeFooterContent").on("change",function() { switch($("#themeFooterCopyrightPosition").val()) { case 'hide': $("#footerCopyright").hide(); - break; + break; case 'left': $("#footerCopyright").show().appendTo("#footer" + position + "Left"); - break; + break; case 'center': $("#footerCopyright").show().appendTo("#footer" + position + "Center"); - break; + break; case 'right': $("#footerCopyright").show().appendTo("#footer" + position + "Right"); break; @@ -151,7 +151,9 @@ $("#themeFooterTemplate").on("change",function() { $("#footer" + position + "Right").css("display",""); // Dimension de blocs $("#footer" + position + "Left").removeAttr('class'); + $("#footer" + position + "Center").removeAttr('class'); $("#footer" + position + "Right").removeAttr('class'); + $("#footer" + position + "Left").addClass('col6'); $("#footer" + position + "Right").addClass('col6'); break; @@ -171,17 +173,20 @@ $("#themeFooterTemplate").on("change",function() { $("#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 + "Center").removeAttr('class'); + $("#footer" + position + "Center").addClass('col12'); $("#footer" + position + "Right").css("display",""); $("#footer" + position + "Right").removeAttr('class'); - $("#footer" + position + "Right").addClass('col12'); + $("#footer" + position + "Right").addClass('col12'); + + // Ordre des blocs du haut vers le bas: + // $("#footer" + position + "Left").css("footersite > " + "#footer" + position + "Left","order: " + $("#footer" + position + "Left").val() ); + // $("#footer" + position + "Center").css("footersite > " + "#footer" + position + "Center","order: " + $("#footer" + position + "Left").val() ); //$("#footer" + position + "Right").css("footersite > "+ "#footer" + position + "Right","order: " + $("#footer" + position + "Left").val() ); + break; }