Wrapping core modules (FIXME from r79929)
authorKrinkle <krinkle@users.mediawiki.org>
Mon, 31 Jan 2011 19:33:16 +0000 (19:33 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Mon, 31 Jan 2011 19:33:16 +0000 (19:33 +0000)
(Touch: r74088, r73046)

19 files changed:
resources/jquery/jquery.autoEllipsis.js
resources/jquery/jquery.checkboxShiftClick.js
resources/jquery/jquery.client.js
resources/jquery/jquery.color.js
resources/jquery/jquery.colorUtil.js
resources/jquery/jquery.delayedBind.js
resources/jquery/jquery.form.js
resources/jquery/jquery.localize.js
resources/jquery/jquery.makeCollapsible.js
resources/jquery/jquery.placeholder.js
resources/jquery/jquery.suggestions.js
resources/jquery/jquery.tabIndex.js
resources/jquery/jquery.textSelection.js
resources/mediawiki.language/mediawiki.language.js
resources/mediawiki.special/mediawiki.special.preferences.js
resources/mediawiki.special/mediawiki.special.search.js
resources/mediawiki.util/mediawiki.util.jpegmeta.js
resources/mediawiki.util/mediawiki.util.js
resources/mediawiki.util/mediawiki.util.test.js

index 1af65a6..4993118 100644 (file)
@@ -128,4 +128,4 @@ $.fn.autoEllipsis = function( options ) {
        } );
 };
 
-} )( jQuery );
+} )( jQuery );
\ No newline at end of file
index 2d965b0..cfa696d 100644 (file)
@@ -6,7 +6,7 @@
  * @author Krinkle <krinklemail@gmail.com>
  * @license GPL v2
  */
-
+( function( $ ) {
 $.fn.checkboxShiftClick = function( text ) {
        var prevCheckbox = null;
        var $box = this;
@@ -24,4 +24,5 @@ $.fn.checkboxShiftClick = function( text ) {
                prevCheckbox = e.target;
        } );
        return $box;
-};
\ No newline at end of file
+};
+} )( jQuery );
\ No newline at end of file
index 38aa615..93c05bb 100644 (file)
@@ -1,6 +1,8 @@
 /**
  * User-agent detection
  */
+ */
+( function( $ ) {
 $.client = new ( function() {
 
        /* Private Members */
@@ -201,3 +203,5 @@ $( document ).ready( function() {
                .addClass( 'client-' + profile.layout )
                .addClass( 'client-' + profile.platform );
 } );
+
+} )( jQuery );
\ No newline at end of file
index 59b8c82..b041942 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2007 John Resig
  * Released under the MIT and GPL licenses.
  *
- * - 2011-01-05: Modified by Krinkle to use the jQuery.colorUtil plugin (has to be loaded first)
+ * - 2011-01-05: Modified by Krinkle to use the jQuery.colorUtil plugin (which has to be loaded first!)
  */
 (function( $ ) {
 
index 00a76ed..1116aec 100644 (file)
@@ -5,6 +5,7 @@
  * Mostly based on other plugins and functions (taken through JSLint and optimized a little).
  * Sources cited locally.
  */
+( function( $ ) {
 $.colorUtil = {
 
        // Color Conversion function from highlightFade
@@ -45,7 +46,7 @@ $.colorUtil = {
                }
 
                // Otherwise, we're most likely dealing with a named color
-               return $.colorUtil.colors[jQuery.trim(color).toLowerCase()];
+               return $.colorUtil.colors[$.trim(color).toLowerCase()];
        },
 
        // Some named colors to work with
@@ -188,4 +189,5 @@ $.colorUtil = {
                        ')';
        }
 
-};
\ No newline at end of file
+};
+} )( jQuery );
\ No newline at end of file
index 49e1ac5..6d97299 100644 (file)
@@ -65,4 +65,4 @@ $.fn.extend( {
                } );
        }
 } );
-} )( jQuery );
+} )( jQuery );
\ No newline at end of file
index 4176e19..53c078f 100644 (file)
@@ -8,7 +8,7 @@
  *   http://www.opensource.org/licenses/mit-license.php
  *   http://www.gnu.org/licenses/gpl.html
  */
