forked from ZwiiCMS-Team/ZwiiCMS
[9.1.13.dev1] Nouveau footer WIP
This commit is contained in:
parent
ef04457b2d
commit
c164d819e9
@ -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.12';
|
const ZWII_VERSION = '9.1.13';
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
public static $coreModuleIds = [
|
public static $coreModuleIds = [
|
||||||
@ -919,6 +919,12 @@ class common {
|
|||||||
$this->setData(['core', 'dataVersion', 9100]);
|
$this->setData(['core', 'dataVersion', 9100]);
|
||||||
$this->SaveData();
|
$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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,11 @@ class theme extends common {
|
|||||||
'auto auto' => 'Automatique',
|
'auto auto' => 'Automatique',
|
||||||
'100% 100%' => 'Image étirée'
|
'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é
|
* Mode avancé
|
||||||
@ -304,7 +308,8 @@ class theme extends common {
|
|||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => 'Personnalisation du pied de page',
|
'title' => 'Personnalisation du pied de page',
|
||||||
'vendor' => [
|
'vendor' => [
|
||||||
'tinycolorpicker'
|
'tinycolorpicker',
|
||||||
|
'tinymce'
|
||||||
],
|
],
|
||||||
'view' => 'footer'
|
'view' => 'footer'
|
||||||
]);
|
]);
|
||||||
|
@ -67,18 +67,18 @@ $("input, select").on("change", function() {
|
|||||||
// Bloc texte personnalisé
|
// Bloc texte personnalisé
|
||||||
$("#themeFooterForm").on("change",function() {
|
$("#themeFooterForm").on("change",function() {
|
||||||
switch($("#themeFooterTextPosition").val()) {
|
switch($("#themeFooterTextPosition").val()) {
|
||||||
case 'hide':
|
case "hide":
|
||||||
$("#footerText").hide();
|
$("#footerText").hide();
|
||||||
break;
|
break;
|
||||||
case 'left':
|
case "left":
|
||||||
$("#footerText").show().appendTo("#footerbodyLeft");
|
$("#footerText").show().appendTo("#footerbodyLeft");
|
||||||
$("#footerText").show().appendTo("#footersiteLeft");
|
$("#footerText").show().appendTo("#footersiteLeft");
|
||||||
break;
|
break;
|
||||||
case 'center':
|
case "center":
|
||||||
$("#footerText").show().appendTo("#footerbodyCenter");
|
$("#footerText").show().appendTo("#footerbodyCenter");
|
||||||
$("#footerText").show().appendTo("#footersiteCenter");
|
$("#footerText").show().appendTo("#footersiteCenter");
|
||||||
break;
|
break;
|
||||||
case 'right':
|
case "right":
|
||||||
$("#footerText").show().appendTo("#footerbodyRight");
|
$("#footerText").show().appendTo("#footerbodyRight");
|
||||||
$("#footerText").show().appendTo("#footersiteRight");
|
$("#footerText").show().appendTo("#footersiteRight");
|
||||||
break;
|
break;
|
||||||
@ -120,6 +120,61 @@ $("#themeFooterForm").on("change",function() {
|
|||||||
}).trigger("change");
|
}).trigger("change");
|
||||||
// Fin Position dans les blocs
|
// 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($("<option></option>")
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>Couleur</h4>
|
<h4>Couleurs</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::text('themeFooterBackgroundColor', [
|
<?php echo template::text('themeFooterBackgroundColor', [
|
||||||
@ -93,13 +93,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<div class="block">
|
||||||
|
<h4>Mise en page</h4>
|
||||||
|
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
|
||||||
|
'label' => '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.'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>Contenu personnalisé</h4>
|
<h4>Contenu personnalisé</h4>
|
||||||
<?php echo template::textarea('themeFooterText', [
|
<?php echo template::textarea('themeFooterText', [
|
||||||
'label' => 'Contenu (texte ou HTML)',
|
//'label' => 'Contenu (texte ou HTML)',
|
||||||
'value' => $this->getData(['theme', 'footer', 'text'])
|
'value' => $this->getData(['theme', 'footer', 'text']),
|
||||||
|
'class' => 'editorWysiwyg'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -110,7 +123,8 @@
|
|||||||
<h4>Contenu personnalisé</h4>
|
<h4>Contenu personnalisé</h4>
|
||||||
<?php echo template::select('themeFooterTextPosition', $module::$footerblocks, [
|
<?php echo template::select('themeFooterTextPosition', $module::$footerblocks, [
|
||||||
'label' => 'Emplacement',
|
'label' => 'Emplacement',
|
||||||
'selected' => $this->getData(['theme', 'footer', 'textPosition'])
|
'selected' => $this->getData(['theme', 'footer', 'textPosition']),
|
||||||
|
'class' => 'themeFooterPosition'
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
|
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
|
||||||
'label' => 'Alignement horizontal',
|
'label' => 'Alignement horizontal',
|
||||||
@ -121,10 +135,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>Réseaux sociaux</h4>
|
<h4>Contenu réseaux sociaux</h4>
|
||||||
<?php echo template::select('themeFooterSocialsPosition', $module::$footerblocks, [
|
<?php echo template::select('themeFooterSocialsPosition', $module::$footerblocks, [
|
||||||
'label' => 'Emplacement',
|
'label' => 'Emplacement',
|
||||||
'selected' => $this->getData(['theme', 'footer', 'socialsPosition'])
|
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
|
||||||
|
'class' => 'themeFooterPosition'
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
|
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
|
||||||
'label' => 'Alignement horizontal',
|
'label' => 'Alignement horizontal',
|
||||||
@ -136,12 +151,13 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h4>Copyright</h4>
|
<h4>Contenu copyright</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col5">
|
<div class="col5">
|
||||||
<?php echo template::select('themeFooterCopyrightPosition', $module::$footerblocks, [
|
<?php echo template::select('themeFooterCopyrightPosition', $module::$footerblocks, [
|
||||||
'label' => 'Emplacement',
|
'label' => 'Emplacement',
|
||||||
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition'])
|
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
|
||||||
|
'class' => 'themeFooterPosition'
|
||||||
]); ?>
|
]); ?>
|
||||||
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
|
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
|
||||||
'label' => 'Alignement horizontal',
|
'label' => 'Alignement horizontal',
|
||||||
@ -149,7 +165,7 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6 offset1">
|
<div class="col6 offset1">
|
||||||
<p>Afficher les éléments suivants :</p>
|
<p>Insérer les éléments suivants :</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Mention "Motorisé par"', [
|
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Mention "Motorisé par"', [
|
||||||
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
|
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user