feat: on decoupe la fonction de rechargement en 2
pour pouvoir recuperer simplement le js
This commit is contained in:
parent
2fbba703d7
commit
136e204184
1 changed files with 10 additions and 2 deletions
|
@ -60,9 +60,17 @@ function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) {
|
||||||
if ($num) {
|
if ($num) {
|
||||||
$num = "_deux";
|
$num = "_deux";
|
||||||
}
|
}
|
||||||
|
$js = gamutable_generer_js($id_objet, $num);
|
||||||
$html = <<<EOJS
|
$html = <<<EOJS
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
$js;
|
||||||
|
</script>
|
||||||
|
EOJS;
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gamutable_generer_js($id_objet, $num){
|
||||||
|
$html = <<<EOJS
|
||||||
id = "$id_objet";
|
id = "$id_objet";
|
||||||
if (id === 'maj' || !id) {
|
if (id === 'maj' || !id) {
|
||||||
if (typeof app !== 'undefined') {
|
if (typeof app !== 'undefined') {
|
||||||
|
@ -86,9 +94,9 @@ function gamutable_fermer_modalbox($id_objet = 9999999999, $num = null) {
|
||||||
}
|
}
|
||||||
$.modalboxclose();
|
$.modalboxclose();
|
||||||
delete id;
|
delete id;
|
||||||
</script>
|
|
||||||
EOJS;
|
EOJS;
|
||||||
return $html;
|
return $html;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue