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

fin du chargement de deux css, avec activation par javascript: accelere encore l'espace prive

parent e2bd8b1d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -104,7 +104,7 @@ function debut_html($titre = "", $rubrique="") { ...@@ -104,7 +104,7 @@ function debut_html($titre = "", $rubrique="") {
// Fin des entetes // Fin des entetes
echo "\n</head>\n"; echo "\n</head>\n";
echo "<body ", _ATTRIBUTES_BODY, " echo "<body ", _ATTRIBUTES_BODY, "
onLoad=\"setActiveStyleSheet('invisible');$browser_verifForm\">"; onLoad=\"$browser_verifForm\">";
} }
......
...@@ -79,16 +79,6 @@ function changeclass(objet, myClass) { ...@@ -79,16 +79,6 @@ function changeclass(objet, myClass) {
function changesurvol(iddiv, myClass) { function changesurvol(iddiv, myClass) {
document.getElementById(iddiv).className = myClass; document.getElementById(iddiv).className = myClass;
} }
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
function setvisibility (objet, statut) { function setvisibility (objet, statut) {
element = findObj(objet); element = findObj(objet);
......
...@@ -89,6 +89,11 @@ function bouton_block_visible($nom_block){ ...@@ -89,6 +89,11 @@ function bouton_block_visible($nom_block){
} }
function produire_acceder_couche($couches, $nom, $icone) { function produire_acceder_couche($couches, $nom, $icone) {
// ne rien afficher si js desactive
if ($_COOKIE['spip_accepte_ajax'] == -1)
return '';
$onclick = array(); $onclick = array();
foreach($couches as $i=>$couche) foreach($couches as $i=>$couche)
$onclick[] = 'swap_couche(' . $couche[0] $onclick[] = 'swap_couche(' . $couche[0]
......
...@@ -1594,13 +1594,11 @@ function envoi_link($nom_site_spip, $rubrique="") { ...@@ -1594,13 +1594,11 @@ function envoi_link($nom_site_spip, $rubrique="") {
. '<link rel="stylesheet" type="text/css" href="' . _DIR_IMG_PACK . '<link rel="stylesheet" type="text/css" href="' . _DIR_IMG_PACK
. 'spip_style_print.css" media="print" >' . "\n" . 'spip_style_print.css" media="print" >' . "\n"
// CSS "visible au chargement", hack necessaire pour garder un depliement // CSS "visible au chargement" differente selon js actif ou non
// sympathique meme sans javascript (on exagere ?) . '<link rel="stylesheet" type="text/css" href="' . _DIR_IMG_PACK
// Pour l'explication voir http://www.alistapart.com/articles/alternate/ . 'spip_style_'
. '<link rel="alternate stylesheet" type="text/css" href="' . _DIR_IMG_PACK . (($_COOKIE['spip_accepte_ajax'] != -1) ? 'invisible' : 'visible')
. 'spip_style_invisible.css" title="invisible" >' . "\n" . '.css" >' . "\n"
. '<link rel="stylesheet" href="' . _DIR_IMG_PACK
. 'spip_style_visible.css" title="visible" >' . "\n"
// favicon.ico // favicon.ico
. '<link rel="shortcut icon" href="' . '<link rel="shortcut icon" href="'
...@@ -2040,7 +2038,7 @@ function init_body($rubrique='accueil', $sous_rubrique='accueil', $onLoad='', $i ...@@ -2040,7 +2038,7 @@ function init_body($rubrique='accueil', $sous_rubrique='accueil', $onLoad='', $i
echo pipeline('body_prive',"<body ". _ATTRIBUTES_BODY echo pipeline('body_prive',"<body ". _ATTRIBUTES_BODY
. ' onLoad="' . ' onLoad="'
. "setActiveStyleSheet('invisible');$browser_verifForm$onLoad" . "$browser_verifForm$onLoad"
. '">'); . '">');
if ($spip_ecran == "large") $largeur = 974; if ($spip_ecran == "large") $largeur = 974;
......
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