Index: trunk/phase3/resources/jquery/jquery.makeCollapsible.js |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | * @license CC-BY 3.0 <http://creativecommons.org/licenses/by/3.0> |
16 | 16 | * @license GPL2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> |
17 | 17 | */ |
| 18 | +( function( $, mw ) { |
18 | 19 | |
19 | 20 | $.fn.makeCollapsible = function() { |
20 | 21 | |
— | — | @@ -293,4 +294,5 @@ |
294 | 295 | $toggleLink.click(); |
295 | 296 | } |
296 | 297 | } ); |
297 | | -}; |
\ No newline at end of file |
| 298 | +}; |
| 299 | +} )( jQuery, mediaWiki ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.textSelection.js |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | /** |
3 | 3 | * These plugins provide extra functionality for interaction with textareas. |
4 | 4 | */ |
| 5 | +( function( $ ) { |
5 | 6 | $.fn.textSelection = function( command, options ) { |
6 | 7 | var fn = { |
7 | 8 | /** |
— | — | @@ -399,3 +400,4 @@ |
400 | 401 | } |
401 | 402 | return retval; |
402 | 403 | }; |
| 404 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.checkboxShiftClick.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | * @author Krinkle <krinklemail@gmail.com> |
8 | 8 | * @license GPL v2 |
9 | 9 | */ |
10 | | - |
| 10 | +( function( $ ) { |
11 | 11 | $.fn.checkboxShiftClick = function( text ) { |
12 | 12 | var prevCheckbox = null; |
13 | 13 | var $box = this; |
— | — | @@ -24,4 +24,5 @@ |
25 | 25 | prevCheckbox = e.target; |
26 | 26 | } ); |
27 | 27 | return $box; |
28 | | -}; |
\ No newline at end of file |
| 28 | +}; |
| 29 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.tabIndex.js |
— | — | @@ -1,4 +1,8 @@ |
2 | 2 | /** |
| 3 | + * jQuery tabIndex |
| 4 | + */ |
| 5 | +( function( $ ) { |
| 6 | +/** |
3 | 7 | * Finds the lowerst tabindex in use within a selection |
4 | 8 | * |
5 | 9 | * @return number Lowest tabindex on the page |
— | — | @@ -28,4 +32,5 @@ |
29 | 33 | } |
30 | 34 | } ); |
31 | 35 | return maxTabIndex; |
32 | | -}; |
\ No newline at end of file |
| 36 | +}; |
| 37 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.localize.js |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | * <img src="something.jpg" title="My Title Message" alt="My Alt Message" /> |
23 | 23 | * </p> |
24 | 24 | */ |
| 25 | +( function( $ ) { |
25 | 26 | /** |
26 | 27 | * Localizes a DOM selection by replacing <msg /> elements with localized text and adding |
27 | 28 | * localized title and alt attributes to elements with title-msg and alt-msg attributes |
— | — | @@ -58,3 +59,4 @@ |
59 | 60 | |
60 | 61 | // Let IE know about the msg tag before it's used... |
61 | 62 | document.createElement( 'msg' ); |
| 63 | +} )( jQuery ); |
Index: trunk/phase3/resources/jquery/jquery.form.js |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | * http://www.opensource.org/licenses/mit-license.php |
10 | 10 | * http://www.gnu.org/licenses/gpl.html |
11 | 11 | */ |
12 | | -;(function($) { |
| 12 | +(function($) { |
13 | 13 | |
14 | 14 | /* |
15 | 15 | Usage Note: |
Index: trunk/phase3/resources/jquery/jquery.delayedBind.js |
— | — | @@ -65,4 +65,4 @@ |
66 | 66 | } ); |
67 | 67 | } |
68 | 68 | } ); |
69 | | -} )( jQuery ); |
| 69 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.suggestions.js |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | * highlightInput: Whether to hightlight matched portions of the input or not |
43 | 43 | * Type: Boolean, Default: false |
44 | 44 | */ |
| 45 | +( function( $ ) { |
45 | 46 | |
46 | 47 | $.suggestions = { |
47 | 48 | /** |
— | — | @@ -515,4 +516,5 @@ |
516 | 517 | $(this).data( 'suggestions-context', context ); |
517 | 518 | } ); |
518 | 519 | return returnValue !== null ? returnValue : $(this); |
519 | | -}; |
\ No newline at end of file |
| 520 | +}; |
| 521 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.colorUtil.js |
— | — | @@ -5,6 +5,7 @@ |
6 | 6 | * Mostly based on other plugins and functions (taken through JSLint and optimized a little). |
7 | 7 | * Sources cited locally. |
8 | 8 | */ |
| 9 | +( function( $ ) { |
9 | 10 | $.colorUtil = { |
10 | 11 | |
11 | 12 | // Color Conversion function from highlightFade |
— | — | @@ -45,7 +46,7 @@ |
46 | 47 | } |
47 | 48 | |
48 | 49 | // Otherwise, we're most likely dealing with a named color |
49 | | - return $.colorUtil.colors[jQuery.trim(color).toLowerCase()]; |
| 50 | + return $.colorUtil.colors[$.trim(color).toLowerCase()]; |
50 | 51 | }, |
51 | 52 | |
52 | 53 | // Some named colors to work with |
— | — | @@ -188,4 +189,5 @@ |
189 | 190 | ')'; |
190 | 191 | } |
191 | 192 | |
192 | | -}; |
\ No newline at end of file |
| 193 | +}; |
| 194 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.autoEllipsis.js |
— | — | @@ -128,4 +128,4 @@ |
129 | 129 | } ); |
130 | 130 | }; |
131 | 131 | |
132 | | -} )( jQuery ); |
| 132 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.color.js |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | * Copyright 2007 John Resig |
5 | 5 | * Released under the MIT and GPL licenses. |
6 | 6 | * |
7 | | - * - 2011-01-05: Modified by Krinkle to use the jQuery.colorUtil plugin (has to be loaded first) |
| 7 | + * - 2011-01-05: Modified by Krinkle to use the jQuery.colorUtil plugin (which has to be loaded first!) |
8 | 8 | */ |
9 | 9 | (function( $ ) { |
10 | 10 | |
Index: trunk/phase3/resources/jquery/jquery.client.js |
— | — | @@ -1,6 +1,8 @@ |
2 | 2 | /** |
3 | 3 | * User-agent detection |
4 | 4 | */ |
| 5 | + */ |
| 6 | +( function( $ ) { |
5 | 7 | $.client = new ( function() { |
6 | 8 | |
7 | 9 | /* Private Members */ |
— | — | @@ -201,3 +203,5 @@ |
202 | 204 | .addClass( 'client-' + profile.layout ) |
203 | 205 | .addClass( 'client-' + profile.platform ); |
204 | 206 | } ); |
| 207 | + |
| 208 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/jquery/jquery.placeholder.js |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | * @version 0.2.0 |
10 | 10 | * @license GPL v2 |
11 | 11 | */ |
| 12 | +( function( $ ) { |
12 | 13 | |
13 | 14 | $.fn.placeholder = function() { |
14 | 15 | |
— | — | @@ -59,3 +60,4 @@ |
60 | 61 | |
61 | 62 | }); |
62 | 63 | }; |
| 64 | +} )( jQuery ); |
\ No newline at end of file |
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.jpegmeta.js |
— | — | @@ -735,4 +735,4 @@ |
736 | 736 | return new JpegMeta.JpegFile( fileReaderResult, fileName ); |
737 | 737 | }; |
738 | 738 | |
739 | | -} )( jQuery, mediaWiki ); |
| 739 | +} )( jQuery, mediaWiki ); |
\ No newline at end of file |
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | ( function( $, mw ) { |
11 | 11 | |
12 | | - mediaWiki.test = { |
| 12 | + mw.test = { |
13 | 13 | |
14 | 14 | /* Variables */ |
15 | 15 | '$table' : null, |
— | — | @@ -403,6 +403,6 @@ |
404 | 404 | } |
405 | 405 | }; |
406 | 406 | |
407 | | - mediaWiki.test.init(); |
| 407 | + mw.test.init(); |
408 | 408 | |
409 | | -} )(jQuery, mediaWiki); |
| 409 | +} )(jQuery, mediaWiki); |
\ No newline at end of file |
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js |
— | — | @@ -1,9 +1,8 @@ |
2 | 2 | /** |
3 | 3 | * Utilities |
4 | 4 | */ |
| 5 | +( function( $, mw ) { |
5 | 6 | |
6 | | -(function($, mw) { |
7 | | - |
8 | 7 | mw.util = { |
9 | 8 | |
10 | 9 | /* Initialisation */ |
— | — | @@ -13,7 +12,7 @@ |
14 | 13 | this.initialised = true; |
15 | 14 | |
16 | 15 | // Any initialisation after the DOM is ready |
17 | | - $(function() { |
| 16 | + $( function() { |
18 | 17 | |
19 | 18 | // Shortcut to client profile return |
20 | 19 | var profile = $.client.profile(); |
— | — | @@ -516,4 +515,4 @@ |
517 | 516 | |
518 | 517 | mw.util.init(); |
519 | 518 | |
520 | | -})(jQuery, mediaWiki); |
| 519 | +} )( jQuery, mediaWiki ); |
\ No newline at end of file |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.search.js |
— | — | @@ -1,8 +1,11 @@ |
2 | 2 | /* |
3 | 3 | * JavaScript for Specical:Search |
4 | 4 | */ |
| 5 | +( function( $, mw ) { |
5 | 6 | |
6 | 7 | // Emulate HTML5 autofocus behavior in non HTML5 compliant browsers |
7 | 8 | if ( !( 'autofocus' in document.createElement( 'input' ) ) ) { |
8 | | - $( 'input[autofocus]' ).focus(); |
| 9 | + $( 'input[autofocus]:first' ).focus(); |
9 | 10 | } |
| 11 | + |
| 12 | +} )( jQuery, mediaWiki ); |
\ No newline at end of file |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.preferences.js |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | /* |
3 | 3 | * JavaScript for Special:Preferences |
4 | 4 | */ |
| 5 | +( function( $, mw ) { |
5 | 6 | |
6 | 7 | $( '#prefsubmit' ).attr( 'id', 'prefcontrol' ); |
7 | 8 | $( '#preferences' ) |
— | — | @@ -73,3 +74,4 @@ |
74 | 75 | updateMailValidityLabel( $(this).val() ); |
75 | 76 | } ); |
76 | 77 | } ); |
| 78 | +} )( jQuery, mediaWiki ); |
\ No newline at end of file |
Index: trunk/phase3/resources/mediawiki.language/mediawiki.language.js |
— | — | @@ -5,8 +5,9 @@ |
6 | 6 | * Language.php in MediaWiki. This object contains methods for loading and |
7 | 7 | * transforming message text. |
8 | 8 | */ |
| 9 | +( function( $, mw ) { |
9 | 10 | |
10 | | -mediaWiki.language = { |
| 11 | +mw.language = { |
11 | 12 | /** |
12 | 13 | * Process the PLURAL template substitution |
13 | 14 | * |
— | — | @@ -19,15 +20,15 @@ |
20 | 21 | * @example {{Template:title|params}} |
21 | 22 | */ |
22 | 23 | 'procPLURAL': function( template ) { |
23 | | - if ( template.title && template.parameters && mediaWiki.language.convertPlural ) { |
| 24 | + if ( template.title && template.parameters && mw.language.convertPlural ) { |
24 | 25 | // Check if we have forms to replace |
25 | 26 | if ( template.parameters.length == 0 ) { |
26 | 27 | return ''; |
27 | 28 | } |
28 | 29 | // Restore the count into a Number ( if it got converted earlier ) |
29 | | - var count = mediaWiki.language.convertNumber( template.title, true ); |
| 30 | + var count = mw.language.convertNumber( template.title, true ); |
30 | 31 | // Do convertPlural call |
31 | | - return mediaWiki.language.convertPlural( parseInt( count ), template.parameters ); |
| 32 | + return mw.language.convertPlural( parseInt( count ), template.parameters ); |
32 | 33 | } |
33 | 34 | // Could not process plural return first form or nothing |
34 | 35 | if ( template.parameters[0] ) { |
— | — | @@ -68,11 +69,11 @@ |
69 | 70 | * @param {boolean} integer Convert the return value to an integer |
70 | 71 | */ |
71 | 72 | 'convertNumber': function( number, integer ) { |
72 | | - if ( !mediaWiki.language.digitTransformTable ) { |
| 73 | + if ( !mw.language.digitTransformTable ) { |
73 | 74 | return number; |
74 | 75 | } |
75 | 76 | // Set the target Transform table: |
76 | | - var transformTable = mediaWiki.language.digitTransformTable; |
| 77 | + var transformTable = mw.language.digitTransformTable; |
77 | 78 | // Check if the "restore" to Latin number flag is set: |
78 | 79 | if ( integer ) { |
79 | 80 | if ( parseInt( number ) == number ) { |
— | — | @@ -98,3 +99,4 @@ |
99 | 100 | // Digit Transform Table, populated by language classes where applicable |
100 | 101 | 'digitTransformTable': null |
101 | 102 | }; |
| 103 | +} )( jQuery, mediaWiki ); |
\ No newline at end of file |