diff --git a/ecrire/exec/aide_index.php b/ecrire/exec/aide_index.php index fb34eea1b1baa0c03e7d40c1323452d336d401c6..bb3f67e6b9dacafba51e99bb284932ae66d00aee 100644 --- a/ecrire/exec/aide_index.php +++ b/ecrire/exec/aide_index.php @@ -157,7 +157,7 @@ function help_body($aide, $html, $lang_aide='') { </div></center> <div style="position:absolute; bottom: 10px; right:20px; font-size: 12px; ">'. - preg_replace(",<a ,i", "<a target='_new' ",_T('info_copyright_doc')). + preg_replace(",<a ,i", "<a class='target_blank' ",_T('info_copyright_doc')). '</div>'; } @@ -174,7 +174,18 @@ function help_body($aide, $html, $lang_aide='') { generer_url_ecrire('aide_index', "img=$img", false, true); $suite = substr($suite, $p + strlen($r[0])); } + + echo '<script type="text/javascript"><!-- +jQuery(function(){ + jQuery("a.target_blank").click(function(){ + window.open(this.href); + return false; + }); +}); + +//--></script> +'; echo _STYLE_AIDE_BODY, "</head>\n"; echo '<body bgcolor="#FFFFFF" text="#000000" topmargin="24" leftmargin="24" marginwidth="24" marginheight="24"'; @@ -198,7 +209,7 @@ function help_body($aide, $html, $lang_aide='') { $html = justifier($html . $suite ); // Remplacer les liens externes par des liens ouvrants (a cause des frames) - $html = ereg_replace('<a href="(http://[^"]+)"([^>]*)>', '<a href="\\1"\\2 target="_blank">', $html); + $html = ereg_replace('<a href="(http://[^"]+)"([^>]*)>', '<a href="\\1"\\2 class="target_blank">', $html); echo $html, '</body>'; } @@ -297,12 +308,20 @@ var curr_article; // http://doc.spip.org/@activer_article function activer_article(id) { if (curr_article) - document.getElementById(curr_article).className = "article-inactif"; + jQuery("#"+curr_article).removeClass("article-actif").addClass("article-inactif"); if (id) { - document.getElementById(id).className = "article-actif"; + jQuery("#"+id).removeClass("article-inactif").addClass("article-actif"); curr_article = id; } } + +jQuery(function(){ + jQuery("a.target_droite").click(function(){ + window.open(this.href,"droite"); + return false; + }); +}); + //--></script> ', $GLOBALS['browser_layer'], @@ -408,9 +427,9 @@ function article($titre, $lien, $statut = "redac") { else { $class = "article-inactif"; } - $texte[$ligne] .= "<a class='$class' id='$id' + $texte[$ligne] .= "<a class='$class target_droite' id='$id' href='" . generer_url_ecrire("aide_index", "aide=$lien&frame=body&var_lang=$spip_lang", false, true) . - "' target='droite' onclick=\"activer_article('$id');return true;\">$titre</a><br style='clear:both;' />\n"; + "' onclick=\"activer_article('$id');return true;\">$titre</a><br style='clear:both;' />\n"; } } @@ -468,6 +487,8 @@ else { header("Content-Type: text/html; charset=utf-8"); echo _DOCTYPE_AIDE, html_lang_attributes(); echo "<head><title>", _T('info_aide_en_ligne'), "</title>\n"; + include_spip("inc/filtres"); + echo f_jQuery(""); if ($frame == 'menu') help_menu($aide, $html, $lang); diff --git a/ecrire/exec/brouteur_frame.php b/ecrire/exec/brouteur_frame.php index 775b5dc9364ede1e58d8d3591be88097d1239994..0ab4038eac2fd3bf6f1dcb4e1fdc55dd929544e6 100644 --- a/ecrire/exec/brouteur_frame.php +++ b/ecrire/exec/brouteur_frame.php @@ -35,6 +35,17 @@ function exec_brouteur_frame_dist() { . "' />\n" . envoi_link(_T('info_mon_site_spip')) . pipeline('header_prive', $head) + . '<script type="text/javascript"><!-- + +jQuery(function(){ + jQuery("a.iframe").click(function(){ + window.open(this.href,"iframe"+this.rel); + return false; + }); +}); + +//--></script> + ' . "</head>\n<body>"; if ($spip_ecran == "large") { @@ -128,14 +139,14 @@ onmouseover=\"changeclass(this, 'brouteur_rubrique_on');\" onmouseout=\"changeclass(this, 'brouteur_rubrique');\">"; if ($id_parent == '0') { - echo "\n<div style='", frame_background_image("secteur-24.gif"), ";'><a href='", generer_url_ecrire('brouteur_frame', "rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui"), "' target='iframe", ($frame+1), "'>", + echo "\n<div style='", frame_background_image("secteur-24.gif"), ";'><a href='", generer_url_ecrire('brouteur_frame', "rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui"), "' class='iframe' rel='", ($frame+1), "'>", $titre, "</a></div>"; } else { if ($frame+1 < $nb_col) echo "\n<div style='", - frame_background_image("rubrique-24.gif"), ";'><a href='", generer_url_ecrire('brouteur_frame', "rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui"), "' target='iframe", + frame_background_image("rubrique-24.gif"), ";'><a href='", generer_url_ecrire('brouteur_frame', "rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui"), "' class='iframe' rel='", ($frame+1), "'>$titre</a></div>"; else echo "\n<div style='", @@ -197,7 +208,7 @@ onmouseout=\"changeclass(this, 'brouteur_rubrique');\">"; if ($cpt['n']) { echo "\n<div ", http_style_background('article-24.gif', "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px"), - "><b class='verdana2'><a href='", generer_url_ecrire('brouteur_frame', "special=redac&frame=".($frame+1)."&effacer_suivant=oui"), "' target='iframe",($frame+1),"'>", + "><b class='verdana2'><a href='", generer_url_ecrire('brouteur_frame', "special=redac&frame=".($frame+1)."&effacer_suivant=oui"), "' class='iframe' rel='",($frame+1),"'>", _T("info_cours_edition"),"</a></b></div>"; } @@ -206,7 +217,7 @@ onmouseout=\"changeclass(this, 'brouteur_rubrique');\">"; $cpt = spip_fetch_array(spip_query("SELECT COUNT(*) AS n FROM spip_breves WHERE statut = 'prop'")); if ($cpt['n']) echo "\n<div ", http_style_background('article-24.gif', "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px"), - "><b class='verdana2'><a href='", generer_url_ecrire('brouteur_frame', "special=valider&frame=".($frame+1)."&effacer_suivant=oui"), "' target='iframe", + "><b class='verdana2'><a href='", generer_url_ecrire('brouteur_frame', "special=valider&frame=".($frame+1)."&effacer_suivant=oui"), "' class='iframe' rel='", ($frame+1)."'>", _T("info_articles_proposes"), " / "._T("info_breves_valider")."</a></b></div>"; diff --git a/ecrire/inc/aider.php b/ecrire/inc/aider.php index 0fb2c6d8a52914be0c51fbcb0b9e1f09d0b99098..fbf0414a57a4bd24d85193feabf6938ddddfd181 100644 --- a/ecrire/inc/aider.php +++ b/ecrire/inc/aider.php @@ -21,7 +21,7 @@ function inc_aider_dist($aide='') { if (!$aide OR $spip_display == 4) return; $t = _T('titre_image_aide'); - return "\n <a target='spip_aide' class='aide'\nhref='" + return "\n <a class='aide'\nhref='" . generer_url_ecrire("aide_index", "aide=$aide&var_lang=$spip_lang") . "'\nonclick=\"javascript:window.open(this.href," . "'spip_aide', " @@ -39,4 +39,4 @@ function inc_aider_dist($aide='') { function aide_lang_dir($spip_lang,$spip_lang_rtl) { return ($spip_lang<>'he') ? $spip_lang_rtl : ''; } -?> \ No newline at end of file +?> diff --git a/ecrire/inc/boutons.php b/ecrire/inc/boutons.php index e0f7e00ae2b4f1e3e53337c1bf1490f2bae7131a..fa67985592b1344107819d6472b156d66456c4c2 100644 --- a/ecrire/inc/boutons.php +++ b/ecrire/inc/boutons.php @@ -79,7 +79,7 @@ function definir_barre_boutons() { $urlAide= generer_url_ecrire('aide_index')."&var_lang=$spip_lang"; $boutons_admin['aide_index']= new Bouton('aide-48'.$spip_lang_rtl.'.png', 'icone_aide_ligne', - $urlAide, null, "javascript:window.open('$urlAide', 'aide_spip', 'scrollbars=yes,resizable=yes,width=740,height=580');", 'aide_spip'); + $urlAide, null, "javascript:window.open('$urlAide', 'spip_aide', 'scrollbars=yes,resizable=yes,width=740,height=580');", 'aide_spip'); $boutons_admin['visiter']= new Bouton("visiter-48$spip_lang_rtl.png", 'icone_visiter_site', @@ -388,7 +388,7 @@ function icone_bandeau_principal($texte, $lien, $fond, $rubrique_icone = "vide", $class_select = ($sous_rubrique_icone == $sous_rubrique) ? " class='selection'" : ''; if (eregi("^javascript:",$lien)) { - $a_href = "\nonclick=\"$lien; return false;\" href='$lien_noscript' target='spip_aide'"; + $a_href = "\nonclick=\"$lien; return false;\" href='$lien_noscript' "; } else { $a_href = "\nhref=\"$lien\""; diff --git a/ecrire/inc/minipres.php b/ecrire/inc/minipres.php index 4ab0f18b6ed8ac0c89cf2279d68f98f476a684de..7ccd003ebe595b4f7ec0f3bb78f760314195d188 100644 --- a/ecrire/inc/minipres.php +++ b/ecrire/inc/minipres.php @@ -197,14 +197,14 @@ function info_copyright() { if ($svn_revision = version_svn_courante(_DIR_RACINE)) { $version .= ' ' . (($svn_revision < 0) ? 'SVN ':'') . "[<a href='http://trac.rezo.net/trac/spip/changeset/" - . abs($svn_revision) . "' target='_blank'>" + . abs($svn_revision) . "' onclick=\"window.open(this.href); return false;\">" . abs($svn_revision) . "</a>]"; } return _T('info_copyright', array('spip' => "<b>SPIP $version</b> ", 'lien_gpl' => - "<a href='". generer_url_ecrire("aide_index", "aide=licence&var_lang=$spip_lang") . "' target='spip_aide' onclick=\"javascript:window.open(this.href, 'aide_spip', 'scrollbars=yes,resizable=yes,width=740,height=580'); return false;\">" . _T('info_copyright_gpl')."</a>")); + "<a href='". generer_url_ecrire("aide_index", "aide=licence&var_lang=$spip_lang") . "' onclick=\"window.open(this.href, 'spip_aide', 'scrollbars=yes,resizable=yes,width=740,height=580'); return false;\">" . _T('info_copyright_gpl')."</a>")); }