Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
« Utilisateur:Groche/common.js » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
mAucun résumé des modifications |
||
| Ligne 3 : | Ligne 3 : | ||
'section': 'advanced', | 'section': 'advanced', | ||
'group': 'format', | 'group': 'format', | ||
'labelMsg | 'labelMsg': 'Ajouter une catégorie', | ||
'tools': { | 'tools': { | ||
'button-id': { | 'button-id': { | ||
Version du 24 avril 2012 à 15:04
var customizeToolbar = function() {
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'advanced',
'group': 'format',
'labelMsg': 'Ajouter une catégorie',
'tools': {
'button-id': {
'label': 'Comment visible only for editors',
'type': 'button',
'icon': 'Toolbar_category.png',
'action': {
'type': 'encapsulate',
'options': {
'pre': "[[category:",
'periMsg': "catégorie à laquelle appartient l'article",
'post': "]]"
}
}
}
}
});
};
/* Check if we are in edit mode and the required modules are available and then customize the toolbar */
if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
mw.loader.using( 'user.options', function () {
if ( mw.user.options.get('usebetatoolbar') ) {
mw.loader.using( 'ext.wikiEditor.toolbar', function () {
$(document).ready( customizeToolbar );
} );
}
} );
}
function addCategory() {
}