MediaWiki:Common.js: Porovnání verzí

Řádek 16: Řádek 16:
 
                     type: 'encapsulate',
 
                     type: 'encapsulate',
 
                     options: {
 
                     options: {
                         pre: "{{",
+
                         pre: "{{Zkontrolováno|{{subst:REVISIONTIMESTAMP",
                         peri: "Zkontrolovano",
+
                         peri: "",
                         post: " }}"
+
                         post: " }}}}"
 
                     }
 
                     }
 
                 }
 
                 }

Verze z 17. 1. 2014, 17:13

/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky.  */


var customizeToolbar = function() {
        /* Your code goes here */
 if (jQuery.inArray("sysop",wgUserGroups)!=-1){
    $('#wpTextbox1').wikiEditor('addToToolbar', {
        section: 'advanced',
        group: 'insert',
        tools: {
            buttonId: {
                label: 'Pouze pro učitele',
                type: 'button',
                icon: '/images/b/b6/Button_article_de_qualite.png',
                action: {
                    type: 'encapsulate',
                    options: {
                        pre: "{{Zkontrolováno|{{subst:REVISIONTIMESTAMP",
                        peri: "",
                        post: " }}}}"
                    }
                }
            }
        }
    });
}
/*Konec*/
};
 
/* Check if view is in edit mode and that the required modules are available. 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 );
                        } );
                }
        } );
}
// Add the customizations to LiquidThreads' edit toolbar, if available
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );