forked from ZwiiCMS-Team/ZwiiCMS
[9.1.13] en cours
This commit is contained in:
parent
afc8655e22
commit
130ad549dd
@ -570,14 +570,12 @@ body > footer {
|
||||
}
|
||||
footer {
|
||||
padding: 1px 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
footer > .container {
|
||||
align-items: center;
|
||||
#footersiteRight, #footersiteLeft, #footersiteCenter {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
#footerLoginLink,
|
||||
#footerDisplayCopyright,
|
||||
#footerDisplayVersion,
|
||||
|
@ -450,7 +450,7 @@ class install extends common {
|
||||
'displayVersion' => true,
|
||||
'displaySiteMap' => true,
|
||||
'displayCopyright' => true,
|
||||
'template' => 3
|
||||
'template' => '3'
|
||||
],
|
||||
'header' => [
|
||||
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
||||
|
@ -68,11 +68,23 @@ class theme extends common {
|
||||
'Vollkorn' => 'Vollkorn'
|
||||
];
|
||||
public static $footerblocks = [
|
||||
'hide' => 'Masqué',
|
||||
'left' => 'Bloc Gauche',
|
||||
'center' => 'Bloc Central',
|
||||
'right' => 'Bloc Droite'
|
||||
1 => [
|
||||
'hide' => 'Masqué',
|
||||
'center' => 'Affiché'
|
||||
] , 2 => [
|
||||
'hide' => 'Masqué',
|
||||
'left' => 'Bloc Gauche',
|
||||
'right' => 'Bloc Droite'
|
||||
] , 3 => [
|
||||
'hide' => 'Masqué',
|
||||
'left' => 'Bloc Gauche',
|
||||
'center' => 'Bloc Central',
|
||||
'right' => 'Bloc Droite'
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
|
||||
public static $fontWeights = [
|
||||
'normal' => 'Maigre',
|
||||
'bold' => 'Gras'
|
||||
@ -296,7 +308,7 @@ class theme extends common {
|
||||
'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN),
|
||||
'displaySiteMap' => $this->getInput('themefooterDisplaySiteMap', helper::FILTER_BOOLEAN),
|
||||
'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN),
|
||||
'template' => $this->getInput('themeFooterTemplate',helper::FILTER_INT)
|
||||
'template' => $this->getInput('themeFooterTemplate')
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -118,22 +118,17 @@ $("#themeFooterForm").on("change",function() {
|
||||
break;
|
||||
}
|
||||
}).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 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é'}
|
||||
};
|
||||
var $el = $(".themeFooterPosition");
|
||||
$el.empty();
|
||||
// Eléments des position de contenus
|
||||
@ -143,6 +138,7 @@ $("#themeFooterTemplate").on("change",function() {
|
||||
});
|
||||
switch($("#themeFooterTemplate").val()) {
|
||||
case "1":
|
||||
console.log("1");
|
||||
$("#footersiteLeft").css("display", "none");
|
||||
$("#footersiteCenter").css("display", "");
|
||||
$("#footersiteRight").css("display", "none");
|
||||
@ -151,6 +147,7 @@ $("#themeFooterTemplate").on("change",function() {
|
||||
$("#footersiteCenter").addClass("col12");
|
||||
break;
|
||||
case "2":
|
||||
console.log("2");
|
||||
$("#footersiteLeft").css("display", "");
|
||||
$("#footersiteCenter").css("display", "none");
|
||||
$("#footersiteRight").css("display", "");
|
||||
@ -160,7 +157,8 @@ $("#themeFooterTemplate").on("change",function() {
|
||||
$("#footersiteLeft").addClass('col6');
|
||||
$("#footersiteRight").addClass('col6');
|
||||
break;
|
||||
case "3":
|
||||
case "3":
|
||||
console.log("3");
|
||||
$("#footersiteLeft").css("display", "");
|
||||
$("#footersiteCenter").css("display", "");
|
||||
$("#footersiteRight").css("display", "");
|
||||
@ -175,6 +173,50 @@ $("#themeFooterTemplate").on("change",function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Affichage des options possibles
|
||||
// $('#baba').prop('selectedIndex',0);
|
||||
$("#themeFooterSocialsPosition").on("change", function() {
|
||||
if ($("#themeFooterTemplate").val() === "1") {
|
||||
if ($(this).prop('selectedIndex') === 1) {
|
||||
$("#themeFooterTextPosition").prop('selectedIndex',0);
|
||||
$("#themeFooterCopyrightPosition").prop('selectedIndex',0);
|
||||
}
|
||||
}
|
||||
if ($("#themeFooterTemplate").val() === "2") {
|
||||
if ($(this).prop('selectedIndex') === $(this)) {
|
||||
$("#themeFooterTextPosition").prop('selectedIndex',0);
|
||||
$("#themeFooterCopyrightPosition").prop('selectedIndex',0);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#themeFooterTextPosition").on("change", function() {
|
||||
if ($("#themeFooterTemplate").val() === "1") {
|
||||
if ($(this).prop('selectedIndex') === 1) {
|
||||
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
|
||||
$("#themeFooterCopyrightPosition").prop('selectedIndex',0);
|
||||
}
|
||||
}
|
||||
if ($("#themeFooterTemplate").val() === "2") {
|
||||
if ($(this).prop('selectedIndex') === $(this)) {
|
||||
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
|
||||
$("#themeFooterCopyrightPosition").prop('selectedIndex',0);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#themeFooterCopyrightPosition").on("change", function() {
|
||||
if ($("#themeFooterTemplate").val() === "1") {
|
||||
if ($(this).prop('selectedIndex') === 1) {
|
||||
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
|
||||
$("#themeFooterTextPosition").prop('selectedIndex',0);
|
||||
}
|
||||
}
|
||||
if ($("#themeFooterTemplate").val() === "2") {
|
||||
if ($(this).prop('selectedIndex') === $(this)) {
|
||||
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
|
||||
$("#themeFooterTextPosition").prop('selectedIndex',0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
@ -100,6 +100,9 @@
|
||||
<h4>Mise en page</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php
|
||||
$footerBlockPosition = $module::$footerblocks [$this->getData(['theme', 'footer', 'template'])];
|
||||
?>
|
||||
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
|
||||
'label' => 'Nombre de colonnes',
|
||||
'selected' => $this->getData(['theme', 'footer', 'template']),
|
||||
@ -109,10 +112,12 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
|
||||
<p><strong>Contenu personnalisé texte ou HTML :</strong></p>
|
||||
<?php echo template::select('themeFooterTextPosition', $module::$footerblocks, [
|
||||
<?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textPosition'])
|
||||
'selected' => $this->getData(['theme', 'footer', 'textPosition']),
|
||||
'class' => 'themeFooterPosition'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
@ -121,9 +126,10 @@
|
||||
</div>
|
||||
<div class="col4">
|
||||
<p><strong>Réseaux sociaux :</strong></p>
|
||||
<?php echo template::select('themeFooterSocialsPosition', $module::$footerblocks, [
|
||||
<?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsPosition'])
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
|
||||
'class' => 'themeFooterPosition'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
@ -132,9 +138,10 @@
|
||||
</div>
|
||||
<div class="col4">
|
||||
<p><strong>Info et copyright :</strong></p>
|
||||
<?php echo template::select('themeFooterCopyrightPosition', $module::$footerblocks, [
|
||||
<?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition'])
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
|
||||
'class' => 'themeFooterPosition'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
|
Loading…
Reference in New Issue
Block a user