diff --git a/CHANGES.md b/CHANGES.md index f637fd3d..9edf0595 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,8 @@ - Modifications préparatoires à la version 10 : - Lors de l'installation, stockage de l'url de base dans l'éventualité de la restauration d'un backup et de son installation dans une autre arborescence. - Modification des clés identifiant les légendes du module Gallery : suppression du point de séparation du nom de fichier de l'extension. +- Corrections : + - Thème ; bannière : problème empêchant la bannière d'être cliquable lorsque la hauteur responsive de la bannière était sélectionnée. ## version 9.2.09 - Corrections : diff --git a/core/layout/main.php b/core/layout/main.php index fc269725..81b3976c 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -58,7 +58,11 @@ OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') ): ?>
- getData(['config', 'title']); ?> + getData(['config', 'title']); ?> +
+ +
+  
getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') ): ?> -
getData(['config', 'title']); ?>
+
+ getData(['config', 'title']); ?> +
+ +
+   +
'Très grande (240%)' ]; public static $headerHeights = [ - 'none' => 'Responsive', '100px' => 'Très petite (100px) ', '150px' => 'Petite (150px)', '200px' => 'Moyenne (200px)', @@ -215,10 +214,11 @@ class theme extends common { '100%' => 'Fluide (100%)' ]; public static $headerWide = [ - 'cover' => 'Responsive (cover)', - 'contain' => 'Responsive (contain)', 'auto auto' => 'Automatique', - '100% 100%' => 'Image étirée' + '100% 100%' => 'Image étirée (100% 100%)', + '100% auto' => 'Responsive (100% auto)', + 'cover' => 'Responsive (cover)', + 'contain' => 'Responsive (contain)' ]; public static $footerTemplate = [ '1' => 'Une seule colonne', diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 6748571a..681deff3 100755 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -19,13 +19,6 @@ */ $("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; - - var themeHeaderHeight = $("#themeHeaderHeight").val(); - var themeHeaderImage = $("#themeHeaderImage").val(); // Import des polices de caractères var headerFont = $("#themeHeaderFont").val(); @@ -34,40 +27,30 @@ $("input, select").on("change", function() { // Couleurs, image, alignement et hauteur de la bannière css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";"; - if (themeHeaderImage) { + if ($("#themeHeaderImage").val()) { // Une image est sélectionnée - css += "background-image:url('site/file/source/" + themeHeaderImage + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";"; + css += "background-image:url('site/file/source/" + $("#themeHeaderImage").val() + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";"; css += "background-size:" + $("#themeHeaderImageContainer").val() + ";"; - if (themeHeaderHeight === "none") { - // Position responsive - css += "height: 0; padding-top:" + (tmpImg.height / tmpImg.width ) * 100 + "%}"; - } else { - // Positions standards - css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + themeHeaderHeight + "}"; - } // Pas d'image sélectionnée } else { // Désactiver l'option responsive css += "background-image:none;"; - $("header .container").show(); - $("themeHeaderTextHide").prop("false"); - if (themeHeaderHeight === "none") { - $("#themeHeaderHeight option:eq(2)").prop("selected", true); - css += "line-height: 150px;height: 150px}"; - } else { - css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + themeHeaderHeight + "}"; - } + //$("header .container").show(); + } + css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}"; // 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() + "}"; // Cache le titre de la bannière + if($("#themeHeaderTextHide").is(":checked")) { - $("header .container").hide(); + $("header #themeHeaderTitle").hide(); } else { - $("header .container").show(); + $("header #themeHeaderTitle").show(); } + // Marge if($("#themeHeaderMargin").is(":checked")) { if(getData(['theme', 'menu', 'position']) === 'site-first'); ?>) { @@ -119,6 +102,8 @@ $("input, select").on("change", function() { .appendTo("head"); }).trigger("change"); +/** + $("#themeHeaderHeight").on("change", function() { if($(this).val() === 'none') { $("#themeHeaderTextHide").prop("disabled", true); @@ -127,6 +112,7 @@ $("#themeHeaderHeight").on("change", function() { $("#themeHeaderTextHide").prop("disabled", false); } }).trigger("change"); +*/ // Affiche / Cache les options de l'image du fond diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index 3beabbaf..8db95985 100755 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -70,20 +70,21 @@
'Adaptation', - 'selected' => $this->getData(['theme', 'header', 'imageContainer']), - 'help' => 'Responsive (cover) : rogne une image trop grande sans la déformer - - Responsive (contain) : agrandit une image trop petite sans la déformer. -

Pour une bannière full responsive, sélectionnez aussi Hauteur -> Responsive. -
Dans ce cas le titre est indisponible.' + 'selected' => $this->getData(['theme', 'header', 'imageContainer']) ]); ?>
-
+
$this->getData(['theme', 'header', 'textHide']) ]); ?>
+
+ $this->getData(['theme', 'header', 'linkHome']) + ]); ?> +
@@ -114,11 +115,6 @@ -
- $this->getData(['theme', 'header', 'linkHome']) - ]); ?> -
$this->getData(['theme', 'header', 'margin'])