-;(function($) {
+(function($) {
 
 /*
        Usage Note:
index a94dfe8..b913f33 100644 (file)
@@ -21,6 +21,7 @@
  *                     <img src="something.jpg" title="My Title Message" alt="My Alt Message" />
  *             </p>
  */
+( function( $ ) {
 /**
  * Localizes a DOM selection by replacing <msg /> elements with localized text and adding
  * localized title and alt attributes to elements with title-msg and alt-msg attributes
@@ -58,3 +59,4 @@ $.fn.localize = function( options ) {
 
 // Let IE know about the msg tag before it's used...
 document.createElement( 'msg' );
+} )( jQuery );
index 127cc8e..86abe8d 100644 (file)
@@ -14,6 +14,7 @@
  * @license CC-BY 3.0 <http://creativecommons.org/licenses/by/3.0>
  * @license GPL2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
  */
+( function( $, mw ) {
 
 $.fn.makeCollapsible = function() {
 
@@ -293,4 +294,5 @@ $.fn.makeCollapsible = function() {
                        $toggleLink.click();
                }
        } );
-};
\ No newline at end of file
+};
+} )( jQuery, mediaWiki );
\ No newline at end of file
index 1d3fd67..bcff4e7 100644 (file)
@@ -8,6 +8,7 @@
  * @version 0.2.0
  * @license GPL v2
  */
+( function( $ ) {
 
 $.fn.placeholder = function() {
 
@@ -59,3 +60,4 @@ $.fn.placeholder = function() {
 
        });
 };
+} )( jQuery );
\ No newline at end of file
index 8dbd77a..64e06d9 100644 (file)
@@ -41,6 +41,7 @@
  * highlightInput: Whether to hightlight matched portions of the input or not
  *             Type: Boolean, Default: false
  */
+( function( $ ) {
 
 $.suggestions = {
        /**
@@ -515,4 +516,5 @@ $.fn.suggestions = function() {
                $(this).data( 'suggestions-context', context );
        } );
        return returnValue !== null ? returnValue : $(this);
-};
\ No newline at end of file
+};
+} )( jQuery );
\ No newline at end of file
index 3ae1a5c..784f8c9 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * jQuery tabIndex
+ */
+( function( $ ) {
 /**
  * Finds the lowerst tabindex in use within a selection
  * 
@@ -28,4 +32,5 @@ $.fn.lastTabIndex = function() {
                }
        } );
        return maxTabIndex;
-};
\ No newline at end of file
+};
+} )( jQuery );
\ No newline at end of file
index 2d1633b..f31a1a7 100644 (file)
@@ -1,6 +1,7 @@
 /**
  * These plugins provide extra functionality for interaction with textareas.
  */
+( function( $ ) {
 $.fn.textSelection = function( command, options ) {
 var fn = {
 /**
@@ -399,3 +400,4 @@ scrollToCaretPosition: function( options ) {
        }
        return retval;
 };
+} )( jQuery );
\ No newline at end of file
index 4d5a0a7..f199101 100644 (file)
@@ -5,8 +5,9 @@
  * Language.php in MediaWiki. This object contains methods for loading and
  * transforming message text.
  */
+( function( $, mw ) {
 
-mediaWiki.language = {
+mw.language = {
        /**
         * Process the PLURAL template substitution
         *
@@ -19,15 +20,15 @@ mediaWiki.language = {
         * @example {{Template:title|params}}
         */
        'procPLURAL': function( template ) {
-               if ( template.title && template.parameters && mediaWiki.language.convertPlural ) {
+               if ( template.title && template.parameters && mw.language.convertPlural ) {
                        // Check if we have forms to replace
                        if ( template.parameters.length == 0 ) {
                                return '';
                        }
                        // Restore the count into a Number ( if it got converted earlier )
-                       var count = mediaWiki.language.convertNumber( template.title, true );
+                       var count = mw.language.convertNumber( template.title, true );
                        // Do convertPlural call 
-                       return mediaWiki.language.convertPlural( parseInt( count ), template.parameters );
+                       return mw.language.convertPlural( parseInt( count ), template.parameters );
                }
                // Could not process plural return first form or nothing
                if ( template.parameters[0] ) {
@@ -68,11 +69,11 @@ mediaWiki.language = {
         * @param {boolean} integer Convert the return value to an integer
         */
        'convertNumber': function( number, integer ) {
-               if ( !mediaWiki.language.digitTransformTable ) {
+               if ( !mw.language.digitTransformTable ) {
                        return number;
                }
                // Set the target Transform table:
-               var transformTable = mediaWiki.language.digitTransformTable;
+               var transformTable = mw.language.digitTransformTable;
                // Check if the "restore" to Latin number flag is set:
                if ( integer ) {
                        if ( parseInt( number ) == number ) {
@@ -98,3 +99,4 @@ mediaWiki.language = {
        // Digit Transform Table, populated by language classes where applicable
        'digitTransformTable': null
 };
+} )( jQuery, mediaWiki );
\ No newline at end of file
index f919f39..1775bec 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * JavaScript for Special:Preferences
  */
+( function( $, mw ) {
 
 $( '#prefsubmit' ).attr( 'id', 'prefcontrol' );
 $( '#preferences' )
@@ -73,3 +74,4 @@ $( '#mw-input-wpemailaddress' ).one( 'blur', function() {
                updateMailValidityLabel( $(this).val() );
        } );
 } );
+} )( jQuery, mediaWiki );
\ No newline at end of file
index 1b56857..d431718 100644 (file)
@@ -1,8 +1,11 @@
 /*
  * JavaScript for Specical:Search
  */
+( function( $, mw ) {
 
 // Emulate HTML5 autofocus behavior in non HTML5 compliant browsers
 if ( !( 'autofocus' in document.createElement( 'input' ) ) ) {
-       $( 'input[autofocus]' ).focus();
+       $( 'input[autofocus]:first' ).focus();
 }
+
+} )( jQuery, mediaWiki );
\ No newline at end of file
index c882d9a..d9800c1 100644 (file)
                return new JpegMeta.JpegFile( fileReaderResult, fileName );
        };
        
-} )( jQuery, mediaWiki );
+} )( jQuery, mediaWiki );
\ No newline at end of file
index 5bffc04..8c44b91 100644 (file)
@@ -1,8 +1,7 @@
 /**
  * Utilities
  */
-
-(function($, mw) {
+( function( $, mw ) {
 
        mw.util = {
 
@@ -13,7 +12,7 @@
                                this.initialised = true;
 
                                // Any initialisation after the DOM is ready
-                               $(function() {
+                               $( function() {
 
                                        // Shortcut to client profile return
                                        var profile = $.client.profile();
 
        mw.util.init();
 
-})(jQuery, mediaWiki);
+} )( jQuery, mediaWiki );
\ No newline at end of file
index e70842c..4d8a7d5 100644 (file)
@@ -8,7 +8,7 @@
 
 ( function( $, mw ) {
 
-       mediaWiki.test = {
+       mw.test = {
 
                /* Variables */
                '$table' : null,
                }
        };
 
-       mediaWiki.test.init();
+       mw.test.init();
 
-} )(jQuery, mediaWiki);
+} )(jQuery, mediaWiki);
\ No newline at end of file