mise à jour diverses

This commit is contained in:
Deltacms 2022-12-26 17:35:06 +01:00
parent ce6ca261d6
commit 39e7dcd2f3
5 changed files with 91 additions and 48 deletions

View File

@ -5,6 +5,7 @@
- Thème / bannière : nouvelle option : une bannière animée avec Swiper,
- Configuration / connexion : nouvelle option permettant de dévoiler le mot de passe,
- Corrections :
- Theme / footer : sélection du template sur une colonne et différents aperçus.
## Version 4.4.02 de Deltacms
- Modifications :

View File

@ -120,8 +120,7 @@ class common {
'tippy',
'zwiico',
'imagemap',
'simplelightbox',
'swiper'
'simplelightbox'
],
'view' => ''
];
@ -1419,21 +1418,26 @@ class common {
* Affiche les blocs
*/
echo '<div class="' . $class['left'] . '" id="footer' . $position . 'Left">';
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { $this->showFooterText(); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { $this->showSocials(); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {$this->showCopyright(); }
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { $this->showFooterText(true); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {$this->showCopyright(true); }
echo '</div>';
echo '<div class="' .$class['center'] . '" id="footer' . $position . 'Center">';
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') { $this->showFooterText(); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') { $this->showSocials(); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') { $this->showCopyright(); }
if($this->getData(['theme', 'footer', 'textPosition']) === 'mcenter') { $this->showFooterText(true); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'mcenter') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'mcenter') { $this->showCopyright(true); }
echo '</div>';
echo '<div class="' . $class['right'] . '" id="footer' . $position .'Right">';
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { $this->showFooterText(); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { $this->showSocials(); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { $this->showCopyright(); }
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { $this->showFooterText(true); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { $this->showCopyright(true); }
echo '</div>';
if($this->getData(['theme', 'footer', 'textPosition']) === 'hide') { $this->showFooterText(false); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'hide') { $this->showSocials(false); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'hide') { $this->showCopyright(false); }
// Fermeture du contenaire
echo '</div></div>';
echo '</footer>';
@ -1442,18 +1446,22 @@ class common {
/**
* Affiche le texte du footer
*/
private function showFooterText() {
private function showFooterText($visibility) {
if($footerText = $this->getData(['theme', 'footer', 'text']) OR $this->getUrl(0) === 'theme') {
echo '<div id="footerText">' . $footerText . '</div>';
$style = '';
if( $visibility === false ) $style = 'style="display: none;"';
echo '<div id="footerText"' . $style . '>' . $footerText . '</div>';
}
}
/**
* Affiche le copyright
*/
private function showCopyright() {
private function showCopyright($visibility) {
$style = '';
if( $visibility === false ) $style = 'style="display: none;"';
// Ouverture Bloc copyright
$items = '<div id="footerCopyright">';
$items = '<div id="footerCopyright"'.$style.'>';
$items .= '<span id="footerFontCopyright">';
// Affichage de motorisé par
$items .= '<span id="footerDisplayCopyright" ';
@ -1530,7 +1538,7 @@ class common {
/**
* Affiche les réseaux sociaux
*/
private function showSocials() {
private function showSocials($visibility) {
$socials = '';
foreach($this->getData(['config', 'social']) as $socialName => $socialId) {
switch($socialName) {
@ -1574,7 +1582,9 @@ class common {
}
}
if($socials !== '') {
echo '<div id="footerSocials">' . $socials . '</div>';
$style = '';
if( $visibility === false ) $style = 'style="display: none;"';
echo '<div id="footerSocials"' . $style . '>' . $socials . '</div>';
}
}
@ -2146,6 +2156,8 @@ class common {
echo '<script>' . helper::minifyJs($vars) . '</script>';
// Librairies
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
// Ajout si bannière animée
if($this->getData(['theme', 'header', 'feature']) === 'swiper') $this->output['vendor'] = array_merge ( $this->output['vendor'] , array('swiper') );
foreach($this->output['vendor'] as $vendorName) {
// Coeur
if(file_exists('core/vendor/' . $vendorName . '/inc.json')) {

View File

@ -123,10 +123,10 @@ $text['core_theme_view']['footer'][43] = 'Alignment with content';
$text['core_theme_view']['footer'][44] = 'Fixed footer';
$text['core_theme_view']['footer'][45] = 'Customised content';
$text['core_theme_view']['footer'][46] = "{
4: {'hide' : 'Hidden', 'left' : 'Top', 'center' : 'Middle', 'right' : 'Bottom'} ,
3: {'hide': 'Hidden', 'left': 'Left', 'center': 'Center', 'right': 'Right'} ,
4: {'hide' : 'Hidden', 'left' : 'Top', 'mcenter' : 'Middle', 'right' : 'Bottom'} ,
3: {'hide': 'Hidden', 'left': 'Left', 'mcenter': 'Center', 'right': 'Right'} ,
2: {'hide': 'Hidden', 'left': 'Left', 'right': 'Right'} ,
1: {'hide': 'Hidden', 'center': 'Display'}
1: {'hide': 'Hidden', 'mcenter': 'Display'}
}";
$text['core_theme_view']['header'][0] = 'Back';
$text['core_theme_view']['header'][1] = 'Help';
@ -336,7 +336,7 @@ $containerWides = [
$footerblocks = [
1 => [
'hide' => 'Hidden',
'center' => 'Center' ],
'mcenter' => 'Center' ],
2 => [
'hide' => 'Hidden',
'left' => 'Left',
@ -344,12 +344,12 @@ $footerblocks = [
3 => [
'hide' => 'Hidden',
'left' => 'Left',
'center' => 'Center',
'mcenter' => 'Center',
'right' => 'Right' ],
4 => [
'hide' => 'Hidden',
'left' => 'Top',
'center' => 'Middle',
'mcenter' => 'Middle',
'right' => 'Bottom' ]
];
$fontWeights = [

View File

@ -123,10 +123,10 @@ $text['core_theme_view']['footer'][43] = 'Alignement avec le contenu';
$text['core_theme_view']['footer'][44] = 'Pied de page fixe';
$text['core_theme_view']['footer'][45] = 'Contenu personnalisé';
$text['core_theme_view']['footer'][46] = "{
4: {'hide' : 'Masqué', 'left' : 'En haut', 'center' : 'Au milieu', 'right' : 'En bas'} ,
3: {'hide': 'Masqué', 'left': 'A gauche', 'center': 'Au centre', 'right': 'A droite'} ,
4: {'hide' : 'Masqué', 'left' : 'En haut', 'mcenter' : 'Au milieu', 'right' : 'En bas'} ,
3: {'hide': 'Masqué', 'left': 'A gauche', 'mcenter': 'Au centre', 'right': 'A droite'} ,
2: {'hide': 'Masqué', 'left': 'A gauche', 'right': 'A droite'} ,
1: {'hide': 'Masqué', 'center': 'Affiché'}
1: {'hide': 'Masqué', 'mcenter': 'Affiché'}
}";
$text['core_theme_view']['header'][0] = 'Retour';
$text['core_theme_view']['header'][1] = 'Aide';
@ -335,7 +335,7 @@ $containerWides = [
$footerblocks = [
1 => [
'hide' => 'Masqué',
'center' => 'Affiché' ],
'mcenter' => 'Affiché' ],
2 => [
'hide' => 'Masqué',
'left' => 'À gauche',
@ -343,12 +343,12 @@ $footerblocks = [
3 => [
'hide' => 'Masqué',
'left' => 'À gauche',
'center' => 'Au centre',
'mcenter' => 'Au centre',
'right' => 'À droite' ],
4 => [
'hide' => 'Masqué',
'left' => 'En haut',
'center' => 'Au milieu',
'mcenter' => 'Au milieu',
'right' => 'En bas' ]
];
$fontWeights = [

View File

@ -14,6 +14,7 @@
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
*/
/**
* Aperçu en direct
*/
@ -75,7 +76,7 @@ $("input, select").on("change", function() {
// Position dans les blocs
// Bloc texte personnalisé
$(".themeFooterContent").on("change",function() {
$(".themeFooterContent, #themeFooterTextPosition, #themeFooterSocialsPosition, #themeFooterCopyrightPosition").on("change",function() {
// Position site ou body
var footerPosition = $("#themeFooterPosition").val();
switch($("#themeFooterTextPosition").val()) {
@ -85,7 +86,17 @@ $(".themeFooterContent").on("change",function() {
default:
// Choix de la position du bloc
textPosition = $("#themeFooterTextPosition").val();
textPosition = textPosition.substr(0,1).toUpperCase()+textPosition.substr(1);
switch( textPosition ){
case "mcenter" :
textPosition = "Center";
break;
case "left" :
textPosition = "Left";
break;
case "right" :
textPosition = "Right";
break;
}
$("#footerText").show().appendTo("#footer" + footerPosition + textPosition);
break;
}
@ -96,7 +107,17 @@ $(".themeFooterContent").on("change",function() {
default:
// Choix de la position du bloc
socialsPosition = $("#themeFooterSocialsPosition").val();
socialsPosition = socialsPosition.substr(0,1).toUpperCase()+socialsPosition.substr(1);
switch( socialsPosition ){
case "mcenter" :
socialsPosition = "Center";
break;
case "left" :
socialsPosition = "Left";
break;
case "right" :
socialsPosition = "Right";
break;
}
$("#footerSocials").show().appendTo("#footer" + footerPosition + socialsPosition);
break;
}
@ -107,14 +128,21 @@ $(".themeFooterContent").on("change",function() {
default:
// Choix de la position du bloc
copyrightPosition = $("#themeFooterCopyrightPosition").val();
copyrightPosition = copyrightPosition.substr(0,1).toUpperCase()+copyrightPosition.substr(1);
switch( copyrightPosition ){
case "mcenter" :
copyrightPosition = "Center";
break;
case "left" :
copyrightPosition = "Left";
break;
case "right" :
copyrightPosition = "Right";
break;
}
$("#footerCopyright").show().appendTo("#footer" + footerPosition + copyrightPosition);
break;
}
}).trigger("change");
// Fin Position dans les blocs
// Modification dynamique de la mise en page
@ -163,15 +191,16 @@ $("#themeFooterTemplate").on("change",function() {
$("#themeFooterSocialsPosition").on("change", function() {
if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterTextPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterTextPosition").prop('selectedIndex',0);
$("#themeFooterTextPosition").prop('selectedIndex',0);
$("#footerText").hide();
}
if ( $("#themeFooterCopyrightPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterCopyrightPosition").prop('selectedIndex',0);
$("#footerCopyright").hide();
}
}
}
}).trigger("change");
$("#themeFooterTextPosition").on("change", function() {
if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
@ -182,21 +211,22 @@ $("#themeFooterTextPosition").on("change", function() {
$("#themeFooterCopyrightPosition").prop('selectedIndex',0);
$("#footerCopyright").hide();
}
}
}
}).trigger("change");
$("#themeFooterCopyrightPosition").on("change", function() {
if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterTextPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterTextPosition").prop('selectedIndex',0);
$("#footerText").hide();
}
if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
$("#footerSocials").hide();
}
if ($(this).prop('selectedIndex') >= 1 ) {
if ( $("#themeFooterTextPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterTextPosition").prop('selectedIndex',0);
$("#footerText").hide();
}
if ( $("#themeFooterSocialsPosition").prop('selectedIndex') === $(this).prop('selectedIndex') ) {
$("#themeFooterSocialsPosition").prop('selectedIndex',0);
$("#footerSocials").hide();
}
}
}).trigger("change");
// Affiche / Cache les options du footer fixe
$("#themeFooterPosition").on("change", function() {
if($(this).val() === 'body') {