Merge branch 'master' into dev10
This commit is contained in:
commit
211af18863
|
@ -118,7 +118,7 @@ class theme extends common {
|
||||||
'2.4vmax' => 'Très grande (240%)'
|
'2.4vmax' => 'Très grande (240%)'
|
||||||
];
|
];
|
||||||
public static $headerHeights = [
|
public static $headerHeights = [
|
||||||
/* 'none' => 'Hauteur de l\'image',*/
|
'none' => 'Hauteur de l\'image sélectionnée',
|
||||||
'100px' => 'Très petite (100px) ',
|
'100px' => 'Très petite (100px) ',
|
||||||
'150px' => 'Petite (150px)',
|
'150px' => 'Petite (150px)',
|
||||||
'200px' => 'Moyenne (200px)',
|
'200px' => 'Moyenne (200px)',
|
||||||
|
@ -221,10 +221,9 @@ class theme extends common {
|
||||||
];
|
];
|
||||||
public static $headerWide = [
|
public static $headerWide = [
|
||||||
'auto auto' => 'Automatique',
|
'auto auto' => 'Automatique',
|
||||||
'100% 100%' => 'Image étirée (100% 100%)',
|
|
||||||
'100% auto' => 'Responsive (100% auto)',
|
|
||||||
'cover' => 'Responsive (cover)',
|
'cover' => 'Responsive (cover)',
|
||||||
'contain' => 'Responsive (contain)'
|
'100% 100%' => 'Image étirée (100% 100%)',
|
||||||
|
'contain' => 'Responsive (contain)'
|
||||||
];
|
];
|
||||||
public static $footerTemplate = [
|
public static $footerTemplate = [
|
||||||
'1' => 'Une seule colonne',
|
'1' => 'Une seule colonne',
|
||||||
|
|
|
@ -20,11 +20,37 @@
|
||||||
$("input, select").not("#barSelectLanguage").on("change", function() {
|
$("input, select").not("#barSelectLanguage").on("change", function() {
|
||||||
|
|
||||||
// Récupérer la taille de l'image
|
// Récupérer la taille de l'image
|
||||||
/*
|
|
||||||
var tmpImg = new Image();
|
var tmpImg = new Image();
|
||||||
var url = "<?php echo helper::baseUrl(false); ?>" + "site/file/source/" + $("#themeHeaderImage").val();
|
|
||||||
tmpImg.src= url;
|
tmpImg.onload = function() {
|
||||||
*/
|
// Informations affichées
|
||||||
|
$("#themeHeaderImageHeight").html(tmpImg.height + "px");
|
||||||
|
$("#themeHeaderImageWidth").html(tmpImg.width + "px");
|
||||||
|
|
||||||
|
// Limiter la hauteur à 600 px
|
||||||
|
if (tmpImg.height > 600) {
|
||||||
|
tmpImgHeight = 600;
|
||||||
|
} else {
|
||||||
|
tmpImgHeight = tmpImg.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Modifier la dropdown liste
|
||||||
|
if ($("#themeHeaderImage").val() !== "") {
|
||||||
|
// Une image est ajoutée ou changée
|
||||||
|
if ($("#themeHeaderHeight option").length === 4) {
|
||||||
|
$("#themeHeaderHeight ").prepend('<option selected="selected" value="0"> Hauteur de l\'image sélectionnée </option>');
|
||||||
|
}
|
||||||
|
// Modifier la valeur
|
||||||
|
$("#themeHeaderHeight option:eq(0)").val(tmpImgHeight + "px");
|
||||||
|
// Modifier l'option
|
||||||
|
$("#themeHeaderHeight option:first-child").html("Hauteur de l\'image sélectionnée (" + tmpImgHeight + "px)");
|
||||||
|
} else {
|
||||||
|
$("#themeHeaderHeight option:first-child").html("Hauteur de l\'image sélectionnée");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
tmpImg.src= "<?php echo helper::baseUrl(false); ?>" + "site/file/source/" + $("#themeHeaderImage").val();
|
||||||
|
|
||||||
// Import des polices de caractères
|
// Import des polices de caractères
|
||||||
var headerFont = $("#themeHeaderFont").val();
|
var headerFont = $("#themeHeaderFont").val();
|
||||||
|
@ -41,14 +67,10 @@ $("input, select").not("#barSelectLanguage").on("change", function() {
|
||||||
} else {
|
} else {
|
||||||
// Désactiver l'option responsive
|
// Désactiver l'option responsive
|
||||||
css += "background-image:none;";
|
css += "background-image:none;";
|
||||||
//$("header .container").show();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/*if ($("#themeHeaderHeight").val() !== "none") {*/
|
|
||||||
css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}";
|
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
|
// 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() + "}";
|
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() + "}";
|
||||||
|
@ -112,17 +134,6 @@ $("input, select").not("#barSelectLanguage").on("change", function() {
|
||||||
.appendTo("head");
|
.appendTo("head");
|
||||||
}).trigger("change");
|
}).trigger("change");
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
$("#themeHeaderHeight").on("change", function() {
|
|
||||||
if($(this).val() === 'none') {
|
|
||||||
$("#themeHeaderTextHide").prop("disabled", true);
|
|
||||||
$("#themeHeaderTextHide").prop("checked", true).trigger("change");
|
|
||||||
} else {
|
|
||||||
$("#themeHeaderTextHide").prop("disabled", false);
|
|
||||||
}
|
|
||||||
}).trigger("change");
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Affiche / Cache les options de l'image du fond
|
// Affiche / Cache les options de l'image du fond
|
||||||
|
|
|
@ -75,16 +75,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col4">
|
||||||
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
|
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
|
||||||
'checked' => $this->getData(['theme', 'header', 'textHide'])
|
'checked' => $this->getData(['theme', 'header', 'textHide'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="themeHeaderShow" class="col6">
|
<div id="themeHeaderShow" class="col4">
|
||||||
<?php echo template::checkbox('themeHeaderlinkHomePage', true, 'Bannière cliquable', [
|
<?php echo template::checkbox('themeHeaderlinkHomePage', true, 'Bannière cliquable', [
|
||||||
'checked' => $this->getData(['theme', 'header', 'linkHomePage'])
|
'checked' => $this->getData(['theme', 'header', 'linkHomePage'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col4">
|
||||||
|
<em>(largeur:<span id="themeHeaderImageWidth"></span> ; hauteur:<span id="themeHeaderImageHeight"></span>)</em>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,7 +107,8 @@
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
|
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
|
||||||
'label' => 'Hauteur',
|
'label' => 'Hauteur',
|
||||||
'selected' => $this->getData(['theme', 'header', 'height'])
|
'selected' => $this->getData(['theme', 'header', 'height']),
|
||||||
|
'help' => "Quelque soit la taille de la bannière, la hauteur maximale autorisée est de 600 pixels."
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
|
|
Loading…
Reference in New Issue