|
|
| Řádek 1: |
Řádek 1: |
| | | | |
| − |
| |
| − | var customizeToolbar = function() {
| |
| − | /* Your code goes here */
| |
| − | if (jQuery.inArray("teacher",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: " }}|[[Uživatel:Admin|Admin]] ([[Diskuse s uživatelem:Admin|diskuse]]) 3. 7. 2014, 13:43 (UTC)}}"
| |
| − | }
| |
| − | }
| |
| − | }
| |
| − | }
| |
| − | });
| |
| − | }
| |
| − | /*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 );
| |
| − |
| |
| − | jQuery( document ).ready( function( $ ) {
| |
| − | console.log('test');
| |
| − | } );
| |