37 lines
706 B
PHP
37 lines
706 B
PHP
<?php
|
|
/**
|
|
* Fonctions utiles au plugin GamuTable
|
|
*
|
|
* @plugin GamuTable
|
|
* @copyright 2020
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Gamutable\Fonctions
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
function gamutable_fermer_modalbox($id_objet = 9999999999){
|
|
$html = <<<EOJS
|
|
<script type="text/javascript">
|
|
id = "$id_objet";
|
|
id = parseInt(id);
|
|
if (id > 0 && id < 9999999999) {
|
|
if (typeof app !== 'undefined') {
|
|
app.rechargerJson(id);
|
|
}
|
|
$.modalboxclose();
|
|
}
|
|
if (id === 9999999999) {
|
|
if (typeof app !== 'undefined') {
|
|
app.rechargerJson(id);
|
|
}
|
|
$.modalboxclose();
|
|
}
|
|
delete id;
|
|
</script>
|
|
EOJS;
|
|
return $html;
|
|
}
|