Personnalisation du bouton d'aide

This commit is contained in:
SylvainLelievre 2021-05-09 11:19:20 +02:00
parent 612ad106e8
commit c3e436c75e
9 changed files with 34 additions and 16 deletions

View File

@ -479,14 +479,14 @@ $(document).ready(function(){
* *
*/ */
$(".helpDisplayButton").on({ $(".buttonHelp").on({
click: function () { click: function () {
$(".helpDisplayContent").slideToggle(); $(".helpDisplayContent").slideToggle();
if( $(".helpDisplayButton").css('opacity') > '0.75'){ if( $(".buttonHelp").css('opacity') > '0.75'){
$(".helpDisplayButton").css('opacity','0.5'); $(".buttonHelp").css('opacity','0.5');
} }
else{ else{
$(".helpDisplayButton").css('opacity','1'); $(".buttonHelp").css('opacity','1');
} }
} }
}); });

View File

@ -1872,6 +1872,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'] . ';}'; $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'])); $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'] . ';}'; $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'])); $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'] .';}'; $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'])); $colors = helper::colorVariants($this->getData(['admin','backgroundBlockColor']));

View File

@ -1708,11 +1708,5 @@ th.col12 {
-webkit-box-shadow: 5px 5px 11px 0px #222222; -webkit-box-shadow: 5px 5px 11px 0px #222222;
box-shadow: 5px 5px 11px 0px #222222; box-shadow: 5px 5px 11px 0px #222222;
border-radius: 5px; border-radius: 5px;
background-color:#333;
color: white;
z-index: 30; z-index: 30;
} }
.helpDisplayButton {
opacity: 1;
}

View File

@ -10,7 +10,7 @@
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('addonIndexHelp', [ <?php echo template::button('addonIndexHelp', [
'class' => 'helpDisplayButton', 'class' => 'buttonHelp',
'ico' => 'help', 'ico' => 'help',
'value' => 'Aide' 'value' => 'Aide'
]); ?> ]); ?>

View File

@ -0,0 +1,2 @@
<h3>PAGES SPECIALES</h3>
En cours de rédaction.

View File

@ -8,7 +8,14 @@
'value' => 'Accueil' 'value' => 'Accueil'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2">
<?php echo template::button('addonIndexHelp', [
'class' => 'buttonHelp',
'ico' => 'help',
'value' => 'Aide'
]); ?>
</div>
<div class="col2 offset4">
<?php echo template::button('configAdvancedButton', [ <?php echo template::button('configAdvancedButton', [
'href' => helper::baseUrl() . 'config/advanced', 'href' => helper::baseUrl() . 'config/advanced',
'value' => 'Avancée', 'value' => 'Avancée',
@ -19,6 +26,10 @@
<?php echo template::submit('configSubmit'); ?> <?php echo template::submit('configSubmit'); ?>
</div> </div>
</div> </div>
<!-- Aide à propos de la configuration du site, view index -->
<div class="helpDisplayContent">
<?php echo file_get_contents( 'core/module/config/view/index/index.help.html') ;?>
</div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">

View File

@ -210,6 +210,7 @@ class init extends common {
'backgroundColorButtonGrey' => 'rgba(170, 180, 188, 1)', 'backgroundColorButtonGrey' => 'rgba(170, 180, 188, 1)',
'backgroundColorButtonRed' => 'rgba(217, 95, 78, 1)', 'backgroundColorButtonRed' => 'rgba(217, 95, 78, 1)',
'backgroundColorButtonGreen' => 'rgba(162, 223, 57, 1)', 'backgroundColorButtonGreen' => 'rgba(162, 223, 57, 1)',
'backgroundColorButtonHelp' => 'rgba(255, 153, 0, 1)',
'backgroundBlockColor' => 'rgba(236, 239, 241, 1)', 'backgroundBlockColor' => 'rgba(236, 239, 241, 1)',
'borderBlockColor' => 'rgba(190, 202, 209, 1)' 'borderBlockColor' => 'rgba(190, 202, 209, 1)'
], ],
@ -838,4 +839,3 @@ class init extends common {
] ]
]; ];
} }

View File

@ -255,6 +255,7 @@ class theme extends common {
'backgroundColorButtonGrey' => $this->getInput('adminColorGrey'), 'backgroundColorButtonGrey' => $this->getInput('adminColorGrey'),
'backgroundColorButtonRed' => $this->getInput('adminColorRed'), 'backgroundColorButtonRed' => $this->getInput('adminColorRed'),
'backgroundColorButtonGreen'=> $this->getInput('adminColorGreen'), 'backgroundColorButtonGreen'=> $this->getInput('adminColorGreen'),
'backgroundColorButtonHelp'=> $this->getInput('adminColorHelp'),
'fontText' => $this->getInput('adminFontText'), 'fontText' => $this->getInput('adminFontText'),
'fontSize' => $this->getInput('adminFontTextSize'), 'fontSize' => $this->getInput('adminFontTextSize'),
'fontTitle' => $this->getInput('adminFontTitle'), 'fontTitle' => $this->getInput('adminFontTitle'),

View File

@ -59,7 +59,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col4">
<?php echo template::text('adminBackGroundBlockColor', [ <?php echo template::text('adminBackGroundBlockColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.', 'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.',
@ -67,7 +67,7 @@
'value' => $this->getData(['admin', 'backgroundBlockColor']) 'value' => $this->getData(['admin', 'backgroundBlockColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col4">
<?php echo template::text('adminBorderBlockColor', [ <?php echo template::text('adminBorderBlockColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.', 'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.',
@ -75,6 +75,14 @@
'value' => $this->getData(['admin', 'borderBlockColor']) 'value' => $this->getData(['admin', 'borderBlockColor'])
]); ?> ]); ?>
</div> </div>
<div class="col3 offset1">
<?php echo template::text('adminColorHelp', [
'class' => 'colorPicker',
'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.',
'label' => 'Bouton Aide',
'value' => $this->getData(['admin', 'backgroundColorButtonHelp'])
]); ?>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">