Skip to content
Extraits de code Groupes Projets
Valider 1053b60f rédigé par Antoine Pitrou's avatar Antoine Pitrou
Parcourir les fichiers

déplier en RTL

parent 9366894d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -79,7 +79,7 @@ function debut_block_invisible($nom_block){ ...@@ -79,7 +79,7 @@ function debut_block_invisible($nom_block){
$retour .= "document.write('<div id=\"Layer".$numero_block["$nom_block"]."\" style=\"display: none; margin-top: 1;\">');\n"; $retour .= "document.write('<div id=\"Layer".$numero_block["$nom_block"]."\" style=\"display: none; margin-top: 1;\">');\n";
$retour .= "//-->\n"; $retour .= "//-->\n";
$retour .= "</script>\n"; $retour .= "</script>\n";
$retour .= "<noscript><div id='Layer".$numero_block["$nom_block"]."' style='display: block;'></noscript>\n"; $retour .= "<noscript><div id='Layer".$numero_block["$nom_block"]."' style='display: block;'></noscript>\n";
} }
return $retour; return $retour;
...@@ -100,7 +100,7 @@ function bouton_block_invisible($nom_block) { ...@@ -100,7 +100,7 @@ function bouton_block_invisible($nom_block) {
if (test_layer()) { if (test_layer()) {
$blocks = explode(",", $nom_block); $blocks = explode(",", $nom_block);
for ($index=0; $index < count($blocks); $index ++){ for ($index=0; $index < count($blocks); $index ++){
$nom_block = $blocks[$index]; $nom_block = $blocks[$index];
...@@ -109,13 +109,13 @@ function bouton_block_invisible($nom_block) { ...@@ -109,13 +109,13 @@ function bouton_block_invisible($nom_block) {
$numero_block["$nom_block"] = $compteur_block; $numero_block["$nom_block"] = $compteur_block;
} }
$javasc .= "swap_couche(\\'".$numero_block[$nom_block]."\\');"; $javasc .= "swap_couche(\\'".$numero_block[$nom_block]."\\', \\'$spip_lang_rtl\\');";
} }
$retour = "\n<script language='JavaScript'><!--\n"; $retour = "\n<script language='JavaScript'><!--\n";
$retour .= "document.write('<a href=\"javascript:$javasc\"><img name=\"triangle$num_triangle\" src=\"img_pack/deplierhaut$spip_lang_rtl.gif\" alt=\"\" title=\"".addslashes(_T('info_deplier'))."\" width=\"16\" height=\"14\" border=\"0\"></a> ');\n"; $retour .= "document.write('<a href=\"javascript:$javasc\"><img name=\"triangle$num_triangle\" src=\"img_pack/deplierhaut$spip_lang_rtl.gif\" alt=\"\" title=\"".addslashes(_T('info_deplier'))."\" width=\"16\" height=\"14\" border=\"0\"></a> ');\n";
$retour .= "//-->\n"; $retour .= "//-->\n";
$retour .= "</script>\n"; $retour .= "</script>\n";
$retour .= "<noscript><img name='triangle$num_triangle' src='img_pack/deplierbas$spip_lang_rtl.gif' alt='' width='16' height='14' border='0'></noscript>\n"; $retour .= "<noscript><img name='triangle$num_triangle' src='img_pack/deplierbas$spip_lang_rtl.gif' alt='' width='16' height='14' border='0'></noscript>\n";
return $retour; return $retour;
} }
...@@ -132,10 +132,10 @@ function bouton_block_visible($nom_block){ ...@@ -132,10 +132,10 @@ function bouton_block_visible($nom_block){
$numero_block["$nom_block"] = $compteur_block; $numero_block["$nom_block"] = $compteur_block;
} }
return "<a href=\"javascript:swap_couche('".$numero_block["$nom_block"]."')\"><IMG name='triangle".$numero_block["$nom_block"]."' src='img_pack/deplierbas$spip_lang_rtl.gif' alt='' title='".addslashes(_T('info_deplier'))."' width='16' height='14' border='0'></a> "; return "<a href=\"javascript:swap_couche('".$numero_block["$nom_block"]."', '$spip_lang_rtl')\"><IMG name='triangle".$numero_block["$nom_block"]."' src='img_pack/deplierbas$spip_lang_rtl.gif' alt='' title='".addslashes(_T('info_deplier'))."' width='16' height='14' border='0'></a> ";
} }
} }
init_layer(); init_layer();
?> ?>
\ No newline at end of file
...@@ -8,15 +8,15 @@ function MM_findObj(n, d) { //v4.0 ...@@ -8,15 +8,15 @@ function MM_findObj(n, d) { //v4.0
if(!x && document.getElementById) x=document.getElementById(n); return x; if(!x && document.getElementById) x=document.getElementById(n); return x;
} }
function swap_couche(couche){ function swap_couche(couche, rtl) {
triangle = MM_findObj('triangle' + couche); triangle = MM_findObj('triangle' + couche);
if (!(layer = MM_findObj('Layer' + couche))) return; if (!(layer = MM_findObj('Layer' + couche))) return;
if (vis[couche] == 'hide'){ if (vis[couche] == 'hide'){
if (triangle) triangle.src = 'img_pack/deplierbas.gif'; if (triangle) triangle.src = 'img_pack/deplierbas' + rtl + '.gif';
layer.style.display = 'block'; layer.style.display = 'block';
vis[couche] = 'show'; vis[couche] = 'show';
} else { } else {
if (triangle) triangle.src = 'img_pack/deplierhaut.gif'; if (triangle) triangle.src = 'img_pack/deplierhaut' + rtl + '.gif';
layer.style.display = 'none'; layer.style.display = 'none';
vis[couche] = 'hide'; vis[couche] = 'hide';
} }
......
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