diff --git a/gamutable_fonctions.php b/gamutable_fonctions.php index 0d6cd18..14c96eb 100644 --- a/gamutable_fonctions.php +++ b/gamutable_fonctions.php @@ -15,31 +15,33 @@ if (!defined("_ECRIRE_INC_VERSION")) { include_spip("inc/vite"); function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) { - if ($id_objet === 'maj') { - $id_objet = 1; + if ($num) { + $num = "_deux"; } + $html = << id = "$id_objet"; - id = parseInt(id); - if (id > 0 && id < 9999999999) { + if (id === 'maj') { if (typeof app !== 'undefined') { app.rechargerJson('maj'); } if (typeof app_deux !== 'undefined') { app_deux.rechargerJson('maj'); } - $.modalboxclose(); + } + id = parseInt(id); + if (id > 0 && id < 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(id); + } } if (id === 9999999999) { - if (typeof app !== 'undefined') { - app.rechargerJson(); + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(); } - if (typeof app_deux !== 'undefined') { - app_deux.rechargerJson(); - } - $.modalboxclose(); } + $.modalboxclose(); delete id; EOJS; @@ -47,14 +49,10 @@ EOJS; } function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) { - if ($id_objet === 'maj') { - $id_objet = 1; - } $html = << id = "$id_objet"; - id = parseInt(id); - if (id > 0 && id < 9999999999) { + if (id === 'maj') { if (typeof app !== 'undefined') { app.rechargerJson('maj'); } @@ -62,12 +60,15 @@ function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) { app_deux.rechargerJson('maj'); } } - if (id === 9999999999) { - if (typeof app !== 'undefined') { - app.rechargerJson(); + id = parseInt(id); + if (id > 0 && id < 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(id); } - if (typeof app_deux !== 'undefined') { - app_deux.rechargerJson(); + } + if (id === 9999999999) { + if (typeof app$num !== 'undefined') { + app$num.rechargerJson(); } } delete id; diff --git a/gamutable_pipelines.php b/gamutable_pipelines.php index 37a8f9b..a2afabb 100644 --- a/gamutable_pipelines.php +++ b/gamutable_pipelines.php @@ -54,7 +54,7 @@ function gamutable_crayons_vue_affichage_final($flux){ $id = intval($id) and !in_array($objet, $GLOBALS['gamutable_rechargerJson_all'] ?? []) ) { - $flux['data'] .= ' '; + $flux['data'] .= ' '; } else { $flux['data'] .= $objet . ' '; }