Skip to content
Extraits de code Groupes Projets
Valider b3608fd5 rédigé par ARNO*'s avatar ARNO*
Parcourir les fichiers

Modif barre de raccourcis. Ajout d'une barre d'explication

parent abcc08f1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
ecrire/img_pack/barre-a-grave.png

582 octets | W: | H:

ecrire/img_pack/barre-a-grave.png

363 octets | W: | H:

ecrire/img_pack/barre-a-grave.png
ecrire/img_pack/barre-a-grave.png
ecrire/img_pack/barre-a-grave.png
ecrire/img_pack/barre-a-grave.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-bold.png

504 octets | W: | H:

ecrire/img_pack/barre-bold.png

316 octets | W: | H:

ecrire/img_pack/barre-bold.png
ecrire/img_pack/barre-bold.png
ecrire/img_pack/barre-bold.png
ecrire/img_pack/barre-bold.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-e-aigu.png

586 octets | W: | H:

ecrire/img_pack/barre-e-aigu.png

335 octets | W: | H:

ecrire/img_pack/barre-e-aigu.png
ecrire/img_pack/barre-e-aigu.png
ecrire/img_pack/barre-e-aigu.png
ecrire/img_pack/barre-e-aigu.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-euro.png

564 octets | W: | H:

ecrire/img_pack/barre-euro.png

367 octets | W: | H:

ecrire/img_pack/barre-euro.png
ecrire/img_pack/barre-euro.png
ecrire/img_pack/barre-euro.png
ecrire/img_pack/barre-euro.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-guillemets.png

529 octets | W: | H:

ecrire/img_pack/barre-guillemets.png

335 octets | W: | H:

ecrire/img_pack/barre-guillemets.png
ecrire/img_pack/barre-guillemets.png
ecrire/img_pack/barre-guillemets.png
ecrire/img_pack/barre-guillemets.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-intertitre.png

627 octets | W: | H:

ecrire/img_pack/barre-intertitre.png

417 octets | W: | H:

ecrire/img_pack/barre-intertitre.png
ecrire/img_pack/barre-intertitre.png
ecrire/img_pack/barre-intertitre.png
ecrire/img_pack/barre-intertitre.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-italic.png

541 octets | W: | H:

ecrire/img_pack/barre-italic.png

329 octets | W: | H:

ecrire/img_pack/barre-italic.png
ecrire/img_pack/barre-italic.png
ecrire/img_pack/barre-italic.png
ecrire/img_pack/barre-italic.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-lien.png

645 octets | W: | H:

ecrire/img_pack/barre-lien.png

473 octets | W: | H:

ecrire/img_pack/barre-lien.png
ecrire/img_pack/barre-lien.png
ecrire/img_pack/barre-lien.png
ecrire/img_pack/barre-lien.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-note.png

506 octets | W: | H:

ecrire/img_pack/barre-note.png

415 octets | W: | H:

ecrire/img_pack/barre-note.png
ecrire/img_pack/barre-note.png
ecrire/img_pack/barre-note.png
ecrire/img_pack/barre-note.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-oe-maj.png

598 octets | W: | H:

ecrire/img_pack/barre-oe-maj.png

385 octets | W: | H:

ecrire/img_pack/barre-oe-maj.png
ecrire/img_pack/barre-oe-maj.png
ecrire/img_pack/barre-oe-maj.png
ecrire/img_pack/barre-oe-maj.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-oe.png

547 octets | W: | H:

ecrire/img_pack/barre-oe.png

364 octets | W: | H:

ecrire/img_pack/barre-oe.png
ecrire/img_pack/barre-oe.png
ecrire/img_pack/barre-oe.png
ecrire/img_pack/barre-oe.png
  • 2-up
  • Swipe
  • Onion skin
ecrire/img_pack/barre-quote.png

571 octets | W: | H:

ecrire/img_pack/barre-quote.png

413 octets | W: | H:

