From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- resources/mediawiki.page/mediawiki.page.ready.js | 40 +++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'resources/mediawiki.page/mediawiki.page.ready.js') diff --git a/resources/mediawiki.page/mediawiki.page.ready.js b/resources/mediawiki.page/mediawiki.page.ready.js index 370c3a19..684f582f 100644 --- a/resources/mediawiki.page/mediawiki.page.ready.js +++ b/resources/mediawiki.page/mediawiki.page.ready.js @@ -1,24 +1,28 @@ -jQuery( document ).ready( function( $ ) { +( function ( mw, $ ) { + $( function () { + var $sortableTables; - /* Emulate placeholder if not supported by browser */ - if ( !( 'placeholder' in document.createElement( 'input' ) ) ) { - $( 'input[placeholder]' ).placeholder(); - } + /* Emulate placeholder if not supported by browser */ + if ( !( 'placeholder' in document.createElement( 'input' ) ) ) { + $( 'input[placeholder]' ).placeholder(); + } - /* Enable makeCollapsible */ - $( '.mw-collapsible' ).makeCollapsible(); + /* Enable makeCollapsible */ + $( '.mw-collapsible' ).makeCollapsible(); - /* Lazy load jquery.tablesorter */ - if ( $( 'table.sortable' ).length ) { - mw.loader.using( 'jquery.tablesorter', function() { - $( 'table.sortable' ).tablesorter(); - }); - } + /* Lazy load jquery.tablesorter */ + $sortableTables = $( 'table.sortable' ); + if ( $sortableTables.length ) { + mw.loader.using( 'jquery.tablesorter', function () { + $sortableTables.tablesorter(); + }); + } - /* Enable CheckboxShiftClick */ - $( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick(); + /* Enable CheckboxShiftClick */ + $( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick(); - /* Add accesskey hints to the tooltips */ - mw.util.updateTooltipAccessKeys(); + /* Add accesskey hints to the tooltips */ + mw.util.updateTooltipAccessKeys(); -} ); + } ); +}( mediaWiki, jQuery ) ); -- cgit v1.2.2