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,23 +37,24 @@ function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) {
$html = <<<EOJS
<script type="text/javascript">
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 = <<<EOJS
<script type="text/javascript">
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;