From 056634494d0d55d7de3ab6e3306399cc02af3e5c Mon Sep 17 00:00:00 2001 From: tofulm Date: Tue, 25 Aug 2020 09:41:33 +0200 Subject: [PATCH] =?UTF-8?q?Nouvelle=20fonctionnalit=C3=A9=20:=20Si=20une?= =?UTF-8?q?=20variable=20du=20nom=20de=20`nomBlocAjaxReload`=20est=20d?= =?UTF-8?q?=C3=A9finie,=20alors,=20un=20ajaxReload=20de=20ce=20bloc=20sera?= =?UTF-8?q?=20jou=C3=A9=20dans=20la=20fonctione=20de=20callback=20de=20l'a?= =?UTF-8?q?ction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- js/gamutable.es6.js | 8 ++++++++ js/gamutable.js | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 462f3d7..7648ea9 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev } ``` -3. Pour utiliser **les actions** : +1. Pour utiliser **les actions** : ```html [(#SET{statut, #SET{args,#ID_SOUSCRIPTION|concat{-}|concat{#STATUT}} @@ -52,6 +52,7 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev ``` * il faut ajouter data-confirm="Confirmez vous ..." si on veut ajouter un popin de confirmation * il faut ajouter data-id="" si on veut recharger que cette ligne +* si une variable du nom de `nomBlocAjaxReload` est définie, alors, un ajaxReload de ce bloc sera joué dans la fonctione de callback de l'action 4. Pour utiliser **les crayons**, il faut utiliser le pipeline `crayons_vue_affichage_final` ```php diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 6fe61ea..d520bc1 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -22,6 +22,14 @@ jQuery(function () { } else { app.rechargerJson(); } + if (nomBlocAjaxReload !== undefined) { + ajaxReload(nomBlocAjaxReload, { + args: { id }, + callback: function () { + console.log('couco reload'); + }, + }); + } }); }); diff --git a/js/gamutable.js b/js/gamutable.js index f2dfa3e..1171fde 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -46,6 +46,17 @@ jQuery(function () { } else { app.rechargerJson(); } + + if (nomBlocAjaxReload !== undefined) { + ajaxReload(nomBlocAjaxReload, { + args: { + id: id + }, + callback: function callback() { + console.log('couco reload'); + } + }); + } }); }); // lancement d'une modalbox