From b80eab0939ddd36dcbdfffbc9126bbacd0cdb89e Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 19 Apr 2020 14:58:38 +0200 Subject: [PATCH] 2.19 ajustement de valeurs --- module/gallery/gallery.php | 36 +++++------ module/gallery/ressource/defaultdata.php | 4 +- module/gallery/ressource/theme.css | 1 + module/gallery/ressource/vartheme.css | 0 module/gallery/view/gallery/gallery.css | 5 +- module/gallery/view/index/index.css | 5 +- module/gallery/view/theme/theme.php | 76 +++++++++++------------- 7 files changed, 62 insertions(+), 65 deletions(-) mode change 100644 => 100755 module/gallery/ressource/defaultdata.php mode change 100644 => 100755 module/gallery/ressource/theme.css mode change 100644 => 100755 module/gallery/ressource/vartheme.css diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 6ec0ec14..197ed04e 100755 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -83,11 +83,11 @@ class gallery extends common { public static $galleryThemeBorder = [ '0em' => 'Aucune', - '.1em' => 'Très petite', - '.4em' => 'Petite', - '.5em' => 'Moyenne', - '.8em' => 'Grande', - '1.2em' => 'Très grande' + '.1em' => 'Très fine', + '.2em' => 'Fine', + '.4em' => 'Moyenne', + '.8em' => 'Epaisse', + '1em' => 'Epaisse' ]; public static $galleryThemeOpacity = [ @@ -102,19 +102,19 @@ class gallery extends common { public static $galleryThemeMargin = [ '0em' => 'Aucune', '.1em' => 'Très petite', - '.3em' => 'Petite', + '.4em' => 'Petite', '.6em' => 'Moyenne', - '.9em' => 'Grande', - '1.2em' => 'Très grande' + '1em' => 'Grande', + '2.5em' => 'Très grande' ]; public static $galleryThemeRadius = [ - '0px' => 'Aucun', - '5px' => 'Très léger', - '10px' => 'Léger', - '15px' => 'Moyen', - '25px' => 'Important', - '50px' => 'Très important' + '0em' => 'Aucun', + '.3em' => 'Très léger', + '.6em' => 'Léger', + '.9em' => 'Moyen', + '1.2' => 'Important', + '2.em' => 'Très important' ]; public static $galleryThemeShadows = [ @@ -627,13 +627,13 @@ class gallery extends common { $content = str_replace('#legendHeight#',$this->getinput('galleryThemeLegendHeight'),$content ); $content = str_replace('#legendTextColor#',$this->getinput('galleryThemeLegendTextColor'),$content ); $content = str_replace('#legendBgColor#',$this->getinput('galleryThemeLegendBgColor'),$content ); - file_put_contents('module/gallery/view/index/index.css',$content . $themeCss); - file_put_contents('module/gallery/view/gallery/gallery.css',$content . $themeCss); + $success = file_put_contents('module/gallery/view/index/index.css',$content . $themeCss); + $success = $success && file_put_contents('module/gallery/view/gallery/gallery.css',$content . $themeCss); // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . $this->getUrl() . '/theme', - 'notification' => 'Modifications enregistrées', - 'state' => true + 'notification' => $succes ? 'Modifications enregistrées' : 'Modifications non enregistées !', + 'state' => $success ]); } // Valeurs en sortie diff --git a/module/gallery/ressource/defaultdata.php b/module/gallery/ressource/defaultdata.php old mode 100644 new mode 100755 index e9f9e134..a058126b --- a/module/gallery/ressource/defaultdata.php +++ b/module/gallery/ressource/defaultdata.php @@ -8,8 +8,8 @@ class theme extends gallery { 'thumbBorder' => '.1em', 'thumbOpacity' => '.7', 'thumbBorderColor' => 'rgba(221, 221, 221, 1)', - 'thumbRadius' => '5px', - 'thumbShadows' => '1px 1px 5px', + 'thumbRadius' => '.3em', + 'thumbShadows' => '1px 1px 10px', 'legendHeight' => '.375em', 'legendAlign' => 'center', 'legendTextColor' => 'rgba(255, 255, 255, 1)', diff --git a/module/gallery/ressource/theme.css b/module/gallery/ressource/theme.css old mode 100644 new mode 100755 index 064a30f7..12b92e4d --- a/module/gallery/ressource/theme.css +++ b/module/gallery/ressource/theme.css @@ -22,6 +22,7 @@ left: 0; right: 0; bottom: 0; + border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2); padding: var(--legendHeight); background: var(--legendBgColor); color: var(--legendTextColor); diff --git a/module/gallery/ressource/vartheme.css b/module/gallery/ressource/vartheme.css old mode 100644 new mode 100755 diff --git a/module/gallery/view/gallery/gallery.css b/module/gallery/view/gallery/gallery.css index 3f7315aa..7e4bddad 100644 --- a/module/gallery/view/gallery/gallery.css +++ b/module/gallery/view/gallery/gallery.css @@ -10,12 +10,12 @@ --thumbHeight: 15em; --thumbBorder: .1em; --thumbBorderColor: rgba(221, 221, 221, 1); - --thumbRadius: 5px; + --thumbRadius: .6em; --thumbShadows: 1px 1px 5px; } .galleryName, .galleryGalleryName { - --legendHeight: .375em; + --legendHeight: .25em; --legendAlign: center; --legendTextColor: rgba(255, 255, 255, 1); --legendBgColor: rgba(0, 0, 0, .6); @@ -48,6 +48,7 @@ left: 0; right: 0; bottom: 0; + border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2); padding: var(--legendHeight); background: var(--legendBgColor); color: var(--legendTextColor); diff --git a/module/gallery/view/index/index.css b/module/gallery/view/index/index.css index 3f7315aa..7e4bddad 100644 --- a/module/gallery/view/index/index.css +++ b/module/gallery/view/index/index.css @@ -10,12 +10,12 @@ --thumbHeight: 15em; --thumbBorder: .1em; --thumbBorderColor: rgba(221, 221, 221, 1); - --thumbRadius: 5px; + --thumbRadius: .6em; --thumbShadows: 1px 1px 5px; } .galleryName, .galleryGalleryName { - --legendHeight: .375em; + --legendHeight: .25em; --legendAlign: center; --legendTextColor: rgba(255, 255, 255, 1); --legendBgColor: rgba(0, 0, 0, .6); @@ -48,6 +48,7 @@ left: 0; right: 0; bottom: 0; + border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2); padding: var(--legendHeight); background: var(--legendBgColor); color: var(--legendTextColor); diff --git a/module/gallery/view/theme/theme.php b/module/gallery/view/theme/theme.php index c53eb401..0f7c6fb7 100755 --- a/module/gallery/view/theme/theme.php +++ b/module/gallery/view/theme/theme.php @@ -17,27 +17,25 @@

Configuration des vignettes

-
+
'Largeur', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbWidth']) ]); ?>
-
+
'Hauteur', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbHeight']) ]); ?>
-
-
-
+
'Alignement', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbAlign']) ]); ?>
-
+
'Marges', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbMargin']) @@ -45,42 +43,40 @@
-
+
'Bordures', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbBorder']) ]); ?>
-
- 'Opacité au survol', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbOpacity']) - ]); ?> -
-
-
-
- 'Bords arrondis', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbRadius']) - ]); ?> -
-
- 'Ombres', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbShadows']) - ]); ?> -
-
-
-
+
'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', 'label' => 'Couleur de la bordure', 'value' => $this->getData(['theme', $this->getUrl(0),'thumbBorderColor']) ]); ?> -
+
+
+ 'Bords arrondis', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbRadius']) + ]); ?> +
+
+
+
+ 'Opacité au survol', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbOpacity']) + ]); ?> +
+
+ 'Ombres', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbShadows']) + ]); ?> +
@@ -90,7 +86,7 @@

Configuration des légendes

-
+
'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', @@ -98,7 +94,7 @@ 'value' => $this->getData(['theme', $this->getUrl(0),'legendTextColor']) ]); ?>
-
+
'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', @@ -106,19 +102,17 @@ 'value' => $this->getData(['theme', $this->getUrl(0),'legendBgColor']) ]); ?>
-
-
-
+
'Hauteur', 'selected' => $this->getData(['theme', $this->getUrl(0),'legendHeight']) ]); ?>
-
- 'Alignement:', - 'selected' => $this->getData(['theme', $this->getUrl(0),'legendAlign']) - ]); ?> +
+ 'Alignement:', + 'selected' => $this->getData(['theme', $this->getUrl(0),'legendAlign']) + ]); ?>