From aebe8b186311b9a10d99287ade007ac3e808f323 Mon Sep 17 00:00:00 2001 From: cy_altern Date: Sun, 10 Apr 2022 17:41:48 +0200 Subject: [PATCH] =?UTF-8?q?faire=20fonctionner=20le=20rechargement=20du=20?= =?UTF-8?q?gamutable=20ou=20de=20la=20ligne=20unique=20lorsqu'on=20a=20=5F?= =?UTF-8?q?deux=20gamutables=20dans=20la=20m=C3=AAme=20page.=20A=20DISCUTE?= =?UTF-8?q?R:=20pour=20l'instant=20c'est=20sub-optimal=20car=20on=20rechar?= =?UTF-8?q?ge=20les=202=20gamutables=20-=20on=20pourrait=20avoir=20un=20pa?= =?UTF-8?q?rametre=20pour=20pr=C3=A9ciser=20celui=20que=20l'on=20veut=20re?= =?UTF-8?q?charger.=20-=20ceci=20dit=20le=20fonctionnement=20actuel=20est?= =?UTF-8?q?=20tout=20=C3=A0=20fait=20satisfaisant=20dans=20le=20cas=20o?= =?UTF-8?q?=C3=B9=20la=20modif=20impacte=20les=202...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inclure/gamutable.html | 2 +- js/gamutable.es6.js | 10 ++++++++-- js/gamutable.js | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/inclure/gamutable.html b/inclure/gamutable.html index 00123ce..0a36dc4 100644 --- a/inclure/gamutable.html +++ b/inclure/gamutable.html @@ -50,7 +50,7 @@ nomblocajaxreload="#ENV{nomblocajaxreload}" stockage="#ENV{stockage,localstorage}" includespip="#ENV{includespip}" - ref="montableau" + ref="montableau_deux" filtrer="#ENV{filtrer}" affichage_id="#ENV{_id}" _id="#ENV{_id}" diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 4f04b30..703d427 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -22,11 +22,13 @@ jQuery(function () { }).done(function () { if (parseInt(id) > 0) { app.rechargerJson(id); + app.rechargerJson_deux(id); } else { app.rechargerJson(); + app.rechargerJson_deux(); } if (nomBlocAjaxReload !== undefined) { -console.log('depart reload: ' + nomBlocAjaxReload); + console.log('depart reload: ' + nomBlocAjaxReload); ajaxReload(nomBlocAjaxReload, { args: { id }, callback: function () {}, @@ -36,7 +38,7 @@ console.log('depart reload: ' + nomBlocAjaxReload); }); // lancement d'une modalbox - $('#app').on('click', '.modalbox', function (e) { + $('#app').on('click', '.modalbox', function(e) { e.stopPropagation(); e.preventDefault(); let confirmation = $(this).data('confirm'); @@ -396,6 +398,7 @@ let monTableau = { let url = this.apiuri; if (parseInt(id) > 0) { url += '&id=' + id; +console.log('url:' + url); } else { let config = localStorage.getItem('header_' + this.nameLocalStorage); config = recupJson(config); @@ -764,6 +767,9 @@ const gamuTable = { rechargerJson(id) { this.$refs.montableau.chargerJson(id); }, + rechargerJson_deux(id) { + this.$refs.montableau_deux.chargerJson(id); + }, }, }; diff --git a/js/gamutable.js b/js/gamutable.js index db9a7e9..c060914 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -49,8 +49,10 @@ jQuery(function () { }).done(function () { if (parseInt(id) > 0) { app.rechargerJson(id); + app.rechargerJson_deux(id); } else { app.rechargerJson(); + app.rechargerJson_deux(); } if (nomBlocAjaxReload !== undefined) { @@ -452,6 +454,7 @@ var monTableau = { if (parseInt(id) > 0) { url += '&id=' + id; + console.log('url:' + url); } else { var config = localStorage.getItem('header_' + this.nameLocalStorage); config = recupJson(config); @@ -726,6 +729,9 @@ var gamuTable = { methods: { rechargerJson: function rechargerJson(id) { this.$refs.montableau.chargerJson(id); + }, + rechargerJson_deux: function rechargerJson_deux(id) { + this.$refs.montableau_deux.chargerJson(id); } } };