From 77b81795443663fbd88025a986cd1579f7b67166 Mon Sep 17 00:00:00 2001 From: tofulm Date: Wed, 1 Feb 2023 08:55:16 +0100 Subject: [PATCH] on peut vouloir recharger tout plus simplement --- gamutable_fonctions.php | 54 +++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/gamutable_fonctions.php b/gamutable_fonctions.php index a9193c0..30b21d4 100644 --- a/gamutable_fonctions.php +++ b/gamutable_fonctions.php @@ -37,23 +37,24 @@ function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) { $html = << id = "$id_objet"; - if (id === 'maj') { + if (id === 'maj' || !id) { if (typeof app !== 'undefined') { - app.rechargerJson('maj'); + app.rechargerJson(id); } if (typeof app_deux !== 'undefined') { - app_deux.rechargerJson('maj'); + app_deux.rechargerJson(id); } - } - id = parseInt(id); - if (id > 0 && id < 9999999999) { - if (typeof app$num !== 'undefined') { - app$num.rechargerJson(id); + } else { + id = parseInt(id); + if (id > 0 && id < 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(id); + } } - } - if (id === 9999999999) { - if (typeof app$num !== 'undefined') { - app$num.rechargerJson(); + if (id === 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(); + } } } $.modalboxclose(); @@ -64,26 +65,31 @@ EOJS; } function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) { + if ($num) { + $num = "_deux"; + } + $html = << id = "$id_objet"; - if (id === 'maj') { + if (id === 'maj' || !id) { if (typeof app !== 'undefined') { - app.rechargerJson('maj'); + app.rechargerJson(id); } if (typeof app_deux !== 'undefined') { - app_deux.rechargerJson('maj'); + app_deux.rechargerJson(id); } - } - id = parseInt(id); - if (id > 0 && id < 9999999999) { - if (typeof app$num !== 'undefined') { - app$num.rechargerJson(id); + } else { + id = parseInt(id); + if (id > 0 && id < 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(id); + } } - } - if (id === 9999999999) { - if (typeof app$num !== 'undefined') { - app$num.rechargerJson(); + if (id === 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(); + } } } delete id;