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, - 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, - Configuration / connexion : nouvelle option permettant de dévoiler le mot de passe,
- Corrections : - Corrections :
- Theme / footer : sélection du template sur une colonne et différents aperçus.
## Version 4.4.02 de Deltacms ## Version 4.4.02 de Deltacms
- Modifications : - Modifications :

View File

@ -120,8 +120,7 @@ class common {
'tippy', 'tippy',
'zwiico', 'zwiico',
'imagemap', 'imagemap',
'simplelightbox', 'simplelightbox'
'swiper'
], ],
'view' => '' 'view' => ''
]; ];
@ -1419,21 +1418,26 @@ class common {
* Affiche les blocs * Affiche les blocs
*/ */
echo '<div class="' . $class['left'] . '" id="footer' . $position . 'Left">'; echo '<div class="' . $class['left'] . '" id="footer' . $position . 'Left">';
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { $this->showFooterText(); } if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { $this->showFooterText(true); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { $this->showSocials(); } if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {$this->showCopyright(); } if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {$this->showCopyright(true); }
echo '</div>'; echo '</div>';
echo '<div class="' .$class['center'] . '" id="footer' . $position . 'Center">'; echo '<div class="' .$class['center'] . '" id="footer' . $position . 'Center">';
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') { $this->showFooterText(); } if($this->getData(['theme', 'footer', 'textPosition']) === 'mcenter') { $this->showFooterText(true); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') { $this->showSocials(); } if($this->getData(['theme', 'footer', 'socialsPosition']) === 'mcenter') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') { $this->showCopyright(); } if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'mcenter') { $this->showCopyright(true); }
echo '</div>'; echo '</div>';
echo '<div class="' . $class['right'] . '" id="footer' . $position .'Right">'; echo '<div class="' . $class['right'] . '" id="footer' . $position .'Right">';
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { $this->showFooterText(); } if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { $this->showFooterText(true); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { $this->showSocials(); } if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { $this->showCopyright(); } if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { $this->showCopyright(true); }
echo '</div>'; 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 // Fermeture du contenaire
echo '</div></div>'; echo '</div></div>';
echo '</footer>'; echo '</footer>';
@ -1442,18 +1446,22 @@ class common {
/** /**
* Affiche le texte du footer * Affiche le texte du footer
*/ */
private function showFooterText() { private function showFooterText($visibility) {
if($footerText = $this->getData(['theme', 'footer', 'text']) OR $this->getUrl(0) === 'theme') { 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 * Affiche le copyright
*/ */
private function showCopyright() { private function showCopyright($visibility) {
$style = '';
if( $visibility === false ) $style = 'style="display: none;"';
// Ouverture Bloc copyright // Ouverture Bloc copyright
$items = '<div id="footerCopyright">'; $items = '<div id="footerCopyright"'.$style.'>';
$items .= '<span id="footerFontCopyright">'; $items .= '<span id="footerFontCopyright">';
// Affichage de motorisé par // Affichage de motorisé par
$items .= '<span id="footerDisplayCopyright" '; $items .= '<span id="footerDisplayCopyright" ';
@ -1530,7 +1538,7 @@ class common {
/** /**
* Affiche les réseaux sociaux * Affiche les réseaux sociaux
*/ */
private function showSocials() { private function showSocials($visibility) {
$socials = ''; $socials = '';
foreach($this->getData(['config', 'social']) as $socialName => $socialId) { foreach($this->getData(['config', 'social']) as $socialName => $socialId) {
switch($socialName) { switch($socialName) {
@ -1574,7 +1582,9 @@ class common {
} }
} }
if($socials !== '') { 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>'; echo '<script>' . helper::minifyJs($vars) . '</script>';
// Librairies // Librairies
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']); $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) { foreach($this->output['vendor'] as $vendorName) {
// Coeur // Coeur
if(file_exists('core/vendor/' . $vendorName . '/inc.json')) { 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'][44] = 'Fixed footer';
$text['core_theme_view']['footer'][45] = 'Customised content'; $text['core_theme_view']['footer'][45] = 'Customised content';
$text['core_theme_view']['footer'][46] = "{ $text['core_theme_view']['footer'][46] = "{
4: {'hide' : 'Hidden', 'left' : 'Top', 'center' : 'Middle', 'right' : 'Bottom'} , 4: {'hide' : 'Hidden', 'left' : 'Top', 'mcenter' : 'Middle', 'right' : 'Bottom'} ,
3: {'hide': 'Hidden', 'left': 'Left', 'center': 'Center', 'right': 'Right'} , 3: {'hide': 'Hidden', 'left': 'Left', 'mcenter': 'Center', 'right': 'Right'} ,
2: {'hide': 'Hidden', 'left': 'Left', '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'][0] = 'Back';
$text['core_theme_view']['header'][1] = 'Help'; $text['core_theme_view']['header'][1] = 'Help';
@ -336,7 +336,7 @@ $containerWides = [
$footerblocks = [ $footerblocks = [
1 => [ 1 => [
'hide' => 'Hidden', 'hide' => 'Hidden',
'center' => 'Center' ], 'mcenter' => 'Center' ],
2 => [ 2 => [
'hide' => 'Hidden', 'hide' => 'Hidden',
'left' => 'Left', 'left' => 'Left',
@ -344,12 +344,12 @@ $footerblocks = [
3 => [ 3 => [
'hide' => 'Hidden', 'hide' => 'Hidden',
'left' => 'Left', 'left' => 'Left',
'center' => 'Center', 'mcenter' => 'Center',
'right' => 'Right' ], 'right' => 'Right' ],
4 => [ 4 => [
'hide' => 'Hidden', 'hide' => 'Hidden',
'left' => 'Top', 'left' => 'Top',
'center' => 'Middle', 'mcenter' => 'Middle',
'right' => 'Bottom' ] 'right' => 'Bottom' ]
]; ];
$fontWeights = [ $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'][44] = 'Pied de page fixe';
$text['core_theme_view']['footer'][45] = 'Contenu personnalisé'; $text['core_theme_view']['footer'][45] = 'Contenu personnalisé';
$text['core_theme_view']['footer'][46] = "{ $text['core_theme_view']['footer'][46] = "{
4: {'hide' : 'Masqué', 'left' : 'En haut', 'center' : 'Au milieu', 'right' : 'En bas'} , 4: {'hide' : 'Masqué', 'left' : 'En haut', 'mcenter' : 'Au milieu', 'right' : 'En bas'} ,
3: {'hide': 'Masqué', 'left': 'A gauche', 'center': 'Au centre', 'right': 'A droite'} , 3: {'hide': 'Masqué', 'left': 'A gauche', 'mcenter': 'Au centre', 'right': 'A droite'} ,
2: {'hide': 'Masqué', 'left': 'A gauche', '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'][0] = 'Retour';
$text['core_theme_view']['header'][1] = 'Aide'; $text['core_theme_view']['header'][1] = 'Aide';
@ -335,7 +335,7 @@ $containerWides = [
$footerblocks = [ $footerblocks = [
1 => [ 1 => [
'hide' => 'Masqué', 'hide' => 'Masqué',
'center' => 'Affiché' ], 'mcenter' => 'Affiché' ],
2 => [ 2 => [
'hide' => 'Masqué', 'hide' => 'Masqué',
'left' => 'À gauche', 'left' => 'À gauche',
@ -343,12 +343,12 @@ $footerblocks = [
3 => [ 3 => [
'hide' => 'Masqué', 'hide' => 'Masqué',
'left' => 'À gauche', 'left' => 'À gauche',
'center' => 'Au centre', 'mcenter' => 'Au centre',
'right' => 'À droite' ], 'right' => 'À droite' ],
4 => [ 4 => [
'hide' => 'Masqué', 'hide' => 'Masqué',
'left' => 'En haut', 'left' => 'En haut',
'center' => 'Au milieu', 'mcenter' => 'Au milieu',
'right' => 'En bas' ] 'right' => 'En bas' ]
]; ];
$fontWeights = [ $fontWeights = [

View File

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