gamutable/gamutable_fonctions.php
2023-01-10 19:46:10 +01:00

60 lines
1.1 KiB
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;
}
include_spip('inc/vite');
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();
}
$.modalboxclose();
}
delete id;
</script>
EOJS;
return $html;
}
function gamutable_recharger_tableau($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);
}
}
if (id === 9999999999) {
if (typeof app !== 'undefined') {
app.rechargerJson();
}
}
delete id;
</script>
EOJS;
return $html;
}