diff --git a/.gitattributes b/.gitattributes index 1d7102f03e62a10f6ce4af2fec424e8680d6f753..3e229bdeeaee7090c421c9f64b6ed02bfb3ac17f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -45,6 +45,8 @@ 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/Eacute.png -text +IMG/icones_barre/OElig.png -text IMG/icones_barre/barre-a-grave.png -text IMG/icones_barre/barre-bold.png -text IMG/icones_barre/barre-cadre.png -text @@ -62,6 +64,15 @@ IMG/icones_barre/barre-oe.png -text IMG/icones_barre/barre-quote.png -text IMG/icones_barre/barre-tableau.png -text IMG/icones_barre/barre-wiki.png -text +IMG/icones_barre/blanc.png -text +IMG/icones_barre/euro.png -text +IMG/icones_barre/gras.png -text +IMG/icones_barre/guillemets.png -text +IMG/icones_barre/intertitre.png -text +IMG/icones_barre/italique.png -text +IMG/icones_barre/lien.png -text +IMG/icones_barre/notes.png -text +IMG/icones_barre/oelig.png -text IMG/test.gif -text IMG/test.jpg -text IMG/test.png -text diff --git a/IMG/icones_barre/Eacute.png b/IMG/icones_barre/Eacute.png new file mode 100644 index 0000000000000000000000000000000000000000..2e1e47d31363d896edddb9382979b26a6937e3b5 Binary files /dev/null and b/IMG/icones_barre/Eacute.png differ diff --git a/IMG/icones_barre/OElig.png b/IMG/icones_barre/OElig.png new file mode 100644 index 0000000000000000000000000000000000000000..02ab463aa4fe3f1e59ca0e265efb376a63da8467 Binary files /dev/null and b/IMG/icones_barre/OElig.png differ diff --git a/IMG/icones_barre/blanc.png b/IMG/icones_barre/blanc.png new file mode 100644 index 0000000000000000000000000000000000000000..765bb3d13b6dcfd324d15c80de828933686dc419 Binary files /dev/null and b/IMG/icones_barre/blanc.png differ diff --git a/IMG/icones_barre/euro.png b/IMG/icones_barre/euro.png new file mode 100644 index 0000000000000000000000000000000000000000..bc87fb5c609f982e834667e69aff7fbed0494a49 Binary files /dev/null and b/IMG/icones_barre/euro.png differ diff --git a/IMG/icones_barre/gras.png b/IMG/icones_barre/gras.png new file mode 100644 index 0000000000000000000000000000000000000000..6adc653788ea9262adfddfd56f08a67ea51bfa11 Binary files /dev/null and b/IMG/icones_barre/gras.png differ diff --git a/IMG/icones_barre/guillemets.png b/IMG/icones_barre/guillemets.png new file mode 100644 index 0000000000000000000000000000000000000000..1791b8c3319f49581a1e77acb25f100f6d290bdc Binary files /dev/null and b/IMG/icones_barre/guillemets.png differ diff --git a/IMG/icones_barre/intertitre.png b/IMG/icones_barre/intertitre.png new file mode 100644 index 0000000000000000000000000000000000000000..bbce06b02c66353163bcbb5c9dbb2b1d4e26e6d0 Binary files /dev/null and b/IMG/icones_barre/intertitre.png differ diff --git a/IMG/icones_barre/italique.png b/IMG/icones_barre/italique.png new file mode 100644 index 0000000000000000000000000000000000000000..f4273e31ffc9ca7c49df3ab5bdd3d224a67b6334 Binary files /dev/null and b/IMG/icones_barre/italique.png differ diff --git a/IMG/icones_barre/lien.png b/IMG/icones_barre/lien.png new file mode 100644 index 0000000000000000000000000000000000000000..7d7dca85055c735174b7efc71cca12b9d2a3aa6b Binary files /dev/null and b/IMG/icones_barre/lien.png differ diff --git a/IMG/icones_barre/notes.png b/IMG/icones_barre/notes.png new file mode 100644 index 0000000000000000000000000000000000000000..9a005870ebd9f31c8db3ae256afd93f1c60fadfc Binary files /dev/null and b/IMG/icones_barre/notes.png differ diff --git a/IMG/icones_barre/oelig.png b/IMG/icones_barre/oelig.png new file mode 100644 index 0000000000000000000000000000000000000000..6e5dc464498c8b54294b1ffeadf3b68d0962803b Binary files /dev/null and b/IMG/icones_barre/oelig.png differ diff --git a/ecrire/inc_barre.php3 b/ecrire/inc_barre.php3 index ba4a7520e3adfc19a04aa0d41f14e96e5c754b10..220ef9857f0d46903e1ebb28d775e2d298750dd3 100644 --- a/ecrire/inc_barre.php3 +++ b/ecrire/inc_barre.php3 @@ -8,8 +8,8 @@ define("_INC_BARRE", "1"); function test_barre() { global $HTTP_UA_OS, $browser_name, $browser_version, $browser_description, $browser_rev; - - if ($browser_name == '') verif_butineur(); + + if ($browser_name == '') verif_butineur(); if ( (eregi("msie", $browser_name) AND $browser_version >= 5 AND $HTTP_UA_OS != 'MacOS') @@ -28,12 +28,12 @@ function test_claret() { function afficher_script_barre(){ global $flag_ecrire, $flag_script_deja_affiche; - + if ($flag_script_deja_affiche != 1) { $flag_script_deja_affiche = 1; $ret = '<script type="text/javascript" src="'.($flag_ecrire ? "../" : "").'spip_barre.js">'; $ret .= "</script>\n"; - return $ret; + return $ret; } } @@ -41,87 +41,85 @@ function bouton_barre_racc($action, $img, $help, $formulaire, $texte) { global $flag_ecrire; $champ = "document.$formulaire.$texte"; $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' align='middle'></a>"; + return "<a href=\"".$action."\" class='spip_barre' title=\"".attribut_html($help)."\" " + ."onMouseOver=\"helpline('$help',$champhelp)\" onMouseOut=\"helpline('Utilisez les raccourcis typographiques pour enrichir votre mise en page', $champhelp)\">" + ."<img src='".($flag_ecrire ? "../" : "")."IMG/icones_barre/".$img."' border='0' height='24' align='middle'></a>"; } function afficher_barre($formulaire='',$texte='', $forum=false) { global $spip_lang, $flag_ecrire, $options; - if (test_barre()) { + if (test_barre()) { $ret = afficher_script_barre(); $champ = "document.$formulaire.$texte"; - $ret .= "<table style='background-color: #dedede; margin-top:2px; padding-left: 2px; padding-top: 2px; border: 0px solid #eeeeee; border-left: 1px solid #ffffff; border-top: 1px solid #ffffff; border-bottom: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa;' cellpadding='0' cellspacing='0' border='0' width='100%'>"; - $ret .= "<tr width='100%'>"; + $ret .= "<table style='background-color: #e8e8e4; margin-top:2px; padding-left: 2px; padding-top: 2px; border: 0px solid #eeeeee; border-left: 1px solid #ffffff; border-top: 1px solid #ffffff; border-bottom: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa;' cellpadding='0' cellspacing='0' border='0' width='100%'>"; + $ret .= "<tr width='100%' class='spip_barre'>"; $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) { - $ret .= " "; - $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n{{{','}}}\n\n',$champ)", "barre-intertitre.png", "{{{Insérer un intertitre}}}", $formulaire, $texte); - $ret .= " "; - $ret .= bouton_barre_racc ("javascript:barre_raccourci('[[',']]',$champ)", "barre-note.png", "[[Note de bas de page]]", $formulaire, $texte); + // Italique, gras, intertitres + $ret .= bouton_barre_racc ("javascript:barre_raccourci('{','}',$champ)", "italique.png", "Mettre en {italique}", $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_raccourci('{{','}}',$champ)", "gras.png", "Mettre en {{gras}}", $formulaire, $texte); + if (!$forum) { + $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n{{{','}}}\n\n',$champ)", "intertitre.png", "Transformer en {{{intertitre}}}", $formulaire, $texte); } $ret .= " "; - $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éro d\'un article de ce site.',$champ)", "barre-lien.png", "Créer un [lien hypertexte->http://...]", $formulaire, $texte); - if ($options == "avancees") { - $ret .= " "; - $ret .= bouton_barre_racc ("javascript:barre_raccourci('[?',']',$champ)", "barre-wiki.png", "Entrée du [?glossaire] (Wikipedia)", $formulaire, $texte); - $ret .= " "; - $ret .= bouton_barre_racc ("javascript:barre_tableau($champ)", "barre-tableau.png", "Insérer un tableau", $formulaire, $texte); + + // Lien hypertexte, notes de bas de page, citations ou guillemets + $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éro d\'un article de ce site.',$champ)", + "lien.png", "Transformer en [lien hypertexte->http://...]", $formulaire, $texte); + if (!$forum) { + $ret .= bouton_barre_racc ("javascript:barre_raccourci('[[',']]',$champ)", "notes.png", "Transformer en [[Note de bas de page]]", $formulaire, $texte); } - if ($forum) { $ret .= " "; - $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 .= bouton_barre_racc ("javascript:barre_raccourci('\n\n<quote>','</quote>\n\n',$champ)", "guillemets.png", "<quote>Citer un message</quote>", $formulaire, $texte); + } + else if ($spip_lang == "fr" OR $spip_lang == "eo" OR $spip_lang == "cpf") { + $ret .= bouton_barre_racc ("javascript:barre_raccourci('«','»',$champ)", "guillemets.png", "Entourer de « guillemets français »", $formulaire, $texte); + } + if ($options == "avancees") { + /*$ret .= " "; + $ret .= bouton_barre_racc ("javascript:barre_raccourci('[?',']',$champ)", "barre-wiki.png", "Entrée du [?glossaire] (Wikipedia)", $formulaire, $texte); + $ret .= " "; + $ret .= bouton_barre_racc ("javascript:barre_tableau($champ)", "barre-tableau.png", "Insérer un tableau", $formulaire, $texte);*/ } - - /*if ($options == "avancees") { - $ret .= " "; - $ret .= bouton_barre_racc ("javascript:barre_raccourci('<html>','</html>',$champ)", "barre-html.png", "<html>Ne pas appliquer de correction typographique</html>", $formulaire, $texte); - $ret .= bouton_barre_racc ("javascript:barre_raccourci('<code>','</code>',$champ)", "barre-code.png", "Afficher du <code>code informatique</code>", $formulaire, $texte); - if (!$forum) $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n<cadre>','</cadre>\n\n',$champ)", "barre-cadre.png", "<cadre>Afficher un pavé de code informatique</cadre>", $formulaire, $texte); - }*/ - $ret .= "</td>"; - + + // Insertion de caracteres difficiles a taper au clavier $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 .= " "; - $ret .= bouton_barre_racc ("javascript:barre_inserer('Œ',$champ)", "barre-oe-maj.png", "Insérer un E-dans-l-O majuscule", $formulaire, $texte); - $ret .= bouton_barre_racc ("javascript:barre_inserer('œ',$champ)", "barre-oe.png", "Insérer un E-dans-l-O", $formulaire, $texte); - $ret .= bouton_barre_racc ("javascript:barre_inserer('À',$champ)", "barre-a-grave.png", "Insérer un A accent grave", $formulaire, $texte); - $ret .= bouton_barre_racc ("javascript:barre_inserer('É',$champ)", "barre-e-aigu.png", "Insérer un E accent aigu", $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_inserer('À',$champ)", "Agrave.png", "Insérer un A accent grave majuscule", $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_inserer('É',$champ)", "Eacute.png", "Insérer un E accent aigu majuscule", $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_inserer('œ',$champ)", "oelig.png", "Insérer un E-dans-l-O", $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_inserer('Œ',$champ)", "OElig.png", "Insérer un E-dans-l-O majuscule", $formulaire, $texte); } - $ret .= " "; - $ret .= bouton_barre_racc ("javascript:barre_inserer('€',$champ)", "barre-euro.png", "Insérer le symbole euro", $formulaire, $texte); + //$ret .= bouton_barre_racc ("javascript:barre_inserer('€',$champ)", "euro.png", "Insérer le symbole euro", $formulaire, $texte); $ret .= "</td>"; - + $ret .= "<td> </td>"; $col++; - + if ($flag_ecrire) { - $ret .= "<td align='right' onMouseOver=\"helpline('En savoir plus sur les raccourcis typographiques',helpbox$texte)\">"; + $ret .= "<td align='right' onMouseOver=\"helpline('En savoir plus sur les raccourcis typographiques',helpbox$texte)\" onMouseOut=\"helpline('Utilisez les raccourcis typographiques pour enrichir votre mise en page', $champhelp)\">"; $col++; $ret .= aide("raccourcis"); $ret .= " "; $ret .= "</td>"; } - $ret .= "</tr>"; - $ret .= "<tr><td colspan='$col'><input type='text' name='helpbox".$texte."' size='45' maxlength='100' style='width:100%; font-size:10px; background-color: #dedede; border: 0px solid #dedede;' value='Utilisez les raccourcis de SPIP pour enrichir votre mise en pages' /></td></tr>"; + + // Sur les forums publics, petite barre d'aide en survol des icones + if ($forum) + $ret .= "<tr><td colspan='$col'><input type='text' name='helpbox".$texte."' size='45' maxlength='100' style='width:100%; font-size:10px; background-color: #e8e8e4; border: 0px solid #dedede;' value='Utilisez les raccourcis typographiques pour enrichir votre mise en page' /></td></tr>"; $ret .= "</table>"; } return $ret; } function afficher_claret() { - return "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' ondbclick='storeCaret(this);'"; + return "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' ondbclick='storeCaret(this);'"; } ?> diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3 index 117bf95c763cf86bceef3368c7f5b61dd000ae8d..97ad7eaa6c34804c1d2e72ed0f3d33dbd3c0ca34 100644 --- a/ecrire/spip_style.php3 +++ b/ecrire/spip_style.php3 @@ -8,10 +8,14 @@ $couleur_foncee = "#3874B0"; ?> -/* Police par defaut (bof...) */ +/* + * Police par defaut (bof...) + */ body { font-family: Verdana,Arial,Helvetica,sans-serif; } -/* Formulaires */ +/* + * Formulaires + */ .forml { width: 100%; padding: 2px; background-color: #E4E4E4; background-position: center bottom; float: none; color: #000000 } .formo { width: 100%; padding: 2px; background-color: <?php echo $couleur_claire; ?>; background-position: center bottom; float: none; } .fondl { background-color: <?php echo $couleur_claire; ?>; background-position: center bottom; float: none; color: #000000 } @@ -20,7 +24,9 @@ body { font-family: Verdana,Arial,Helvetica,sans-serif; } .sanscadre { padding: 4px; margin: 0px; } .aveccadre { cursor: pointer; padding: 3px; margin: 0px; border-left: solid 1px <?php echo $couleur_claire; ?>; border-top: solid 1px <?php echo $couleur_claire; ?>; border-right: solid 1px #000000; border-bottom: solid 1px #000000; } -/* Style des icones */ +/* + * Style des icones + */ .iconeimpoff { padding: 3px; margin: 1px; border: 1px dashed <? echo $couleur_foncee; ?>; background-color: #e4e4e4 } .fondgris { cursor: pointer; padding: 4px; margin: 1px; } .fondgrison { cursor: pointer; padding: 3px; margin: 1px; border: 1px dashed #999999; background-color: #e4e4e4; } @@ -48,6 +54,20 @@ a:hover { text-decoration: underline; } a.icone { text-decoration: none; } a.icone:hover { text-decoration: none; } +/* + * Barre de raccourcis + */ + +a.spip_barre img { + border: 0px; + padding: 2px; +} +a.spip_barre:hover img { + border: 1px solid #808080; + padding: 1px; + background-color: #f8f8f4; +} + td.icone table { } diff --git a/spip_style.css b/spip_style.css index 75ef2a8b35ca2236d27b9774eded1e01d80a5e55..b076ea82f480fc08b50ba1c3637fe80da2ba10ee 100644 --- a/spip_style.css +++ b/spip_style.css @@ -93,3 +93,19 @@ i.spip { } } .spip_surligne { background-color: #FFFF66; } + + +/* + * Barre de raccourcis + */ + +a.spip_barre img { + border: 0px; + padding: 2px; +} +a.spip_barre:hover img { + border: 1px solid #808080; + padding: 1px; + background-color: #f8f8f4; +} +