remove the pipeline insert_js from the template jquery.js.html;
revert the order of addition of jquery.js.html of the previous change. jquery.js.html will be always at the beginning of #INSERT_HEAD;
add a new pipeline verifie_js_necessaire que prends le corp de la page et donnee un boolean pour signaler si ajouter les script ou pas;
Ex du insert_js:
{{{
if($flux['type']=='fichier')
$flux["data"]["ThickBox1"] = "thickbox";
if($flux['type']=='inline')
$flux["data"]["ThickBox1"] = "<script>...</script>"
}}}
ou
{{{
if($flux['type']=='fichier') {
$flux["data"]["ThickBox1"][] = "thickbox1";
$flux["data"]["ThickBox1"][] = "thickbox2";
}
}}}
ou
{{{
if($flux['type']=='fichier') {
$flux["data"][] = "thickbox1";
}
}}}
quand on a pas de pipeline verifie_js_necessaire
Ex du verifie_js_necessaire
{{{
if(est_necessaire($flux['page'])) $flux["data"]["ThickBox1"] = false;
return $flux;
}}}
Chargement en cours
Veuillez vous inscrire ou vous se connecter pour commenter