diff --git a/core/core.php b/core/core.php index 1236829b..d9bdebe4 100644 --- a/core/core.php +++ b/core/core.php @@ -32,7 +32,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '9.1.12'; + const ZWII_VERSION = '9.1.13'; public static $actions = []; public static $coreModuleIds = [ @@ -919,6 +919,12 @@ class common { $this->setData(['core', 'dataVersion', 9100]); $this->SaveData(); } + // Version 9.1.13 + if($this->getData(['core', 'dataVersion']) < 9113) { + $this->setData(['theme','footer','template', 3 ]); + $this->setData(['core', 'dataVersion', 9113]); + $this->SaveData(); + } } } diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 495bd61b..9a664468 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -207,7 +207,11 @@ class theme extends common { 'auto auto' => 'Automatique', '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)' + ]; /** * Mode avancé @@ -304,7 +308,8 @@ class theme extends common { $this->addOutput([ 'title' => 'Personnalisation du pied de page', 'vendor' => [ - 'tinycolorpicker' + 'tinycolorpicker', + 'tinymce' ], 'view' => 'footer' ]); diff --git a/core/module/theme/view/footer/footer.js.php b/core/module/theme/view/footer/footer.js.php index 45b26937..d6f32aae 100755 --- a/core/module/theme/view/footer/footer.js.php +++ b/core/module/theme/view/footer/footer.js.php @@ -67,18 +67,18 @@ $("input, select").on("change", function() { // Bloc texte personnalisé $("#themeFooterForm").on("change",function() { switch($("#themeFooterTextPosition").val()) { - case 'hide': + case "hide": $("#footerText").hide(); break; - case 'left': + case "left": $("#footerText").show().appendTo("#footerbodyLeft"); $("#footerText").show().appendTo("#footersiteLeft"); break; - case 'center': + case "center": $("#footerText").show().appendTo("#footerbodyCenter"); $("#footerText").show().appendTo("#footersiteCenter"); break; - case 'right': + case "right": $("#footerText").show().appendTo("#footerbodyRight"); $("#footerText").show().appendTo("#footersiteRight"); break; @@ -120,6 +120,61 @@ $("#themeFooterForm").on("change",function() { }).trigger("change"); // Fin Position dans les blocs +// Liste de position dans les blocs + +//3 colonnes +var newOptions = { + 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é'} +}; + + +// Modification de la mise en page +$("#themeFooterTemplate").on("change",function() { + // Nettoyage des sélecteurs des contenus + + var $el = $(".themeFooterPosition"); + $el.empty(); + // Eléments des position de contenus + $.each(newOptions[$("#themeFooterTemplate").val()], function(key,value) { + $el.append($("") + .attr("value", key).text(value)); + }); + switch($("#themeFooterTemplate").val()) { + case "1": + $("#footersiteLeft").css("display", "none"); + $("#footersiteCenter").css("display", ""); + $("#footersiteRight").css("display", "none"); + // Dimension du bloc + $("#footersiteCenter").removeAttr('class');; + $("#footersiteCenter").addClass("col12"); + break; + case "2": + $("#footersiteLeft").css("display", ""); + $("#footersiteCenter").css("display", "none"); + $("#footersiteRight").css("display", ""); + // Dimension de blocs + $("#footersiteLeft").removeAttr('class'); + $("#footersiteRight").removeAttr('class'); + $("#footersiteLeft").addClass('col6'); + $("#footersiteRight").addClass('col6'); + break; + case "3": + $("#footersiteLeft").css("display", ""); + $("#footersiteCenter").css("display", ""); + $("#footersiteRight").css("display", ""); + // Dimensions des blocs + $("#footersiteLeft").removeAttr('class'); + $("#footersiteRight").removeAttr('class'); + $("#footersitecenter").removeAttr('class'); + $("#footersiteLeft").addClass('col4'); + $("#footersiteCenter").addClass('col4'); + $("#footersiteRight").addClass('col4'); + break; + } +}); + diff --git a/core/module/theme/view/footer/footer.php b/core/module/theme/view/footer/footer.php index 56cd37f3..80537e7c 100755 --- a/core/module/theme/view/footer/footer.php +++ b/core/module/theme/view/footer/footer.php @@ -15,7 +15,7 @@
-

Couleur

+

Couleurs

+
+
+
+

Mise en page

+ 'Nombre de colonnes', + 'selected' => $this->getData(['theme', 'footer', 'template']), + 'help' => 'Le changement de la mise en page entraîne la réinitalisation de la position des contenus.' + ]); ?> +
+
+

Contenu personnalisé

'Contenu (texte ou HTML)', - 'value' => $this->getData(['theme', 'footer', 'text']) + //'label' => 'Contenu (texte ou HTML)', + 'value' => $this->getData(['theme', 'footer', 'text']), + 'class' => 'editorWysiwyg' ]); ?>
@@ -110,7 +123,8 @@

Contenu personnalisé

'Emplacement', - 'selected' => $this->getData(['theme', 'footer', 'textPosition']) + 'selected' => $this->getData(['theme', 'footer', 'textPosition']), + 'class' => 'themeFooterPosition' ]); ?> 'Alignement horizontal', @@ -121,10 +135,11 @@
-

Réseaux sociaux

+

Contenu réseaux sociaux

'Emplacement', - 'selected' => $this->getData(['theme', 'footer', 'socialsPosition']) + 'selected' => $this->getData(['theme', 'footer', 'socialsPosition']), + 'class' => 'themeFooterPosition' ]); ?> 'Alignement horizontal', @@ -136,12 +151,13 @@
-

Copyright

+

Contenu copyright

'Emplacement', - 'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']) + 'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']), + 'class' => 'themeFooterPosition' ]); ?> 'Alignement horizontal', @@ -149,7 +165,7 @@ ]); ?>
-

Afficher les éléments suivants :

+

Insérer les éléments suivants :

$this->getData(['theme', 'footer','displayCopyright'])