|
|
(54 révisions intermédiaires par le même utilisateur non affichées) |
Ligne 1 : |
Ligne 1 : |
− | /*
| |
− | * Insertion des boutons dans la barre d'outil
| |
− | */
| |
| | | |
− | function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) {
| |
− | mwCustomEditButtons[mwCustomEditButtons.length] =
| |
− | {"imageId": imageId,
| |
− | "imageFile": imageFile,
| |
− | "speedTip": speedTip,
| |
− | "tagOpen": tagOpen,
| |
− | "tagClose": tagClose,
| |
− | "sampleText": sampleText};
| |
− | }
| |
− |
| |
− | addCustomButton('images/8/88/Btn_toolbar_enum.png',
| |
− | 'Énumération',
| |
− | '\n# élément 1\n# élément 2\n# élément 3',
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-enum');
| |
− |
| |
− | addCustomButton('images/1/11/Btn_toolbar_liste.png',
| |
− | 'Liste',
| |
− | '\n* élément A\n* élément B\n* élément C',
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-liste');
| |
− |
| |
− | addCustomButton('images/9/9e/Btn_toolbar_gallery.png',
| |
− | 'Galerie d\'images',
| |
− | '\n<center><gallery widths=60px perrow=10 caption="Galerie WikiGenWeb">\nFichier:wiki.png|\nFichier:wiki.png|\n</gallery>\n<small>Cliquez sur une vignette pour l\'agrandir</small>\n</center>',
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-gallery');
| |
− |
| |
− | addCustomButton('images/0/04/Button_array.png',
| |
− | 'Tableau minimum',
| |
− | '{|class="wikitable-left" \n!colspan="2"|Entête du tableau\n|-\n!Entête col 1\n!Entête col 2\n|-\n|A\n|B\n|}',
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-array');
| |
− |
| |
− | addCustomButton('images/c/c4/Button_ref.png',
| |
− | 'Référence',
| |
− | '<ref>',
| |
− | '</ref>',
| |
− | 'référence, citation ou lien',
| |
− | 'mw-editbutton-ref');
| |
− |
| |
− | addCustomButton('images/6/64/Buttonrefvs8.png',
| |
− | 'Index des références',
| |
− | '== Notes et références ==\n<references />',
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-references');
| |
− |
| |
− | addCustomButton('images/3/3b/Button_template_alt.png',
| |
− | 'Modèle',
| |
− | '{{',
| |
− | '}}',
| |
− | 'modèle à inclure',
| |
− | 'mw-editbutton-template');
| |
− |
| |
− | addCustomButton('images/4/47/Button_redir.png',
| |
− | 'Redirection',
| |
− | '#REDIRECT [[',
| |
− | ']]',
| |
− | 'nom de la destination',
| |
− | 'mw-editbutton-redir');
| |
− |
| |
− | addCustomButton('images/a/a6/Button_Wikipedia.png',
| |
− | 'Lien Interwiki Wikipedia',
| |
− | '[[wikipedia.fr:',
| |
− | '|]]',
| |
− | 'Page Wikipedia',
| |
− | 'mw-editbutton-Wikipedia');
| |
− |
| |
− | var voirAussi = '\n'
| |
− | + '== Voir aussi ==\n'
| |
− | + '=== Articles connexes ===\n'
| |
− | + '* [[Indiquer ici votre article]]\n'
| |
− | + '*\n'
| |
− | + '=== Liens et documents externes ===\n'
| |
− | + '*\n';
| |
− | addCustomButton('images/b/bb/Seealso.png',
| |
− | 'Section Voir aussi',
| |
− | voirAussi,
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-voiraussi');
| |
− |
| |
− | addCustomButton('images/2/23/Button_code.png',
| |
− | 'Code',
| |
− | '<code>',
| |
− | '</code>',
| |
− | 'Texte du code',
| |
− | 'mw-editbutton-code');
| |
− |
| |
− | addCustomButton('images/d/d4/Button_div.png',
| |
− | 'Div',
| |
− | '<div>',
| |
− | '</div>',
| |
− | 'Balises entre div',
| |
− | 'mw-editbutton-div');
| |
− |
| |
− | addCustomButton('images/7/72/Button_span_2.png',
| |
− | 'Span',
| |
− | '<span>',
| |
− | '</span>',
| |
− | 'Balises entre span',
| |
− | 'mw-editbutton-span');
| |
− |
| |
− | addCustomButton('images/3/3c/Button_pre.png',
| |
− | 'Pre',
| |
− | '\n<pre>',
| |
− | '</pre>\n',
| |
− | 'Balise pre',
| |
− | 'mw-editbutton-pre');
| |
− |
| |
− | addCustomButton('images/a/ae/Button_fr.png',
| |
− | 'Modèle fr',
| |
− | '{{fr',
| |
− | '}}',
| |
− | '',
| |
− | 'mw-editbutton-fr');
| |
− |
| |
− | var boite = '{{boîte déroulante/début\n'
| |
− | +'<!-- Boîte -->\n'
| |
− | +'|arrondi=0.6em\n'
| |
− | +'|alignB=left\n'
| |
− | +'|hauteur=1.6em\n'
| |
− | +'|margeHaut=0em\n'
| |
− | +'|margeBas=0em\n'
| |
− | +'|largeur=100%\n'
| |
− | +'|couleurBordure=#AAAAAA\n'
| |
− | +'|couleurFondB=#FFFFFF\n'
| |
− | +'<!-- Titre -->\n'
| |
− | +'|image=\n'
| |
− | +'|style=\n'
| |
− | +'|titre=Titre de la boîte\n'
| |
− | +'|alignT=center\n'
| |
− | +'|label=\n'
| |
− | +'|couleurFondT=#CCCCFF\n'
| |
− | +'|couleurTexteT=black\n'
| |
− | +'|thinning=no\n'
| |
− | +'<!-- Contenu-->\n'
| |
− | +'|marge=0px\n'
| |
− | +'|couleurFond=white\n'
| |
− | +'|align=left\n'
| |
− | +'|taille=100%\n'
| |
− | +'}}\n'
| |
− | +'\n'
| |
− | +'<-- ici le contenu -->\n'
| |
− | +'\n'
| |
− | +'{{Boîte déroulante/fin}}\n';
| |
− |
| |
− | addCustomButton('images/f/f9/Button_box.png',
| |
− | 'Boîte déroulante',
| |
− | boite,
| |
− | '',
| |
− | '',
| |
− | 'mw-editbutton-boite');
| |
− |
| |
− |
| |
− | addOnloadHook(addCustomButton);
| |