diff --git a/.gitattributes b/.gitattributes index edc05b2fdb456b1974c55f366b6ac119e114e889..a51245def3c618e8ee9e1d3786bd9885affc5b5a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -45,6 +45,18 @@ IMG/icones/xcf-dist.png -text IMG/icones/xls-dist.png -text IMG/icones/xml-dist.png -text IMG/icones/zip-dist.png -text +IMG/icones_barre/barre-a-grave.png -text +IMG/icones_barre/barre-bold.png -text +IMG/icones_barre/barre-e-aigu.png -text +IMG/icones_barre/barre-euro.png -text +IMG/icones_barre/barre-guillemets.png -text +IMG/icones_barre/barre-intertitre.png -text +IMG/icones_barre/barre-italic.png -text +IMG/icones_barre/barre-lien.png -text +IMG/icones_barre/barre-note.png -text +IMG/icones_barre/barre-oe-maj.png -text +IMG/icones_barre/barre-oe.png -text +IMG/icones_barre/barre-quote.png -text IMG/test.gif -text IMG/test.jpg -text IMG/test.png -text @@ -61,24 +73,11 @@ ecrire/img_pack/aide_rtl.gif -text ecrire/img_pack/article-24.gif -text ecrire/img_pack/asuivre-24.gif -text ecrire/img_pack/asuivre-48.gif -text -ecrire/img_pack/barre-a-grave.png -text ecrire/img_pack/barre-blanc.gif -text -ecrire/img_pack/barre-bold.png -text ecrire/img_pack/barre-couleurs.gif -text ecrire/img_pack/barre-d.gif -text -ecrire/img_pack/barre-e-aigu.png -text -ecrire/img_pack/barre-euro.png -text ecrire/img_pack/barre-g.gif -text -ecrire/img_pack/barre-guillemets.png -text -ecrire/img_pack/barre-intertitre.png -text -ecrire/img_pack/barre-italic.png -text -ecrire/img_pack/barre-lien.png -text ecrire/img_pack/barre-noir.gif -text -ecrire/img_pack/barre-note.png -text -ecrire/img_pack/barre-oe-maj.png -text -ecrire/img_pack/barre-oe.png -text -ecrire/img_pack/barre-quote.png -text -ecrire/img_pack/barre-wikipedia.png -text ecrire/img_pack/base-24.gif -text ecrire/img_pack/breve-24.gif -text ecrire/img_pack/cache-24.gif -text diff --git a/ecrire/img_pack/barre-a-grave.png b/IMG/icones_barre/barre-a-grave.png similarity index 100% rename from ecrire/img_pack/barre-a-grave.png rename to IMG/icones_barre/barre-a-grave.png diff --git a/ecrire/img_pack/barre-bold.png b/IMG/icones_barre/barre-bold.png similarity index 100% rename from ecrire/img_pack/barre-bold.png rename to IMG/icones_barre/barre-bold.png diff --git a/ecrire/img_pack/barre-e-aigu.png b/IMG/icones_barre/barre-e-aigu.png similarity index 100% rename from ecrire/img_pack/barre-e-aigu.png rename to IMG/icones_barre/barre-e-aigu.png diff --git a/ecrire/img_pack/barre-euro.png b/IMG/icones_barre/barre-euro.png similarity index 100% rename from ecrire/img_pack/barre-euro.png rename to IMG/icones_barre/barre-euro.png diff --git a/ecrire/img_pack/barre-guillemets.png b/IMG/icones_barre/barre-guillemets.png similarity index 100% rename from ecrire/img_pack/barre-guillemets.png rename to IMG/icones_barre/barre-guillemets.png diff --git a/ecrire/img_pack/barre-intertitre.png b/IMG/icones_barre/barre-intertitre.png similarity index 100% rename from ecrire/img_pack/barre-intertitre.png rename to IMG/icones_barre/barre-intertitre.png diff --git a/ecrire/img_pack/barre-italic.png b/IMG/icones_barre/barre-italic.png similarity index 100% rename from ecrire/img_pack/barre-italic.png rename to IMG/icones_barre/barre-italic.png diff --git a/ecrire/img_pack/barre-lien.png b/IMG/icones_barre/barre-lien.png similarity index 100% rename from ecrire/img_pack/barre-lien.png rename to IMG/icones_barre/barre-lien.png diff --git a/ecrire/img_pack/barre-note.png b/IMG/icones_barre/barre-note.png similarity index 100% rename from ecrire/img_pack/barre-note.png rename to IMG/icones_barre/barre-note.png diff --git a/ecrire/img_pack/barre-oe-maj.png b/IMG/icones_barre/barre-oe-maj.png similarity index 100% rename from ecrire/img_pack/barre-oe-maj.png rename to IMG/icones_barre/barre-oe-maj.png diff --git a/ecrire/img_pack/barre-oe.png b/IMG/icones_barre/barre-oe.png similarity index 100% rename from ecrire/img_pack/barre-oe.png rename to IMG/icones_barre/barre-oe.png diff --git a/ecrire/img_pack/barre-quote.png b/IMG/icones_barre/barre-quote.png similarity index 100% rename from ecrire/img_pack/barre-quote.png rename to IMG/icones_barre/barre-quote.png diff --git a/ecrire/img_pack/barre-wikipedia.png b/ecrire/img_pack/barre-wikipedia.png deleted file mode 100644 index a8a5714ab15f6ac27ccd1e21530af7c52bbc9e7a..0000000000000000000000000000000000000000 Binary files a/ecrire/img_pack/barre-wikipedia.png and /dev/null differ diff --git a/ecrire/inc_barre.php3 b/ecrire/inc_barre.php3 index a5f81782ce4b650377ed92da3f5286d807073446..fa7e1c5e82b410bafb66dfdfbd213f1243aa6f53 100644 --- a/ecrire/inc_barre.php3 +++ b/ecrire/inc_barre.php3 @@ -31,7 +31,7 @@ function afficher_script_barre(){ if ($flag_script_deja_affiche != 1) { $flag_script_deja_affiche = 1; - $ret = '<script type="text/javascript" src="'.($flag_ecrire ? "" : "ecrire/").'spip_barre.js">'; + $ret = '<script type="text/javascript" src="'.($flag_ecrire ? "../" : "").'spip_barre.js">'; $ret .= "</script>\n"; return $ret; } @@ -40,8 +40,8 @@ function afficher_script_barre(){ function bouton_barre_racc($action, $img, $help, $formulaire, $texte) { global $flag_ecrire; $champ = "document.$formulaire.$texte"; - $champhelp = "document.$formulaire.helpbox"; - return "<a href=\"".$action."\" onMouseOver=\"helpline('$help')\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/".$img."' border='0' height='16' title='$help'></a>"; + $champhelp = "document.$formulaire.helpbox$texte"; + return "<a href=\"".$action."\" onMouseOver=\"helpline('$help',$champhelp)\"><img src='".($flag_ecrire ? "../" : "")."IMG/icones_barre/".$img."' border='0' height='16' title='$help' align='middle'></a>"; } function afficher_barre($formulaire='',$texte='', $forum=false) { @@ -50,9 +50,10 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { if (test_barre()) { $ret = afficher_script_barre(); $champ = "document.$formulaire.$texte"; - $ret .= "<table cellpadding='0' cellspacing='0' border='0' width='100%'>"; + $ret .= "<table cellpadding='0' style='padding-top:2px;' cellspacing='0' border='0' width='100%'>"; $ret .= "<tr width='100%'>"; $ret .= "<td align='left'>"; + $col++; $ret .= bouton_barre_racc ("javascript:barre_raccourci('{{','}}',$champ)", "barre-bold.png", "Mettre en {{gras}}", $formulaire, $texte); $ret .= bouton_barre_racc ("javascript:barre_raccourci('{','}',$champ)", "barre-italic.png", "Mettre en {italique}", $formulaire, $texte); if (!$forum) { @@ -70,7 +71,8 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { } $ret .= "</td>"; - $ret .= "<td align='right'>"; + $ret .= "<td align='center'>"; + $col++; if ($spip_lang == "fr") { $ret .= bouton_barre_racc ("javascript:barre_raccourci('«','»',$champ)", "barre-guillemets.png", "InsŽrer des « guillemets français »", $formulaire, $texte); //$ret .= "<a href=\"javascript:barre_raccourci('«','»',$champ, 'InsŽrer des « guillemets français »')\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-guillemets.png' border='0' width='24' height='24' title='Placer entre guillemets'></a>"; @@ -87,8 +89,16 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { $ret .= bouton_barre_racc ("javascript:barre_inserer('€',$champ)", "barre-euro.png", "Insérer le symbole euro", $formulaire, $texte); } $ret .= "</td>"; + + if ($flag_ecrire) { + $ret .= "<td align='right' onMouseOver=\"helpline('En savoir plus sur les raccourcis typographiques',helpbox$texte)\">"; + $col++; + $ret .= aide("raccourcis"); + $ret .= "</td>"; + } + $ret .= "</tr>"; - $ret .= "<tr><td colspan='2'><input type='text' name='helpbox' size='45' maxlength='100' style='width:100%; font-size:10px; background-color: #eeeeee; border: 0px solid #eeeeee;' value='Utilisez les raccourcis de SPIP pour enrichir votre mise en pages' /></td></tr>"; + $ret .= "<tr><td colspan='$col'><input type='text' name='helpbox".$texte."' size='45' maxlength='100' style='width:100%; font-size:10px; background-color: #eeeeee; border: 0px solid #eeeeee;' value='Utilisez les raccourcis de SPIP pour enrichir votre mise en pages' /></td></tr>"; $ret .= "</table>"; } return $ret; diff --git a/ecrire/spip_barre.js b/spip_barre.js similarity index 97% rename from ecrire/spip_barre.js rename to spip_barre.js index 725232d0442843d86d06292e21c72d11ce5a4b35..f6a21c8fc9a4edfbdc402f9781e8c8fb56cb327b 100644 --- a/ecrire/spip_barre.js +++ b/spip_barre.js @@ -70,8 +70,8 @@ function barre_inserer(text,champ) { } // Shows the help messages in the helpline window -function helpline(help) { - document.formulaire.helpbox.value = help; +function helpline(help, champ) { + champ.value = help; }