From 5ad581bf3ed03056691c37f255a92c22cc4b5137 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 26 Nov 2019 11:00:19 +0100 Subject: [PATCH 01/11] =?UTF-8?q?[9.2.12]=20Autoriser=20tous=20les=20?= =?UTF-8?q?=C3=A9l=C3=A9ments=20dans=20tinymce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 2 +- core/vendor/tinymce/init.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core.php b/core/core.php index 9ae3944b..5ecbdece 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/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index 676b3e49..b6944bec 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -69,8 +69,9 @@ tinymce.init({ link_context_toolbar: true, // Cache la barre de statut statusbar: false, - // Autorise l'ajout de script - extended_valid_elements: "script[language|type|src]", + // Autorise tous les éléments + valid_elements :"*[*]", + valid_children : "*[*]", // Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive) media_dimensions: false, // Désactiver la dimension des images From 9b3595e40ae7aa1f5fadedb4f17795d76282e5b8 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 26 Nov 2019 15:00:25 +0100 Subject: [PATCH 02/11] =?UTF-8?q?[9.2.12]=20Activer=20la=20dimension=20des?= =?UTF-8?q?=20media=20+=20d=C3=A9sactiver=20le=20preview=20responsive=20da?= =?UTF-8?q?ns=20tiny?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/vendor/tinymce/content.css | 5 +++-- core/vendor/tinymce/init.js | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/vendor/tinymce/content.css b/core/vendor/tinymce/content.css index 759a102c..d56a3004 100755 --- a/core/vendor/tinymce/content.css +++ b/core/vendor/tinymce/content.css @@ -77,9 +77,10 @@ .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 +} +*/ \ No newline at end of file diff --git a/core/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index b6944bec..50a9c035 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -72,10 +72,10 @@ tinymce.init({ // Autorise tous les éléments valid_elements :"*[*]", valid_children : "*[*]", - // Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive) - media_dimensions: false, - // Désactiver la dimension des images - // image_dimensions: false, + // Active la dimension des médias + media_dimensions: true, + // Active la dimension des images + image_dimensions: true, // Active l'onglet avancé lors de l'ajout d'une image image_advtab: true, // Urls absolues From 8e2e59d30570b55b4333fb552213ea18ad0505c9 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 26 Nov 2019 15:08:25 +0100 Subject: [PATCH 03/11] =?UTF-8?q?[9.2.12]=20Activer=20la=20dimension=20des?= =?UTF-8?q?=20media=20+=20d=C3=A9sactiver=20le=20preview=20responsive=20da?= =?UTF-8?q?ns=20tiny?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/vendor/tinymce/content.css | 8 ++++---- core/vendor/tinymce/init.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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 b6944bec..50a9c035 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -72,10 +72,10 @@ tinymce.init({ // Autorise tous les éléments valid_elements :"*[*]", valid_children : "*[*]", - // Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive) - media_dimensions: false, - // Désactiver la dimension des images - // image_dimensions: false, + // Active la dimension des médias + media_dimensions: true, + // Active la dimension des images + image_dimensions: true, // Active l'onglet avancé lors de l'ajout d'une image image_advtab: true, // Urls absolues From 91f0da64c0859014cd885f4bf73cafe37912b22b Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 26 Nov 2019 15:17:00 +0100 Subject: [PATCH 04/11] =?UTF-8?q?[9.2.12]=20dimension=20des=20images=20et?= =?UTF-8?q?=20des=20m=C3=A9dias=20dans=20tinymce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/vendor/tinymce/init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index b6944bec..ffb1b795 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -73,9 +73,9 @@ tinymce.init({ valid_elements :"*[*]", valid_children : "*[*]", // 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 From af449819b1d52a269848ab9cd44af1daea3ed836 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 26 Nov 2019 17:22:41 +0100 Subject: [PATCH 05/11] [9.2.12] changes --- CHANGES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 5001624c..4c2be59d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # Changelog +## version 9.2.12 +- Modifications + - TinyMCE : + - Supprimer le filtrage des éléments. + - Supprimer le forçage de l'affichage des médias à 100% + - Activer le dimensionnement des médias + ## version 9.2.11 - Corrections : - Marge du pied de page par défaut 5px From 633d5879fa41e75f7340476591731ef873552388 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 26 Nov 2019 19:09:12 +0100 Subject: [PATCH 06/11] [9.2.12] Etiquette de version des modules --- module/blog/view/config/config.php | 2 +- module/gallery/view/config/config.php | 2 +- module/news/view/config/config.php | 2 +- module/redirection/view/config/config.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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/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 From fbdfcbfcb21ac3ba594009690f4e5f0d6d548cd6 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 26 Nov 2019 19:22:30 +0100 Subject: [PATCH 07/11] Module Form v2.1 --- core/layout/common.css | 11 +++++++++++ module/form/form.php | 11 +++++++---- module/form/view/config/config.js.php | 7 ++++++- module/form/view/config/config.php | 9 +++++++-- module/form/view/index/index.php | 7 ++++++- 5 files changed, 37 insertions(+), 8 deletions(-) diff --git a/core/layout/common.css b/core/layout/common.css index 0dfb9bea..4f6e1469 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 */ diff --git a/module/form/form.php b/module/form/form.php index 81ed0c64..8a6ac84b 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 = [ 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/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'])): ?> From c6306de2e7ccfc4a668ab907ce499bc2772f44fb Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 27 Nov 2019 14:28:23 +0100 Subject: [PATCH 08/11] [9.2.12] Module form 2.1 --- module/form/form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/form/form.php b/module/form/form.php index 8a6ac84b..a8c21c62 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -313,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 From fc381a78d3194d28038bda64703a172697dd0170 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 27 Nov 2019 14:31:26 +0100 Subject: [PATCH 09/11] =?UTF-8?q?[9.2.12]=20Mention=20du=20num=C3=A9ro=20d?= =?UTF-8?q?e=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/form/view/data/data.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From ae023db6bba98df038b3ee37d09069e9771ff139 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 27 Nov 2019 15:47:12 +0100 Subject: [PATCH 10/11] changes --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 4c2be59d..69554925 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,9 @@ - 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 : From af0d235d4a6d0f65db5edbb618cc60040744b661 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 28 Nov 2019 14:55:02 +0100 Subject: [PATCH 11/11] =?UTF-8?q?[9.2.12]=20Effet=20accord=C3=A9on=20dans?= =?UTF-8?q?=20TinyMCE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 1 + core/core.js.php | 32 +++++++++++++++++++- core/layout/common.css | 24 +++++++++++++++ core/vendor/tinymce/init.js | 7 +++++ core/vendor/tinymce/templates/accordion.html | 15 +++++++++ 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 core/vendor/tinymce/templates/accordion.html diff --git a/CHANGES.md b/CHANGES.md index 69554925..d26768b0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## 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 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/layout/common.css b/core/layout/common.css index 4f6e1469..4930848e 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -1272,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/init.js b/core/vendor/tinymce/init.js index ffb1b795..76fa6ec5 100755 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -72,6 +72,8 @@ tinymce.init({ // Autorise tous les éléments valid_elements :"*[*]", valid_children : "*[*]", + // Autorise l'ajout de script + // extended_valid_elements: "script[language|type|src]", // Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive) media_dimensions: true, // Désactiver la dimension des images @@ -133,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 @@ +
    +
  • +

    Premier bloc

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.

    +
    +
  • +
  • +

    Second bloc

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.

    +
    +
  • +
\ No newline at end of file