From 7157e43bafb5637d885767cf49546f4cda976b64 Mon Sep 17 00:00:00 2001 From: SylvainLelievre Date: Sun, 9 May 2021 10:41:19 +0200 Subject: [PATCH] Personnalisation du bouton d'aide --- core/core.js.php | 8 ++++---- core/core.php | 6 ++++-- core/layout/common.css | 4 ---- core/module/addon/view/index/index.php | 3 +-- core/module/addon/view/upload/upload.php | 4 ++-- core/module/config/view/index/index.help.html | 2 ++ core/module/config/view/index/index.php | 13 ++++++++++++- core/module/install/ressource/defaultdata.php | 2 +- core/module/theme/theme.php | 1 + core/module/theme/view/admin/admin.php | 14 +++++++++++--- 10 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 core/module/config/view/index/index.help.html diff --git a/core/core.js.php b/core/core.js.php index 50aaa3db..cf0b1352 100755 --- a/core/core.js.php +++ b/core/core.js.php @@ -478,14 +478,14 @@ $(document).ready(function(){ * Active le système d'aide interne * */ - $(".helpDisplayButton").on({ + $(".buttonHelp").on({ click: function () { $(".helpDisplayContent").slideToggle(); - if( $(".helpDisplayButton").css('opacity') > '0.75'){ - $(".helpDisplayButton").css('opacity','0.5'); + if( $(".buttonHelp").css('opacity') > '0.75'){ + $(".buttonHelp").css('opacity','0.5'); } else{ - $(".helpDisplayButton").css('opacity','1'); + $(".buttonHelp").css('opacity','1'); } } }); diff --git a/core/core.php b/core/core.php index 76248670..c2a6eee5 100755 --- a/core/core.php +++ b/core/core.php @@ -1047,7 +1047,7 @@ class common { $success = true; // Boucler dans le dossier source en l'absence d'échec de lecture écriture - while( $success + while( $success AND $file = readdir($dir) ) { if (( $file != '.' ) && ( $file != '..' )) { if ( is_dir($src . '/' . $file) ){ @@ -1704,7 +1704,7 @@ class common { $this->setData(['config', 'i18n','nl', false ]); $this->setData(['config', 'i18n','pt', false ]); - // Supprimer les fichiers de backup + // Supprimer les fichiers de backup if (file_exists('site/data/.backup')) unlink('site/data/.backup'); $path = realpath('site/data'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename) @@ -1971,6 +1971,8 @@ class core extends common { $css .= '.button.buttonGrey {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGrey:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonGrey:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}'; $colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonRed'])); $css .= '.button.buttonRed {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonRed:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonRed:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}'; + $colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonHelp'])); + $css .= '.button.buttonHelp {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonHelp:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonHelp:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}'; $colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGreen'])); $css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}'; $colors = helper::colorVariants($this->getData(['admin','backgroundBlockColor'])); diff --git a/core/layout/common.css b/core/layout/common.css index 22cf9e81..99404a64 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -1738,7 +1738,3 @@ th.col12 { //color: white; z-index: 30; } - -.helpDisplayButton { - opacity: 1; -} diff --git a/core/module/addon/view/index/index.php b/core/module/addon/view/index/index.php index c65ad9e0..5b868422 100644 --- a/core/module/addon/view/index/index.php +++ b/core/module/addon/view/index/index.php @@ -9,7 +9,7 @@
'helpDisplayButton', + 'class' => 'buttonHelp', 'ico' => 'help', 'value' => 'Aide' ]); ?> @@ -29,7 +29,6 @@
-
diff --git a/core/module/addon/view/upload/upload.php b/core/module/addon/view/upload/upload.php index a33a39ff..5fcd7cdc 100644 --- a/core/module/addon/view/upload/upload.php +++ b/core/module/addon/view/upload/upload.php @@ -10,7 +10,7 @@
'helpDisplayButton', + 'class' => 'buttonHelp', 'ico' => 'help', 'value' => 'Aide' ]); ?> @@ -22,7 +22,7 @@ ]); ?>
- +
diff --git a/core/module/config/view/index/index.help.html b/core/module/config/view/index/index.help.html new file mode 100644 index 00000000..acb4625c --- /dev/null +++ b/core/module/config/view/index/index.help.html @@ -0,0 +1,2 @@ +

PAGES SPECIALES

+En cours de rédaction. diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index ed0e2053..efd10a62 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -8,7 +8,14 @@ 'value' => 'Accueil' ]); ?> -
+
+ 'buttonHelp', + 'ico' => 'help', + 'value' => 'Aide' + ]); ?> +
+
helper::baseUrl() . 'config/advanced', 'value' => 'Configuration avancée', @@ -19,6 +26,10 @@
+ +
+ +
diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 792d3ac9..0d9c32df 100755 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -211,6 +211,7 @@ class init extends common { 'backgroundColorButtonGrey' => 'rgba(170, 180, 188, 1)', 'backgroundColorButtonRed' => 'rgba(217, 95, 78, 1)', 'backgroundColorButtonGreen' => 'rgba(162, 223, 57, 1)', + 'backgroundColorButtonHelp' => 'rgba(255, 153, 0, 1)', 'backgroundBlockColor' => 'rgba(236, 239, 241, 1)', 'borderBlockColor' => 'rgba(190, 202, 209, 1)' ], @@ -839,4 +840,3 @@ class init extends common { ] ]; } - diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 3dae5e3b..25c90b94 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -255,6 +255,7 @@ class theme extends common { 'backgroundColorButtonGrey' => $this->getInput('adminColorGrey'), 'backgroundColorButtonRed' => $this->getInput('adminColorRed'), 'backgroundColorButtonGreen'=> $this->getInput('adminColorGreen'), + 'backgroundColorButtonHelp'=> $this->getInput('adminColorHelp'), 'fontText' => $this->getInput('adminFontText'), 'fontSize' => $this->getInput('adminFontTextSize'), 'fontTitle' => $this->getInput('adminFontTitle'), diff --git a/core/module/theme/view/admin/admin.php b/core/module/theme/view/admin/admin.php index 46c20ff3..1ab92938 100755 --- a/core/module/theme/view/admin/admin.php +++ b/core/module/theme/view/admin/admin.php @@ -59,7 +59,7 @@
-
+
'colorPicker', 'help' => 'Couleur visible en l\'absence d\'une image.
Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.', @@ -67,7 +67,7 @@ 'value' => $this->getData(['admin', 'backgroundBlockColor']) ]); ?>
-
+
'colorPicker', 'help' => 'Couleur visible en l\'absence d\'une image.
Le curseur horizontal règle le niveau de transparence.', @@ -75,6 +75,14 @@ 'value' => $this->getData(['admin', 'borderBlockColor']) ]); ?>
+
+ 'colorPicker', + 'help' => 'Couleur visible en l\'absence d\'une image.
Le curseur horizontal règle le niveau de transparence.', + 'label' => 'Bouton Aide', + 'value' => $this->getData(['admin', 'backgroundColorButtonHelp']) + ]); ?> +
@@ -143,4 +151,4 @@
- \ No newline at end of file +