From 10c3d01597800978bf5a74eab76f002a00141ccb Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 21 Mar 2022 10:01:54 +0100 Subject: [PATCH 1/4] changes --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 95ab67b9..e14518b1 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ ## Version 11.3.06 ### Corrections : - - Bug d'affichage des blocs de présentation. + - Bug d'affichage des blocs de présentation dans la configuration du site. - Double déclaration d'une fonte locale. ### Améliorations : - Sauvegarde des fontes avec le thème. From ad7001eeb7f43acb557a24d8878cf0c1972b7e16 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 22 Mar 2022 13:55:26 +0100 Subject: [PATCH 2/4] =?UTF-8?q?gammery=203.4=20d=C3=A9marrage=20en=20mode?= =?UTF-8?q?=20plein=20=C3=A9cran=20inop=C3=A9rant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/gallery/gallery.php | 2 +- module/gallery/view/gallery/gallery.js.php | 2 +- module/gallery/view/gallery/gallery.php | 3 ++- module/gallery/view/index/index.php | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 37a8a0df..67483a83 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -17,7 +17,7 @@ class gallery extends common { - const VERSION = '3.3'; + const VERSION = '3.4'; const REALNAME = 'Galerie'; const DELETE = true; const UPDATE = '0.0'; diff --git a/module/gallery/view/gallery/gallery.js.php b/module/gallery/view/gallery/gallery.js.php index 17bf31bc..a452fdf1 100644 --- a/module/gallery/view/gallery/gallery.js.php +++ b/module/gallery/view/gallery/gallery.js.php @@ -25,7 +25,7 @@ var b = new SimpleLightbox('.galleryGalleryPicture', { $( document ).ready(function() { // Démarre en mode plein écran - var fullscreen = getData(['module', $this->getUrl(0), $this->getUrl(1), 'config', 'fullScreen'])); ?>; + var fullscreen = getData(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','fullScreen'])); ?>; if ( fullscreen === true) { $('a#homePicture')[0].click(); } diff --git a/module/gallery/view/gallery/gallery.php b/module/gallery/view/gallery/gallery.php index 9e617583..2783a3f5 100644 --- a/module/gallery/view/gallery/gallery.php +++ b/module/gallery/view/gallery/gallery.php @@ -11,9 +11,10 @@
$legend): ?>
+ getData(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','fullScreen'])); ?> getdata(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','homePicture']) ) { + getData(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','homePicture'])) > 0) { echo 'id="homePicture"'; } ?> class="galleryGalleryPicture" style="background-image:url('')" diff --git a/module/gallery/view/index/index.php b/module/gallery/view/index/index.php index e59bddb4..4e98d3a1 100644 --- a/module/gallery/view/index/index.php +++ b/module/gallery/view/index/index.php @@ -1,7 +1,6 @@
$gallery): ?> -
Date: Tue, 22 Mar 2022 15:46:18 +0100 Subject: [PATCH 3/4] supprimer commentaire --- module/gallery/view/gallery/gallery.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/gallery/view/gallery/gallery.php b/module/gallery/view/gallery/gallery.php index 2783a3f5..00c226e7 100644 --- a/module/gallery/view/gallery/gallery.php +++ b/module/gallery/view/gallery/gallery.php @@ -11,7 +11,6 @@
$legend): ?>
- getData(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','fullScreen'])); ?> getData(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','homePicture'])) > 0) { From 8e17734144d93d8d114cd9a886ce2eae528eda8f Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 22 Mar 2022 16:53:01 +0100 Subject: [PATCH 4/4] Mono galerie avec fullscreen ok --- module/gallery/gallery.php | 26 +++++++++++++++------- module/gallery/view/gallery/gallery.js.php | 5 ++--- module/gallery/view/gallery/gallery.php | 8 ++++--- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 67483a83..637facb5 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -42,6 +42,8 @@ class gallery extends common { public static $thumbs = []; + public static $config = []; + public static $actions = [ 'config' => self::GROUP_MODERATOR, 'delete' => self::GROUP_MODERATOR, @@ -600,11 +602,14 @@ class gallery extends common { // Mise à jour des données de module $this->update(); - + // Une seule galerie, bifurquer sur celle-ci + $gallery = count($this->getData(['module', $this->getUrl(0), 'content'])) === 1 + ? array_key_first($this->getData(['module', $this->getUrl(0), 'content'])) + : $this->getUrl(1); // Images d'une galerie - if($this->getUrl(1)) { + if($gallery) { // La galerie n'existe pas - if($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1)]) === null) { + if($this->getData(['module', $this->getUrl(0), 'content', $gallery]) === null) { // Valeurs en sortie $this->addOutput([ 'access' => false @@ -613,13 +618,17 @@ class gallery extends common { // La galerie existe else { // Images de la galerie - $directory = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'config', 'directory']); + $directory = $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'directory']); + // Définir les options + self::$config['homePicture'] = $this->getData(['module',$this->getUrl(0),'content', $gallery,'config','homePicture']); + self::$config['fullScreen'] = $this->getData(['module',$this->getUrl(0),'content', $gallery,'config','fullScreen']) === true ? 'fullScreen' : ''; + self::$config['mono'] = count($this->getData(['module', $this->getUrl(0), 'content'])) === 1; if(is_dir($directory)) { $iterator = new DirectoryIterator($directory); foreach($iterator as $fileInfos) { if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) { - self::$pictures[$directory . '/' . $fileInfos->getFilename()] = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'legend', str_replace('.','',$fileInfos->getFilename())]); - $picturesSort[$directory . '/' . $fileInfos->getFilename()] = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'positions', str_replace('.','',$fileInfos->getFilename())]); + self::$pictures[$directory . '/' . $fileInfos->getFilename()] = $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.','',$fileInfos->getFilename())]); + $picturesSort[$directory . '/' . $fileInfos->getFilename()] = $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'positions', str_replace('.','',$fileInfos->getFilename())]); // Créer la miniature si manquante if (!file_exists( str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) { $this->makeThumb($fileInfos->getPathname(), @@ -630,10 +639,11 @@ class gallery extends common { self::$thumbs[$directory . '/' . $fileInfos->getFilename()] = file_exists( str_replace('source','thumb',$directory) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename())) ? str_replace('source','thumb',$directory) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()) : str_replace('source','thumb',$directory) . '/' . strtolower($fileInfos->getFilename()); + } } // Tri des images par ordre alphabétique - switch ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'config', 'sort'])) { + switch ($this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'sort'])) { case self::SORT_HAND: asort($picturesSort); if ($picturesSort) { @@ -657,7 +667,7 @@ class gallery extends common { // Valeurs en sortie $this->addOutput([ 'showBarEditButton' => true, - 'title' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'config', 'name']), + 'title' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'name']), 'view' => 'gallery', 'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style']) ]); diff --git a/module/gallery/view/gallery/gallery.js.php b/module/gallery/view/gallery/gallery.js.php index a452fdf1..41ffccb0 100644 --- a/module/gallery/view/gallery/gallery.js.php +++ b/module/gallery/view/gallery/gallery.js.php @@ -24,9 +24,8 @@ var b = new SimpleLightbox('.galleryGalleryPicture', { }); $( document ).ready(function() { - // Démarre en mode plein écran - var fullscreen = getData(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','fullScreen'])); ?>; - if ( fullscreen === true) { + // 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 00c226e7..893bd115 100644 --- a/module/gallery/view/gallery/gallery.php +++ b/module/gallery/view/gallery/gallery.php @@ -1,3 +1,5 @@ + +
-