Merge "Make sure that SQLite uses no prefix"
[lhc/web/wiklou.git] / resources / mediawiki.page / mediawiki.page.ready.js
index 370c3a1..684f582 100644 (file)
@@ -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 ) );