fix: app.rechargerJson(id) id peut etre un nombre négatif afin de pouvoir supprimer la ligne

This commit is contained in:
Christophe 2025-01-10 14:47:03 +01:00
parent 17a979ed14
commit 13ec20a24f

View file

@ -86,15 +86,14 @@ function gamutable_generer_js($id_objet, $num){
}
} 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();
}
} else {
if (typeof app$num !== 'undefined') {
app$num.rechargerJson(id);
}
}
}
$.modalboxclose();
@ -131,15 +130,14 @@ function gamutable_recharger_tableau($id_objet = 9999999999, $num = null):string
}
} 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();
}
} else {
if (typeof app$num !== 'undefined') {
app$num.rechargerJson(id);
}
}
}
delete id;