From c59f68b455e97b4078c801d9399b489c6dbb1759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Wed, 23 Mar 2022 18:18:48 +0100 Subject: [PATCH] Galerie 3.5 avec supp espace et option showPageContent --- CHANGES.md | 5 +- module/gallery/gallery.php | 8 +- module/gallery/view/edit/edit.js.php | 6 +- module/gallery/view/edit/edit.php | 95 ++++++++++++---------- module/gallery/view/gallery/gallery.js.php | 4 +- module/gallery/view/gallery/gallery.php | 28 ++++--- 6 files changed, 79 insertions(+), 67 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d80f527c..558bc7d2 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,9 @@ - Prise en charge des fontes Web Safe. Les fontes initiales sont transférées dans les fontes optionnelles, donc effaçables. - Toutes les fontes sont désormais acceptées quelque soit le CDN, Google Fonte (avec preconnect) ou CDN Fontes. - Configuration de la bannière, modalité d'affichage de la taille d'image recommandée et affichage des dimensions de l'image. + - Galerie, version 3.5 : + - Possibilité d'afficher le contenu de la page lorsque le module ne contient qu'une galerie et que sont contenu est affiché directement. + - Déplacement du bouton de retour à la liste des galeries en bas de l'écran. ## Corrections : - Module blog : taille recommandée de l'image erronée lorsque la largeur de l'écran est réglée sur fluide (100%). - Gestion des pages : positionnement dans le menu accessoire ou dans le menu standard. @@ -13,7 +16,7 @@ ### Correction : - Module galerie, option plein écran inopérante. ### Amélioration : - - Module galerie, lorsque le module ne cotient qu'une galerie, la page listant les galeries est omise. + - Module galerie, lorsque le module ne contient qu'une galerie, la page listant les galeries est omise. ## Version 11.3.06 ### Corrections : diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 33cb5cd6..3c778768 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -17,7 +17,7 @@ class gallery extends common { - const VERSION = '3.4'; + const VERSION = '3.5'; const REALNAME = 'Galerie'; const DELETE = true; const UPDATE = '0.0'; @@ -510,7 +510,8 @@ class gallery extends common { // pas de positions, on active le tri alpha 'sort' => $this->getInput('galleryEditSort'), 'position' => $this->getData(['module', $this->getUrl(0), 'content', $galleryId,'config','position']), - 'fullScreen' => $this->getInput('galleryEditFullscreen', helper::FILTER_BOOLEAN) + 'fullScreen' => $this->getInput('galleryEditFullscreen', helper::FILTER_BOOLEAN), + 'showPageContent' => $this->getInput('galleryEditShowPageContent', helper::FILTER_BOOLEAN) ], 'legend' => $legends, @@ -669,7 +670,8 @@ class gallery extends common { 'showBarEditButton' => true, 'title' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'name']), 'view' => 'gallery', - 'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style']) + 'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style']), + 'showPageContent' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'showPageContent']), ]); } // Pas d'image dans la galerie diff --git a/module/gallery/view/edit/edit.js.php b/module/gallery/view/edit/edit.js.php index faa93b52..e8f3ad9a 100644 --- a/module/gallery/view/edit/edit.js.php +++ b/module/gallery/view/edit/edit.js.php @@ -51,7 +51,7 @@ directoryDOM.on("change", function() { directoryOldDOM.val($(this).val()); }); -$('.homePicture').click(function(){ +$('.homePicture').click(function(){ $('.homePicture').prop('checked', false); $(this).prop('checked', true); }); @@ -62,11 +62,11 @@ $('.homePicture').click(function(){ $( document ).ready(function() { - $("#galleryTable").tableDnD({ + $("#galleryTable").tableDnD({ onDrop: function(table, row) { $("#galleryEditFormResponse").val($.tableDnD.serialize()); }, - onDragStop : function(table, row) { + onDragStop : function(table, row) { // Sauvegarde le tri sortPictures(); $("#galleryEditFormResponse").val(""); diff --git a/module/gallery/view/edit/edit.php b/module/gallery/view/edit/edit.php index df001bf7..2b2b4a0d 100644 --- a/module/gallery/view/edit/edit.php +++ b/module/gallery/view/edit/edit.php @@ -15,55 +15,60 @@
-

Paramètre des images

-
-
- 'Nom', - 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']) - ]); ?> -
-
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']), - 'noDirty' => true // Désactivé à cause des modifications en ajax - ]); ?> - 'Dossier cible', - 'noDirty' => true // Désactivé à cause des modifications en ajax - ]); ?> -
-
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']), - 'label' => 'Tri des images', - 'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.' - ]); ?> -
-
-
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']), - 'help' => 'A l\'ouverture de la galerie, la première image est affichée en plein écran.' - ]); ?> -
+

Paramètre des images

+
+
+ 'Nom', + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']) + ]); ?>
-
-
- - 'galleryTable'], $module::$picturesId ); ?> - - $this->getUrl(2)]); ?> - - - -
+
+ $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']), + 'noDirty' => true // Désactivé à cause des modifications en ajax + ]); ?> + 'Dossier cible', + 'noDirty' => true // Désactivé à cause des modifications en ajax + ]); ?> +
+
+ $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']), + 'label' => 'Tri des images', + 'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.' + ]); ?> +
+
+
+
+ $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']), + 'help' => 'A l\'ouverture de la galerie, la première image est affichée en plein écran.' + ]); ?> +
+
+ $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'showPageContent']), + 'help' => 'Le contenu de la page est toujours affiché dans la liste des galeries. Quand une seule galerie est disponible, il est possible de l\'afficher directement, cette option est utile dans ce cas précis.' + ]); ?>
- -
Version n° - +
+
+ + 'galleryTable'], $module::$picturesId ); ?> + + $this->getUrl(2)]); ?> + + +
+
+
Version n° + +
diff --git a/module/gallery/view/gallery/gallery.js.php b/module/gallery/view/gallery/gallery.js.php index 41ffccb0..07077f07 100644 --- a/module/gallery/view/gallery/gallery.js.php +++ b/module/gallery/view/gallery/gallery.js.php @@ -16,7 +16,7 @@ * Galerie d'image * SLB est activé pour tout le site */ -var b = new SimpleLightbox('.galleryGalleryPicture', { +var b = new SimpleLightbox('.galleryGalleryPicture', { captionSelector: "self", captionType: "data", captionsData: "caption", @@ -24,7 +24,7 @@ var b = new SimpleLightbox('.galleryGalleryPicture', { }); $( document ).ready(function() { - // Démarre en mode plein écran + // Démarre en mode plein écran if ( $("#pictureContainer").hasClass("fullScreen") ) { $('a#homePicture')[0].click(); } diff --git a/module/gallery/view/gallery/gallery.php b/module/gallery/view/gallery/gallery.php index 893bd115..c3076a7c 100644 --- a/module/gallery/view/gallery/gallery.php +++ b/module/gallery/view/gallery/gallery.php @@ -1,16 +1,6 @@ - -
-
- 'buttonGrey', - 'href' => helper::baseUrl() . $this->getUrl(0), - 'ico' => 'left', - 'value' => 'Retour' - ]); ?> -
-
- + +
$legend): ?>
@@ -27,4 +17,16 @@
-
\ No newline at end of file +
+ +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . $this->getUrl(0), + 'ico' => 'left', + 'value' => 'Retour' + ]); ?> +
+
+ \ No newline at end of file