[9.0.01] Retour du backgroundcolor picker avec une image

This commit is contained in:
fredtempez 2019-03-04 23:02:24 +01:00
parent 96775d5465
commit fa828215ca
3 changed files with 2 additions and 18 deletions

View File

@ -299,13 +299,8 @@ class theme extends common {
// Soumission du formulaire
if($this->isPost()) {
// Si une image est positionnée, l'arrière en transparent.
if ($this->getInput('themeHeaderImage') === "") {
$themeHeaderBackgroundColor = $this->getInput('themeHeaderBackgroundColor'); }
else {
$themeHeaderBackgroundColor = 'rgba(0, 0, 0, 0)';
}
$this->setData(['theme', 'header', [
'backgroundColor' => $themeHeaderBackgroundColor,
'backgroundColor' => $this->getInput('themeHeaderBackgroundColor'),
'font' => $this->getInput('themeHeaderFont'),
'fontSize' => $this->getInput('themeHeaderFontSize'),
'fontWeight' => $this->getInput('themeHeaderFontWeight'),

View File

@ -92,14 +92,6 @@ $("input, select").on("change", function() {
.appendTo("head");
});
$("#themeHeaderImage").on("change", function() {
if($("#themeHeaderImage").val()) {
$("#themeHeaderBackgroundColorWrapper").slideUp();
$("#themeHeaderBackgroundColor").val($("#themeHeaderBackgroundColor").val());
} else {
$("#themeHeaderBackgroundColorWrapper").slideDown();
}
});
// Affiche / Cache les options de l'image du fond
$("#themeHeaderImage").on("change", function() {

View File

@ -1,7 +1,4 @@
<?php echo template::formOpen('themeHeaderForm'); ?>
<?php echo template::hidden('themeSiteBackgrounColor', [
'value' => $this->getData(['theme', 'site', 'backgroundColor'])
]); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeHeaderBack', [
@ -26,7 +23,7 @@
'label' => 'Fond',
'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?>
</div>
</div>
<div class="col6">
<?php echo template::text('themeHeaderTextColor', [
'class' => 'colorPicker',