on peut vouloir recharger tout plus simplement

This commit is contained in:
Christophe 2023-02-01 08:55:16 +01:00
parent 9f38229631
commit 77b8179544

View file

@ -37,14 +37,14 @@ function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) {
$html = <<<EOJS $html = <<<EOJS
<script type="text/javascript"> <script type="text/javascript">
id = "$id_objet"; id = "$id_objet";
if (id === 'maj') { if (id === 'maj' || !id) {
if (typeof app !== 'undefined') { if (typeof app !== 'undefined') {
app.rechargerJson('maj'); app.rechargerJson(id);
} }
if (typeof app_deux !== 'undefined') { if (typeof app_deux !== 'undefined') {
app_deux.rechargerJson('maj'); app_deux.rechargerJson(id);
}
} }
} else {
id = parseInt(id); id = parseInt(id);
if (id > 0 && id < 9999999999) { if (id > 0 && id < 9999999999) {
if (typeof app$num !== 'undefined') { if (typeof app$num !== 'undefined') {
@ -56,6 +56,7 @@ function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) {
app$num.rechargerJson(); app$num.rechargerJson();
} }
} }
}
$.modalboxclose(); $.modalboxclose();
delete id; delete id;
</script> </script>
@ -64,17 +65,21 @@ EOJS;
} }
function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) { function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) {
if ($num) {
$num = "_deux";
}
$html = <<<EOJS $html = <<<EOJS
<script type="text/javascript"> <script type="text/javascript">
id = "$id_objet"; id = "$id_objet";
if (id === 'maj') { if (id === 'maj' || !id) {
if (typeof app !== 'undefined') { if (typeof app !== 'undefined') {
app.rechargerJson('maj'); app.rechargerJson(id);
} }
if (typeof app_deux !== 'undefined') { if (typeof app_deux !== 'undefined') {
app_deux.rechargerJson('maj'); app_deux.rechargerJson(id);
}
} }
} else {
id = parseInt(id); id = parseInt(id);
if (id > 0 && id < 9999999999) { if (id > 0 && id < 9999999999) {
if (typeof app$num !== 'undefined') { if (typeof app$num !== 'undefined') {
@ -86,6 +91,7 @@ function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) {
app$num.rechargerJson(); app$num.rechargerJson();
} }
} }
}
delete id; delete id;
</script> </script>
EOJS; EOJS;