fix: le rechargement du json via maj, est une nouvelle option, elle ne
remplace pas id
This commit is contained in:
parent
d76d336300
commit
30afd04c90
2 changed files with 23 additions and 22 deletions
|
@ -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 = <<<EOJS
|
||||
<script type="text/javascript">
|
||||
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;
|
||||
</script>
|
||||
EOJS;
|
||||
|
@ -47,14 +49,10 @@ EOJS;
|
|||
}
|
||||
|
||||
function gamutable_recharger_tableau($id_objet = 9999999999, $num = null) {
|
||||
if ($id_objet === 'maj') {
|
||||
$id_objet = 1;
|
||||
}
|
||||
$html = <<<EOJS
|
||||
<script type="text/javascript">
|
||||
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;
|
||||
|
|
|
@ -54,7 +54,7 @@ function gamutable_crayons_vue_affichage_final($flux){
|
|||
$id = intval($id)
|
||||
and !in_array($objet, $GLOBALS['gamutable_rechargerJson_all'] ?? [])
|
||||
) {
|
||||
$flux['data'] .= ' <script type="text/javascript">if ( typeof app_deux === "object") { app_deux.rechargerJson("maj");}if ( typeof app === "object") { app.rechargerJson("maj");} </script>';
|
||||
$flux['data'] .= ' <script type="text/javascript">if ( typeof app_deux === "object") { app_deux.rechargerJson('.$id.');}if ( typeof app === "object") { app.rechargerJson('.$id.');} </script>';
|
||||
} else {
|
||||
$flux['data'] .= $objet . ' <script type="text/javascript">if ( typeof app_deux === "object") { app_deux.rechargerJson();}if ( typeof app === "object") { app.rechargerJson();} </script>';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue