From 3a4c4c2b9aa2285f4782a1582e465f8f215146aa Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 9 Nov 2019 18:37:15 +0100 Subject: [PATCH] [9.2.10] commentaires --- core/module/theme/theme.php | 1 + core/module/theme/view/header/header.js.php | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 0b5add0f..01c21f4f 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -118,6 +118,7 @@ class theme extends common { '2.4vmax' => 'Très grande (240%)' ]; public static $headerHeights = [ + /* 'none' => 'Hauteur de l\'image',*/ '100px' => 'Très petite (100px) ', '150px' => 'Petite (150px)', '200px' => 'Moyenne (200px)', diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 681deff3..d85728da 100755 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -19,6 +19,12 @@ */ $("input, select").on("change", function() { + // Récupérer la taille de l'image + /* + var tmpImg = new Image(); + var url = "" + "site/file/source/" + $("#themeHeaderImage").val(); + tmpImg.src= url; + */ // Import des polices de caractères var headerFont = $("#themeHeaderFont").val(); @@ -38,7 +44,11 @@ $("input, select").on("change", function() { //$("header .container").show(); } - css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}"; + /*if ($("#themeHeaderHeight").val() !== "none") {*/ + css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}"; + /*} else { + css += "line-height:" + tmpImg.height + ";height:" + tmpImg.height + "}"; + }*/ // Taille, couleur, épaisseur et capitalisation du titre de la bannière css += "header span{color:" + $("#themeHeaderTextColor").val() + ";font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + "}";