From fa828215ca7a9e4434bf06d0045a9fd7053eb9d2 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 4 Mar 2019 23:02:24 +0100 Subject: [PATCH] [9.0.01] Retour du backgroundcolor picker avec une image --- core/module/theme/theme.php | 7 +------ core/module/theme/view/header/header.js.php | 8 -------- core/module/theme/view/header/header.php | 5 +---- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 9a8a5393..2a9c36c0 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -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'), diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 38a60ab1..a63a1c68 100755 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -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() { diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index 598538bd..c010575b 100755 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -1,7 +1,4 @@ - $this->getData(['theme', 'site', 'backgroundColor']) - ]); ?>
'Fond', 'value' => $this->getData(['theme', 'header', 'backgroundColor']) ]); ?> -
+
'colorPicker',