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

De AJLSM
Aller à la navigation Aller à la recherche
mAucun résumé des modifications
m a déplacé Utilisateur:Elopez/common.js vers Utilisateur:Groche/common.js : Automatically moved page while merging the user "Elopez" to "Groche"
 
(11 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
var customizeToolbar = function() {
// <noinclude>On travaille en dur dans le fichier {{path|modules/jquery.wikiEditor.toolbar.config.js}}</noinclude>
    $('#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() {
}

Dernière version du 28 mai 2013 à 09:21

// <noinclude>On travaille en dur dans le fichier {{path|modules/jquery.wikiEditor.toolbar.config.js}}</noinclude>