Skip to content
Extraits de code Groupes Projets
Valider 0780befd rédigé par Fil's avatar Fil
Parcourir les fichiers

javascript un peu moins délirant (et un peu plus rapide) pour "tout déplier"

parent 6fb63139
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -140,12 +140,11 @@ function afficher_rubriques_filles($id_parent) {
if (!$numero_block["$nom_block"] > 0){
$compteur_block++;
$numero_block["$nom_block"] = $compteur_block;
}
if (!$first_couche) $first_couche = $compteur_block;
$last_couche = $compteur_block;
}
$javasc_ouvrir .= "ouvrir_couche('$compteur_block', '$spip_lang_rtl');";
$javasc_fermer .= "fermer_couche('$compteur_block', '$spip_lang_rtl');";
if ($id_parent == '0') {
$rubrique[$id_rubrique] = "$titre";
}
......@@ -185,9 +184,10 @@ function afficher_rubriques_filles($id_parent) {
$article[$id_rubrique][] = "<div class='puce-article' style='background: url(img_pack/$puce) $spip_lang_left center no-repeat;'><div><a href='articles.php3?id_article=$id_article' class='verdana1'>$titre</a></div></div>";
}
$javasc_ouvrir="manipuler_couches('ouvrir','$spip_lang_rtl',$first_couche,$last_couche)";
$javasc_fermer="manipuler_couches('fermer','$spip_lang_rtl',$first_couche,$last_couche)";
// Demarrer l'affichage
if ($les_rubriques AND test_layer()) {
$les_rubriques = join($les_rubriques,",");
......
......@@ -35,4 +35,14 @@ function fermer_couche(couche, rtl) {
layer.style.display = 'none';
vis[couche] = 'hide';
}
function manipuler_couches(action,rtl,first,last) {
if (action=='ouvrir') {
for (j=first; j<=last; j+=1) {
ouvrir_couche(j,rtl);
}
} else {
for (j=first; j<=last; j+=1) {
fermer_couche(j,rtl);
}
}
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter