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

Přidáno 594 bajtů ,  28. 2. 2017
bez shrnutí editace
Bez shrnutí editace
Bez shrnutí editace
Řádek 174: Řádek 174:
sampleText: '42'
sampleText: '42'
});
});
//Default sort tabulek
function isSortedTablePage() {
    return ( wgPageName == "Castor 2017/Adresář"  || wgPageName == "Other_Page_To_Sort" );
}
jQuery( document ).ready( function( $ ) {
    // wrapped in "mw.loader.using" so this doesn't execute until Tablesorter has loaded
    mw.loader.using( 'jquery.tablesorter', function() {
        if( isSortedTablePage() ) $('table.sortable').tablesorter( {sortList: [ { 0: 'asc'} ]} )
        // or look for tables with an ID attribute of "sortMe" on any page
        // $( '#sortMe' ).tablesorter( {sortList: [ { 0: 'asc'} ]} )
    } );
} );