Paramètrage du champ INPUT

This commit is contained in:
Fred Tempez 2020-08-12 17:39:43 +02:00
parent b89314610b
commit b3cdc71b8d
4 changed files with 26 additions and 21 deletions

View File

@ -244,7 +244,7 @@ class template {
'value' => $attributes['value'] 'value' => $attributes['value']
]); ]);
// Champ d'upload // Champ d'upload
$html .= '<div class="inputFileWrapper">'; $html .= '<div class="inputFileManagerWrapper">';
$html .= sprintf( $html .= sprintf(
'<a '<a
href="' . href="' .
@ -252,7 +252,6 @@ class template {
'?relative_url=1' . '?relative_url=1' .
'&field_id=' . $attributes['id'] . '&field_id=' . $attributes['id'] .
'&type=' . $attributes['type'] . '&type=' . $attributes['type'] .
//'&akey=' . md5_file('site/data/'.'core.json') .
'&akey=' . md5_file(core::DATA_DIR.'core.json') . '&akey=' . md5_file(core::DATA_DIR.'core.json') .
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '') ($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
. '" . '"

View File

@ -448,12 +448,12 @@ header .container {
height: 100%; height: 100%;
} }
/* Element du header */ /* Element du header
#themeHeaderImage { #themeHeaderImage {
font-style: italic; font-style: italic;
font-size: 0.9em; font-size: 0.9em;
} }*/
/* Menu /* Menu
body > nav { body > nav {
@ -1020,10 +1020,10 @@ label {
} }
/* Empêche le débordement et les sauts de ligne */ /* Empêche le débordement et les sauts de ligne */
.inputFileWrapper { .inputFileManagerWrapper {
display: inline; display: inline;
} }
.inputFileWrapper > .inputFile { .inputFileManagerWrapper > .inputFile {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -41,21 +41,26 @@
'help' => 'Le curseur horizontal règle le niveau de transparence.', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Icône haut de page', 'label' => 'Icône haut de page',
'value' => $this->getData(['theme', 'body', 'toTopColor']) 'value' => $this->getData(['theme', 'body', 'toTopColor'])
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4>Image</h4> <h4>Image</h4>
<?php <div class="row">
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : ""; <div class="col12">
echo template::file('themeBodyImage', [ <?php
'label' => 'Fond', $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
'type' => 1, echo template::file('themeBodyImage', [
'value' => $imageFile 'help' => 'Sélectionner une image',
]); ?> 'label' => 'Fond',
'type' => 1,
'value' => $imageFile
]); ?>
</div>
</div>
<div id="themeBodyImageOptions" class="displayNone"> <div id="themeBodyImageOptions" class="displayNone">
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">

View File

@ -20,7 +20,7 @@
<div class="col12"> <div class="col12">
<?php echo template::text('themeHeaderBackgroundColor', [ <?php echo template::text('themeHeaderBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'header', 'backgroundColor']) 'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?> ]); ?>
@ -30,7 +30,7 @@
<div class="col12"> <div class="col12">
<?php echo template::text('themeHeaderTextColor', [ <?php echo template::text('themeHeaderTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'header', 'textColor']) 'value' => $this->getData(['theme', 'header', 'textColor'])
]); ?> ]); ?>
@ -47,6 +47,7 @@
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ? $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ?
$this->getData(['theme', 'header', 'image']) : ""; $this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [ echo template::file('themeHeaderImage', [
'help' => 'Sélectionner une image aux dimensions recommandées ci-dessous :',
'label' => 'Fond', 'label' => 'Fond',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
@ -77,15 +78,15 @@
<div id="themeHeaderShow" class="col6"> <div id="themeHeaderShow" class="col6">
<?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> </div>
<div class="row"> <div class="row">
<div class="col12 textAlignCenter"> <div class="col12 textAlignCenter">
<span id="themeHeaderImage"> <span id="themeHeaderImage">
Dimensions de l'image : largeur <span id="themeHeaderImageWidth"></span> - hauteur <span id="themeHeaderImageHeight"></span> - ratio <span id="themeHeaderImageRatio"></span> Dimensions de l'image : largeur <span id="themeHeaderImageWidth"></span> - hauteur <span id="themeHeaderImageHeight"></span> - ratio <span id="themeHeaderImageRatio"></span>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -110,7 +111,7 @@
Cover pour une image plus grande que la bannière, Contain pour une image plus petite. Cover pour une image plus grande que la bannière, Contain pour une image plus petite.
Les modes Auto et Etiré ne provoquent pas de modification de la hauteur de la bannière.' Les modes Auto et Etiré ne provoquent pas de modification de la hauteur de la bannière.'
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [ <?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
'label' => 'Hauteur maximale', 'label' => 'Hauteur maximale',