ecrire/img_pack/barre-quote.png
ecrire/img_pack/barre-quote.png
ecrire/img_pack/barre-quote.png
ecrire/img_pack/barre-quote.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -37,47 +37,59 @@ function afficher_script_barre(){ ...@@ -37,47 +37,59 @@ 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>";
}
function afficher_barre($formulaire='',$texte='', $forum=false) { function afficher_barre($formulaire='',$texte='', $forum=false) {
global $spip_lang, $flag_ecrire; global $spip_lang, $flag_ecrire;
if (test_barre()) { if (test_barre()) {
$ret = afficher_script_barre(); $ret = afficher_script_barre();
$champ = "document.$formulaire.$texte"; $champ = "document.$formulaire.$texte";
$ret .= "<div align='left'>"; $ret .= "<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
$ret .= "<a href=\"javascript:barre_raccourci('{{','}}',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-bold.png' border='0' width='24' height='24' title='Mettre en gras'></a>"; $ret .= "<tr width='100%'>";
$ret .= "&nbsp;"; $ret .= "<td align='left'>";
$ret .= "<a href=\"javascript:barre_raccourci('{','}',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-italic.png' border='0' width='24' height='24' title='Mettre en italique'></a>"; $ret .= bouton_barre_racc ("javascript:barre_raccourci('{{','}}',$champ)", "barre-bold.png", "Mettre en {{gras}}", $formulaire, $texte);
$ret .= "&nbsp;&nbsp;&nbsp;"; $ret .= bouton_barre_racc ("javascript:barre_raccourci('{','}',$champ)", "barre-italic.png", "Mettre en {italique}", $formulaire, $texte);
$ret .= "<a href=\"javascript:barre_raccourci('\n\n{{{','}}}\n\n',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-intertitre.png' border='0' width='24' height='24' title='Cr&eacute;er un intertitre'></a>"; if (!$forum) {
$ret .= "&nbsp;"; $ret .= "&nbsp;&nbsp;&nbsp;";
$ret .= "<a href=\"javascript:barre_raccourci('[[',']]',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-note.png' border='0' width='24' height='24' title='Cr&eacute;er une note de bas de page'></a>"; $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n{{{','}}}\n\n',$champ)", "barre-intertitre.png", "{{{Ins&eacute;rer un intertitre}}}", $formulaire, $texte);
$ret .= "&nbsp;&nbsp;&nbsp;";
$ret .= bouton_barre_racc ("javascript:barre_raccourci('[[',']]',$champ)", "barre-note.png", "[[Note de bas de page]]", $formulaire, $texte);
}
$ret .= "&nbsp;&nbsp;&nbsp;"; $ret .= "&nbsp;&nbsp;&nbsp;";
$ret .= "<a href=\"javascript:barre_demande('[','->',']','Veuillez indiquer l\'adresse de votre lien (vous pouvez indiquer une adresse Web sous la forme http://www.monsite/com ou simplement indiquer le num&eacute;ro d\'un article de ce site.',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-lien.png' border='0' width='24' height='24' title='Cr&eacute;er un lien hypertexte'></a>"; $ret .= bouton_barre_racc ("javascript:barre_demande('[','->',']','Veuillez indiquer l\'adresse de votre lien (vous pouvez indiquer une adresse Web sous la forme http://www.monsite/com ou simplement indiquer le num&eacute;ro d\'un article de ce site.',$champ)", "barre-lien.png", "Cr&eacute;er un [lien hypertexte->http://...]", $formulaire, $texte);
if ($forum) { if ($forum) {
$ret .= "&nbsp;&nbsp;&nbsp;"; $ret .= "&nbsp;&nbsp;&nbsp;";
$ret .= "<a href=\"javascript:barre_raccourci('\n\n<quote>','</quote>\n\n',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-quote.png' border='0' width='24' height='24' title='Citer un extrait'></a>"; $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n<quote>','</quote>\n\n',$champ)", "barre-quote.png", "<quote>Citer un message</quote>", $formulaire, $texte);
} }
$ret .= "</td>";
$ret .= "<td align='right'>";
if ($spip_lang == "fr") { if ($spip_lang == "fr") {
$ret .= "&nbsp;&nbsp;&nbsp;"; $ret .= bouton_barre_racc ("javascript:barre_raccourci('&laquo;','&raquo;',$champ)", "barre-guillemets.png", "Insrer des &laquo; guillemets fran&ccedil;ais &raquo;", $formulaire, $texte);
$ret .= "<a href=\"javascript:barre_raccourci('&laquo;','&raquo;',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-guillemets.png' border='0' width='24' height='24' title='Placer entre guillemets'></a>"; //$ret .= "<a href=\"javascript:barre_raccourci('&laquo;','&raquo;',$champ, 'Insrer des &laquo; guillemets fran&ccedil;ais &raquo;')\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-guillemets.png' border='0' width='24' height='24' title='Placer entre guillemets'></a>";
if (test_claret()) { if (test_claret()) {
$ret .= "&nbsp;"; $ret .= "&nbsp;&nbsp;&nbsp;";
$ret .= "<a href=\"javascript:barre_inserer('&OElig;',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-oe-maj.png' border='0' width='24' height='24' title='Ins&eacute;rer un E-dans-l-O majuscule'></a>"; $ret .= bouton_barre_racc ("javascript:barre_inserer('&OElig;',$champ)", "barre-oe-maj.png", "Ins&eacute;rer un E-dans-l-O majuscule", $formulaire, $texte);
$ret .= "&nbsp;"; $ret .= bouton_barre_racc ("javascript:barre_inserer('&oelig;',$champ)", "barre-oe.png", "Ins&eacute;rer un E-dans-l-O", $formulaire, $texte);
$ret .= "<a href=\"javascript:barre_inserer('&oelig;',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-oe.png' border='0' width='24' height='24' title='Ins&eacute;rer un E-dans-l-O'></a>"; $ret .= bouton_barre_racc ("javascript:barre_inserer('&Agrave;',$champ)", "barre-a-grave.png", "Ins&eacute;rer un A accent grave", $formulaire, $texte);
$ret .= "&nbsp;"; $ret .= bouton_barre_racc ("javascript:barre_inserer('&Eacute;',$champ)", "barre-e-aigu.png", "Ins&eacute;rer un E accent aigu", $formulaire, $texte);
$ret .= "<a href=\"javascript:barre_inserer('&Agrave;',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-a-grave.png' border='0' width='24' height='24' title='Ins&eacute;rer un A accent grave'></a>";
$ret .= "&nbsp;";
$ret .= "<a href=\"javascript:barre_inserer('&Eacute;',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-e-aigu.png' border='0' width='24' height='24' title='Ins&eacute;rer un E accent aigu'></a>";
} }
} }
if (test_claret()) { if (test_claret()) {
$ret .= "&nbsp;"; $ret .= "&nbsp;";
$ret .= "<a href=\"javascript:barre_inserer('&euro;',$champ)\"><img src='".($flag_ecrire ? "" : "ecrire/")."img_pack/barre-euro.png' border='0' width='24' height='24' title='Ins&eacute;rer le symbole euro'></a>"; $ret .= bouton_barre_racc ("javascript:barre_inserer('&euro;',$champ)", "barre-euro.png", "Ins&eacute;rer le symbole euro", $formulaire, $texte);
} }
$ret .= "<div>"; $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 .= "</table>";
} }
return $ret; return $ret;
} }
......
...@@ -27,8 +27,7 @@ function barre_raccourci(debut,fin,champ) { ...@@ -27,8 +27,7 @@ function barre_raccourci(debut,fin,champ) {
donotinsert = false; donotinsert = false;
theSelection = false; theSelection = false;
bblast = 0; bblast = 0;
if ((clientVer >= 4) && is_ie && is_win) if ((clientVer >= 4) && is_ie && is_win)
{ {
theSelection = document.selection.createRange().text; // Get text selection theSelection = document.selection.createRange().text; // Get text selection
...@@ -70,6 +69,11 @@ function barre_inserer(text,champ) { ...@@ -70,6 +69,11 @@ function barre_inserer(text,champ) {
} }
} }
// Shows the help messages in the helpline window
function helpline(help) {
document.formulaire.helpbox.value = help;
}
// From http://www.massless.org/mozedit/ // From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close) function mozWrap(txtarea, open, close)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter