diff --git a/CHANGES.md b/CHANGES.md index 5001624c..d26768b0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,16 @@ # Changelog +## version 9.2.12 +- Modifications + - TinyMCE : + - Ajout d'un template effet accordéon. + - Supprimer le filtrage des éléments. + - Supprimer le forçage de l'affichage des médias à 100% + - Activer le dimensionnement des médias + - Module Form : + - Etiquette de séparation + - Checbox retourne un astérisque plutôt que 1 + ## version 9.2.11 - Corrections : - Marge du pied de page par défaut 5px diff --git a/core/core.js.php b/core/core.js.php index 6543aa5c..40bdfdb6 100755 --- a/core/core.js.php +++ b/core/core.js.php @@ -398,4 +398,34 @@ $(document).ready(function(){ $("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'none' }); $("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'none' }); }); -}); + + /** + * Effet accordéon + */ + $('.accordion').each(function(e) { + // on stocke l'accordéon dans une variable locale + var accordion = $(this); + // on récupère la valeur data-speed si elle existe + var toggleSpeed = accordion.attr('data-speed') || 100; + + // fonction pour afficher un élément + function open(item, speed) { + // on récupère tous les éléments, on enlève l'élément actif de ce résultat, et on les cache + accordion.find('.accordion-item').not(item).removeClass('active') + .find('.accordion-content').slideUp(speed); + // on affiche l'élément actif + item.addClass('active') + .find('.accordion-content').slideDown(speed); + } + + // on initialise l'accordéon, sans animation + open(accordion.find('.active:first'), 0); + + // au clic sur un titre... + accordion.on('click', '.accordion-title', function(ev) { + ev.preventDefault(); + // ...on lance l'affichage de l'élément, avec animation + open($(this).closest('.accordion-item'), toggleSpeed); + }); + }); +}); \ No newline at end of file diff --git a/core/core.php b/core/core.php index 05c14068..3838d753 100644 --- a/core/core.php +++ b/core/core.php @@ -33,7 +33,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '9.2.11'; + const ZWII_VERSION = '9.2.12'; public static $actions = []; public static $coreModuleIds = [ diff --git a/core/layout/common.css b/core/layout/common.css index 0dfb9bea..4930848e 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -1036,6 +1036,17 @@ input[type='checkbox']:disabled + label:before{ padding: 0; /* À cause du padding ajouté aux selects */ } +/* Paramètres de l'étiquette dans form */ +.formLabel { + margin-top: 20px; +} + +.formLabel hr { + border: 1px solid; + margin: 5px 0 5px; +} + + /** * Grille */ @@ -1261,3 +1272,27 @@ th.col12 { .colorOrange { color: #F39C12; } + + +/* +* Effet accordéon +*/ + +.accordion { + padding: 0; + list-style: none; +} +.accordion-title { + display: block; + margin: 0; + //padding: 0 7px; + line-height: 34px; + text-decoration: none; + cursor: pointer; +} +.accordion-title:hover { + background: lightgrey; +} +.accordion-content { + padding: 7px; +} \ No newline at end of file diff --git a/core/vendor/tinymce/content.css b/core/vendor/tinymce/content.css index 759a102c..beab260f 100755 --- a/core/vendor/tinymce/content.css +++ b/core/vendor/tinymce/content.css @@ -77,9 +77,9 @@ .offset11 { margin-left: 91.66666667%; } -/* Simulation du responsive des vidéos dans l'éditeur */ + /*Simulation du responsive des vidéos dans l'éditeur */ .mce-preview-object, .mce-preview-object > * { - width: 100% !important; - height: 600px !important; -} \ No newline at end of file + width: auto !important; + height: auto !important; +} diff --git a/core/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index 676b3e49..76fa6ec5 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -69,12 +69,15 @@ tinymce.init({ link_context_toolbar: true, // Cache la barre de statut statusbar: false, + // Autorise tous les éléments + valid_elements :"*[*]", + valid_children : "*[*]", // Autorise l'ajout de script - extended_valid_elements: "script[language|type|src]", + // extended_valid_elements: "script[language|type|src]", // Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive) - media_dimensions: false, + media_dimensions: true, // Désactiver la dimension des images - // image_dimensions: false, + image_dimensions: true, // Active l'onglet avancé lors de l'ajout d'une image image_advtab: true, // Urls absolues @@ -132,6 +135,11 @@ tinymce.init({ url: baseUrl + "core/vendor/tinymce/templates/block.html", description: "Bloc de texte avec un titre." }, + { + title: "Effet accordéon", + url: baseUrl + "core/vendor/tinymce/templates/accordion.html", + description: "Bloc de texte avec effet accordéon." + }, { title: "Grille symétrique : 6 - 6", url: baseUrl + "core/vendor/tinymce/templates/col6.html", diff --git a/core/vendor/tinymce/templates/accordion.html b/core/vendor/tinymce/templates/accordion.html new file mode 100644 index 00000000..dda96b22 --- /dev/null +++ b/core/vendor/tinymce/templates/accordion.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/module/blog/view/config/config.php b/module/blog/view/config/config.php index 999f85c1..a8d472dd 100644 --- a/module/blog/view/config/config.php +++ b/module/blog/view/config/config.php @@ -27,6 +27,6 @@ -
Module version n° +
Version n°
\ No newline at end of file diff --git a/module/form/form.php b/module/form/form.php index 81ed0c64..a8c21c62 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -32,14 +32,16 @@ class form extends common { public static $pagination; - const FORM_VERSION = '2.0'; + const FORM_VERSION = '2.1'; + // Objets const TYPE_MAIL = 'mail'; const TYPE_SELECT = 'select'; const TYPE_TEXT = 'text'; const TYPE_TEXTAREA = 'textarea'; - const TYPE_DATETIME = "date"; - const TYPE_CHECKBOX = "checkbox"; + const TYPE_DATETIME = 'date'; + const TYPE_CHECKBOX = 'checkbox'; + const TYPE_LABEL = 'label'; public static $types = [ @@ -48,7 +50,8 @@ class form extends common { self::TYPE_MAIL => 'Champ mail', self::TYPE_SELECT => 'Sélection', self::TYPE_DATETIME => 'Date', - self::TYPE_CHECKBOX => 'Case à cocher' + self::TYPE_CHECKBOX => 'Case à cocher', + self::TYPE_LABEL => 'Etiquette', ]; public static $listUsers = [ @@ -310,7 +313,7 @@ class form extends common { default: $filter = helper::FILTER_STRING_SHORT; } - $value = $this->getInput('formInput[' . $index . ']', $filter, $input['required']); + $value = $this->getInput('formInput[' . $index . ']', $filter, $input['required']) === true ? 'X' : $this->getInput('formInput[' . $index . ']', $filter, $input['required']); // Préparation des données pour la création dans la base $data[$this->getData(['module', $this->getUrl(0), 'input', $index, 'name'])] = $value; // Préparation des données pour le mail diff --git a/module/form/view/config/config.js.php b/module/form/view/config/config.js.php index 41a9fbbb..60977381 100644 --- a/module/form/view/config/config.js.php +++ b/module/form/view/config/config.js.php @@ -79,7 +79,9 @@ if(inputs) { * Afficher/cacher les options supplémentaires */ $(document).on("click", ".formConfigMoreToggle", function() { + $(this).parents(".formConfigInput").find(".formConfigMore").slideToggle(); + $(this).parents(".formConfigInput").find(".formConfigMoreLabel").slideToggle(); }); /** @@ -122,7 +124,10 @@ $("#formConfigInputs") .on("change", ".formConfigType", function() { var _this = $(this); if(_this.val() === "select") { - _this.parents(".formConfigInput").find(".formConfigValuesWrapper").slideDown(); + _this.parents(".formConfigInput").find(".formConfigValuesWrapper").slideDown(); + } else if ( _this.val() === "label") { + _this.parents(".formConfigInput").find("label[for*=formConfigRequired]").hide(); + _this.parents(".formConfigInput").find(".formConfigLabelWrapper").slideDown(); } else { _this.parents(".formConfigInput").find(".formConfigValuesWrapper").slideUp(); diff --git a/module/form/view/config/config.php b/module/form/view/config/config.php index 631af215..4c3c813f 100644 --- a/module/form/view/config/config.php +++ b/module/form/view/config/config.php @@ -33,12 +33,17 @@ ]); ?>
+
+ 'displayNone formConfigLabelWrapper' + ]); ?> +
'Liste des valeurs séparées par des virgules (valeur1,valeur2,...)', 'class' => 'formConfigValues', 'classWrapper' => 'displayNone formConfigValuesWrapper' - ]); ?> + ]); ?>
@@ -150,6 +155,6 @@ -
Module version n° +
Version n°
diff --git a/module/form/view/data/data.php b/module/form/view/data/data.php index ae925983..3ed552b3 100644 --- a/module/form/view/data/data.php +++ b/module/form/view/data/data.php @@ -25,4 +25,7 @@
- \ No newline at end of file + +
Version n° + +
\ No newline at end of file diff --git a/module/form/view/index/index.php b/module/form/view/index/index.php index 6c65b6cf..4fe54a9a 100644 --- a/module/form/view/index/index.php +++ b/module/form/view/index/index.php @@ -35,7 +35,12 @@ ]); ?> + ); ?> + +

+ +
+

getData(['module', $this->getUrl(0), 'config', 'capcha'])): ?> diff --git a/module/gallery/view/config/config.php b/module/gallery/view/config/config.php index 57a62ebf..59f17e15 100644 --- a/module/gallery/view/config/config.php +++ b/module/gallery/view/config/config.php @@ -44,6 +44,6 @@ -
Module version n° +
Version n°
\ No newline at end of file diff --git a/module/news/view/config/config.php b/module/news/view/config/config.php index 7cd1ea15..2de459a7 100644 --- a/module/news/view/config/config.php +++ b/module/news/view/config/config.php @@ -21,6 +21,6 @@ -
Module version n° +
Version n°
\ No newline at end of file diff --git a/module/redirection/view/config/config.php b/module/redirection/view/config/config.php index aba7eaca..97102956 100644 --- a/module/redirection/view/config/config.php +++ b/module/redirection/view/config/config.php @@ -35,6 +35,6 @@
-
Module version n° +
Version n°
\ No newline at end of file