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
mAucun résumé des modifications |
mAucun résumé des modifications |
||
| Ligne 8 : | Ligne 8 : | ||
'label': 'Comment visible only for editors', | 'label': 'Comment visible only for editors', | ||
'type': 'button', | 'type': 'button', | ||
'icon': 'Toolbar_category.png', | 'icon': 'http://mw.ajlsm.com/images/c/c4/Toolbar_category.png', | ||
'action': { | 'action': { | ||
'type': 'encapsulate', | 'type': 'encapsulate', | ||
Version du 24 avril 2012 à 15:07
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': 'http://mw.ajlsm.com/images/c/c4/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() {
}