diff --git a/ecrire/exec/articles_ortho.php b/ecrire/exec/articles_ortho.php index 5f64593e1565f1b848cd016e08964f31d0a9628b..290ebef14ac92647bc400ab94ef41200f5dd8047 100644 --- a/ecrire/exec/articles_ortho.php +++ b/ecrire/exec/articles_ortho.php @@ -104,7 +104,7 @@ function debut_html($titre = "", $rubrique="") { // Fin des entetes echo "\n</head>\n"; echo "<body ", _ATTRIBUTES_BODY, " - onLoad=\"setActiveStyleSheet('invisible');$browser_verifForm\">"; + onLoad=\"$browser_verifForm\">"; } diff --git a/ecrire/img_pack/presentation.js b/ecrire/img_pack/presentation.js index f8fe4aeee26edcf202660ec15756de2de2b13e41..98fc1c8455533a13d4ff35ce8c42847bc6c76b53 100644 --- a/ecrire/img_pack/presentation.js +++ b/ecrire/img_pack/presentation.js @@ -79,16 +79,6 @@ function changeclass(objet, myClass) { function changesurvol(iddiv, 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) { element = findObj(objet); diff --git a/ecrire/inc/layer.php b/ecrire/inc/layer.php index 52465d90fc07547ccf8fee2016ac48e6ec77e7c4..b4886e1578f3d52c318fad40ac92b9d18101c56c 100644 --- a/ecrire/inc/layer.php +++ b/ecrire/inc/layer.php @@ -89,6 +89,11 @@ function bouton_block_visible($nom_block){ } function produire_acceder_couche($couches, $nom, $icone) { + + // ne rien afficher si js desactive + if ($_COOKIE['spip_accepte_ajax'] == -1) + return ''; + $onclick = array(); foreach($couches as $i=>$couche) $onclick[] = 'swap_couche(' . $couche[0] diff --git a/ecrire/inc/presentation.php b/ecrire/inc/presentation.php index 80a052a69c059b69be1328c6eb00f5cd7217f8c2..2bea0e60a454a89c6c45e52d16498ef803fbe5c2 100644 --- a/ecrire/inc/presentation.php +++ b/ecrire/inc/presentation.php @@ -1594,13 +1594,11 @@ function envoi_link($nom_site_spip, $rubrique="") { . '<link rel="stylesheet" type="text/css" href="' . _DIR_IMG_PACK . 'spip_style_print.css" media="print" >' . "\n" - // CSS "visible au chargement", hack necessaire pour garder un depliement - // sympathique meme sans javascript (on exagere ?) - // Pour l'explication voir http://www.alistapart.com/articles/alternate/ - . '<link rel="alternate stylesheet" type="text/css" href="' . _DIR_IMG_PACK - . 'spip_style_invisible.css" title="invisible" >' . "\n" - . '<link rel="stylesheet" href="' . _DIR_IMG_PACK - . 'spip_style_visible.css" title="visible" >' . "\n" + // CSS "visible au chargement" differente selon js actif ou non + . '<link rel="stylesheet" type="text/css" href="' . _DIR_IMG_PACK + . 'spip_style_' + . (($_COOKIE['spip_accepte_ajax'] != -1) ? 'invisible' : 'visible') + . '.css" >' . "\n" // favicon.ico . '<link rel="shortcut icon" href="' @@ -2040,7 +2038,7 @@ function init_body($rubrique='accueil', $sous_rubrique='accueil', $onLoad='', $i echo pipeline('body_prive',"<body ". _ATTRIBUTES_BODY . ' onLoad="' - . "setActiveStyleSheet('invisible');$browser_verifForm$onLoad" + . "$browser_verifForm$onLoad" . '">'); if ($spip_ecran == "large") $largeur = 974;