Index: trunk/phase3/resources/jquery/jquery.checkboxShiftClick.js |
— | — | @@ -1,8 +1,8 @@ |
2 | 2 | /** |
3 | 3 | * jQuery checkboxShiftClick |
4 | | - * |
| 4 | + * |
5 | 5 | * This will enable checkboxes to be checked or unchecked in a row by clicking one, holding shift and clicking another one |
6 | | - * |
| 6 | + * |
7 | 7 | * @author Krinkle <krinklemail@gmail.com> |
8 | 8 | * @license GPL v2 |
9 | 9 | */ |
Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | return false; |
23 | 23 | } |
24 | 24 | for ( var i = 0; i < arrThis.length; i++ ) { |
25 | | - if ( arrThis[i] instanceof Array ) { |
| 25 | + if ( arrThis[i] instanceof Array ) { |
26 | 26 | if ( !$.compareArray( arrThis[i], arrAgainst[i] ) ) { |
27 | 27 | return false; |
28 | 28 | } |
— | — | @@ -39,35 +39,35 @@ |
40 | 40 | |
41 | 41 | // Attach to window |
42 | 42 | window.mediaWiki = new ( function( $ ) { |
43 | | - |
| 43 | + |
44 | 44 | /* Constants */ |
45 | | - |
| 45 | + |
46 | 46 | // This will not change until we are 100% ready to turn off legacy globals |
47 | 47 | var LEGACY_GLOBALS = true; |
48 | | - |
| 48 | + |
49 | 49 | /* Private Members */ |
50 | | - |
| 50 | + |
51 | 51 | // List of messages that have been requested to be loaded |
52 | 52 | var messageQueue = {}; |
53 | | - |
| 53 | + |
54 | 54 | /* Prototypes */ |
55 | | - |
| 55 | + |
56 | 56 | /** |
57 | | - * An object which allows single and multiple get/set/exists functionality |
| 57 | + * An object which allows single and multiple get/set/exists functionality |
58 | 58 | * on a list of key / value pairs. |
59 | | - * |
60 | | - * @param {boolean} global Whether to get/set/exists values on the window |
| 59 | + * |
| 60 | + * @param {boolean} global Whether to get/set/exists values on the window |
61 | 61 | * object or a private object |
62 | 62 | */ |
63 | 63 | function Map( global ) { |
64 | 64 | this.values = ( global === true ) ? window : {}; |
65 | 65 | }; |
66 | | - |
| 66 | + |
67 | 67 | /** |
68 | 68 | * Gets the value of a key, or a list of key/value pairs for an array of keys. |
69 | | - * |
| 69 | + * |
70 | 70 | * If called with no arguments, all values will be returned. |
71 | | - * |
| 71 | + * |
72 | 72 | * @param {mixed} selection Key or array of keys to get values for |
73 | 73 | * @param {mixed} fallback Value to use in case key(s) do not exist (optional) |
74 | 74 | */ |
— | — | @@ -90,10 +90,10 @@ |
91 | 91 | } |
92 | 92 | return this.values; |
93 | 93 | }; |
94 | | - |
| 94 | + |
95 | 95 | /** |
96 | 96 | * Sets one or multiple key/value pairs. |
97 | | - * |
| 97 | + * |
98 | 98 | * @param {mixed} selection Key or object of key/value pairs to set |
99 | 99 | * @param {mixed} value Value to set (optional, only in use when key is a string) |
100 | 100 | */ |
— | — | @@ -106,10 +106,10 @@ |
107 | 107 | this.values[selection] = value; |
108 | 108 | } |
109 | 109 | }; |
110 | | - |
| 110 | + |
111 | 111 | /** |
112 | 112 | * Checks if one or multiple keys exist. |
113 | | - * |
| 113 | + * |
114 | 114 | * @param {mixed} key Key or array of keys to check |
115 | 115 | * @return {boolean} Existence of key(s) |
116 | 116 | */ |
— | — | @@ -125,9 +125,9 @@ |
126 | 126 | return selection in this.values; |
127 | 127 | } |
128 | 128 | }; |
129 | | - |
| 129 | + |
130 | 130 | /** |
131 | | - * Message object, similar to Message in PHP |
| 131 | + * Message object, similar to Message in PHP |
132 | 132 | */ |
133 | 133 | function Message( map, key, parameters ) { |
134 | 134 | this.format = 'parse'; |
— | — | @@ -135,10 +135,10 @@ |
136 | 136 | this.key = key; |
137 | 137 | this.parameters = typeof parameters === 'undefined' ? [] : $.makeArray( parameters ); |
138 | 138 | }; |
139 | | - |
| 139 | + |
140 | 140 | /** |
141 | 141 | * Appends parameters for replacement |
142 | | - * |
| 142 | + * |
143 | 143 | * @param {mixed} args First in a list of variadic arguments to append as message parameters |
144 | 144 | */ |
145 | 145 | Message.prototype.params = function( parameters ) { |
— | — | @@ -147,10 +147,10 @@ |
148 | 148 | } |
149 | 149 | return this; |
150 | 150 | }; |
151 | | - |
| 151 | + |
152 | 152 | /** |
153 | 153 | * Converts message object to it's string form based on the state of format |
154 | | - * |
| 154 | + * |
155 | 155 | * @return {string} String form of message |
156 | 156 | */ |
157 | 157 | Message.prototype.toString = function() { |
— | — | @@ -171,47 +171,47 @@ |
172 | 172 | */ |
173 | 173 | return text; |
174 | 174 | }; |
175 | | - |
| 175 | + |
176 | 176 | /** |
177 | 177 | * Changes format to parse and converts message to string |
178 | | - * |
| 178 | + * |
179 | 179 | * @return {string} String form of parsed message |
180 | 180 | */ |
181 | 181 | Message.prototype.parse = function() { |
182 | 182 | this.format = 'parse'; |
183 | 183 | return this.toString(); |
184 | 184 | }; |
185 | | - |
| 185 | + |
186 | 186 | /** |
187 | 187 | * Changes format to plain and converts message to string |
188 | | - * |
| 188 | + * |
189 | 189 | * @return {string} String form of plain message |
190 | 190 | */ |
191 | 191 | Message.prototype.plain = function() { |
192 | 192 | this.format = 'plain'; |
193 | 193 | return this.toString(); |
194 | 194 | }; |
195 | | - |
| 195 | + |
196 | 196 | /** |
197 | 197 | * Checks if message exists |
198 | | - * |
| 198 | + * |
199 | 199 | * @return {string} String form of parsed message |
200 | 200 | */ |
201 | 201 | Message.prototype.exists = function() { |
202 | 202 | return this.map.exists( this.key ); |
203 | 203 | }; |
204 | | - |
| 204 | + |
205 | 205 | /** |
206 | 206 | * User object |
207 | 207 | */ |
208 | 208 | function User() { |
209 | 209 | this.options = new Map(); |
210 | 210 | } |
211 | | - |
| 211 | + |
212 | 212 | /* Public Members */ |
213 | 213 | |
214 | 214 | /* |
215 | | - * Dummy function which in debug mode can be replaced with a function that |
| 215 | + * Dummy function which in debug mode can be replaced with a function that |
216 | 216 | * does something clever |
217 | 217 | */ |
218 | 218 | this.log = function() { }; |
— | — | @@ -227,17 +227,17 @@ |
228 | 228 | * Information about the current user |
229 | 229 | */ |
230 | 230 | this.user = new User(); |
231 | | - |
| 231 | + |
232 | 232 | /* |
233 | 233 | * Localization system |
234 | 234 | */ |
235 | 235 | this.messages = new Map(); |
236 | | - |
| 236 | + |
237 | 237 | /* Public Methods */ |
238 | | - |
| 238 | + |
239 | 239 | /** |
240 | 240 | * Gets a message object, similar to wfMessage() |
241 | | - * |
| 241 | + * |
242 | 242 | * @param {string} key Key of message to get |
243 | 243 | * @param {mixed} params First argument in a list of variadic arguments, each a parameter for $ |
244 | 244 | * replacement |
— | — | @@ -252,10 +252,10 @@ |
253 | 253 | } |
254 | 254 | return new Message( mediaWiki.messages, key, parameters ); |
255 | 255 | }; |
256 | | - |
| 256 | + |
257 | 257 | /** |
258 | 258 | * Gets a message string, similar to wfMsg() |
259 | | - * |
| 259 | + * |
260 | 260 | * @param {string} key Key of message to get |
261 | 261 | * @param {mixed} params First argument in a list of variadic arguments, each a parameter for $ |
262 | 262 | * replacement |
— | — | @@ -263,21 +263,21 @@ |
264 | 264 | this.msg = function( key, parameters ) { |
265 | 265 | return mediaWiki.message.apply( mediaWiki.message, arguments ).toString(); |
266 | 266 | }; |
267 | | - |
| 267 | + |
268 | 268 | /** |
269 | 269 | * Client-side module loader which integrates with the MediaWiki ResourceLoader |
270 | 270 | */ |
271 | 271 | this.loader = new ( function() { |
272 | 272 | |
273 | 273 | /* Private Members */ |
274 | | - |
| 274 | + |
275 | 275 | /** |
276 | 276 | * Mapping of registered modules |
277 | 277 | * |
278 | | - * The jquery module is pre-registered, because it must have already |
279 | | - * been provided for this object to have been built, and in debug mode |
280 | | - * jquery would have been provided through a unique loader request, |
281 | | - * making it impossible to hold back registration of jquery until after |
| 278 | + * The jquery module is pre-registered, because it must have already |
| 279 | + * been provided for this object to have been built, and in debug mode |
| 280 | + * jquery would have been provided through a unique loader request, |
| 281 | + * making it impossible to hold back registration of jquery until after |
282 | 282 | * mediawiki. |
283 | 283 | * |
284 | 284 | * Format: |
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | return false; |
313 | 313 | } |
314 | 314 | for ( var i = 0; i < b.length; i++ ) { |
315 | | - if ( $.isArray( a[i] ) ) { |
| 315 | + if ( $.isArray( a[i] ) ) { |
316 | 316 | if ( !compare( a[i], b[i] ) ) { |
317 | 317 | return false; |
318 | 318 | } |
— | — | @@ -322,7 +322,7 @@ |
323 | 323 | } |
324 | 324 | return true; |
325 | 325 | }; |
326 | | - |
| 326 | + |
327 | 327 | /** |
328 | 328 | * Generates an ISO8601 "basic" string from a UNIX timestamp |
329 | 329 | */ |
— | — | @@ -358,7 +358,7 @@ |
359 | 359 | if ( $.inArray( registry[module].dependencies[n], resolved ) === -1 ) { |
360 | 360 | if ( $.inArray( registry[module].dependencies[n], unresolved ) !== -1 ) { |
361 | 361 | throw new Error( |
362 | | - 'Circular reference detected: ' + module + |
| 362 | + 'Circular reference detected: ' + module + |
363 | 363 | ' -> ' + registry[module].dependencies[n] |
364 | 364 | ); |
365 | 365 | } |
— | — | @@ -400,12 +400,12 @@ |
401 | 401 | }; |
402 | 402 | |
403 | 403 | /** |
404 | | - * Narrows a list of module names down to those matching a specific |
405 | | - * state. Possible states are 'undefined', 'registered', 'loading', |
| 404 | + * Narrows a list of module names down to those matching a specific |
| 405 | + * state. Possible states are 'undefined', 'registered', 'loading', |
406 | 406 | * 'loaded', or 'ready' |
407 | 407 | * |
408 | 408 | * @param mixed string or array of strings of module states to filter by |
409 | | - * @param array list of module names to filter (optional, all modules |
| 409 | + * @param array list of module names to filter (optional, all modules |
410 | 410 | * will be used by default) |
411 | 411 | * @return array list of filtered module names |
412 | 412 | */ |
— | — | @@ -465,11 +465,11 @@ |
466 | 466 | { type: "text/css" }, |
467 | 467 | new mediaWiki.html.Cdata( registry[module].style ) |
468 | 468 | ) ); |
469 | | - } else if ( typeof registry[module].style === 'object' |
470 | | - && !( registry[module].style instanceof Array ) ) |
| 469 | + } else if ( typeof registry[module].style === 'object' |
| 470 | + && !( registry[module].style instanceof Array ) ) |
471 | 471 | { |
472 | 472 | for ( var media in registry[module].style ) { |
473 | | - $( 'head' ).append( mediaWiki.html.element( 'style', |
| 473 | + $( 'head' ).append( mediaWiki.html.element( 'style', |
474 | 474 | { type: 'text/css', media: media }, |
475 | 475 | new mediaWiki.html.Cdata( registry[module].style[media] ) |
476 | 476 | ) ); |
— | — | @@ -486,8 +486,8 @@ |
487 | 487 | // Run jobs who's dependencies have just been met |
488 | 488 | for ( var j = 0; j < jobs.length; j++ ) { |
489 | 489 | if ( compare( |
490 | | - filter( 'ready', jobs[j].dependencies ), |
491 | | - jobs[j].dependencies ) ) |
| 490 | + filter( 'ready', jobs[j].dependencies ), |
| 491 | + jobs[j].dependencies ) ) |
492 | 492 | { |
493 | 493 | if ( typeof jobs[j].ready === 'function' ) { |
494 | 494 | jobs[j].ready(); |
— | — | @@ -499,9 +499,9 @@ |
500 | 500 | // Execute modules who's dependencies have just been met |
501 | 501 | for ( r in registry ) { |
502 | 502 | if ( registry[r].state == 'loaded' ) { |
503 | | - if ( compare( |
504 | | - filter( ['ready'], registry[r].dependencies ), |
505 | | - registry[r].dependencies ) ) |
| 503 | + if ( compare( |
| 504 | + filter( ['ready'], registry[r].dependencies ), |
| 505 | + registry[r].dependencies ) ) |
506 | 506 | { |
507 | 507 | execute( r ); |
508 | 508 | } |
— | — | @@ -525,7 +525,7 @@ |
526 | 526 | } |
527 | 527 | |
528 | 528 | /** |
529 | | - * Adds a dependencies to the queue with optional callbacks to be run |
| 529 | + * Adds a dependencies to the queue with optional callbacks to be run |
530 | 530 | * when the dependencies are ready or fail |
531 | 531 | * |
532 | 532 | * @param mixed string moulde name or array of string module names |
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | dependencies = [dependencies]; |
540 | 540 | if ( dependencies[0] in registry ) { |
541 | 541 | for ( var n = 0; n < registry[dependencies[0]].dependencies.length; n++ ) { |
542 | | - dependencies[dependencies.length] = |
| 542 | + dependencies[dependencies.length] = |
543 | 543 | registry[dependencies[0]].dependencies[n]; |
544 | 544 | } |
545 | 545 | } |
— | — | @@ -546,8 +546,8 @@ |
547 | 547 | // Add ready and error callbacks if they were given |
548 | 548 | if ( arguments.length > 1 ) { |
549 | 549 | jobs[jobs.length] = { |
550 | | - 'dependencies': filter( |
551 | | - ['undefined', 'registered', 'loading', 'loaded'], |
| 550 | + 'dependencies': filter( |
| 551 | + ['undefined', 'registered', 'loading', 'loaded'], |
552 | 552 | dependencies ), |
553 | 553 | 'ready': ready, |
554 | 554 | 'error': error |
— | — | @@ -602,7 +602,7 @@ |
603 | 603 | queue = []; |
604 | 604 | // After document ready, handle the batch |
605 | 605 | if ( !suspended && batch.length ) { |
606 | | - // Always order modules alphabetically to help reduce cache |
| 606 | + // Always order modules alphabetically to help reduce cache |
607 | 607 | // misses for otherwise identical content |
608 | 608 | batch.sort(); |
609 | 609 | // Build a list of request parameters |
— | — | @@ -634,10 +634,10 @@ |
635 | 635 | { 'modules': groups[group].join( '|' ), 'version': formatVersionNumber( version ) }, base |
636 | 636 | ); |
637 | 637 | } |
638 | | - // Clear the batch - this MUST happen before we append the |
639 | | - // script element to the body or it's possible that the script |
640 | | - // will be locally cached, instantly load, and work the batch |
641 | | - // again, all before we've cleared it causing each request to |
| 638 | + // Clear the batch - this MUST happen before we append the |
| 639 | + // script element to the body or it's possible that the script |
| 640 | + // will be locally cached, instantly load, and work the batch |
| 641 | + // again, all before we've cleared it causing each request to |
642 | 642 | // include modules which are already loaded |
643 | 643 | batch = []; |
644 | 644 | // Asynchronously append a script tag to the end of the body |
— | — | @@ -647,7 +647,7 @@ |
648 | 648 | requests[r] = sortQuery( requests[r] ); |
649 | 649 | // Build out the HTML |
650 | 650 | var src = mediaWiki.config.get( 'wgLoadScript' ) + '?' + $.param( requests[r] ); |
651 | | - html += mediaWiki.html.element( 'script', |
| 651 | + html += mediaWiki.html.element( 'script', |
652 | 652 | { type: 'text/javascript', src: src }, '' ); |
653 | 653 | } |
654 | 654 | return html; |
— | — | @@ -662,7 +662,7 @@ |
663 | 663 | }; |
664 | 664 | |
665 | 665 | /** |
666 | | - * Registers a module, letting the system know about it and its |
| 666 | + * Registers a module, letting the system know about it and its |
667 | 667 | * dependencies. loader.js files contain calls to this function. |
668 | 668 | */ |
669 | 669 | this.register = function( module, version, dependencies, group ) { |
— | — | @@ -695,15 +695,15 @@ |
696 | 696 | // Allow dependencies to be given as a single module name |
697 | 697 | registry[module].dependencies = [dependencies]; |
698 | 698 | } else if ( typeof dependencies === 'object' || typeof dependencies === 'function' ) { |
699 | | - // Allow dependencies to be given as an array of module names |
| 699 | + // Allow dependencies to be given as an array of module names |
700 | 700 | // or a function which returns an array |
701 | 701 | registry[module].dependencies = dependencies; |
702 | 702 | } |
703 | 703 | }; |
704 | 704 | |
705 | 705 | /** |
706 | | - * Implements a module, giving the system a course of action to take |
707 | | - * upon loading. Results of a request for one or more modules contain |
| 706 | + * Implements a module, giving the system a course of action to take |
| 707 | + * upon loading. Results of a request for one or more modules contain |
708 | 708 | * calls to this function. |
709 | 709 | */ |
710 | 710 | this.implement = function( module, script, style, localization ) { |
— | — | @@ -715,19 +715,19 @@ |
716 | 716 | if ( typeof script !== 'function' ) { |
717 | 717 | throw new Error( 'script must be a function, not a ' + typeof script ); |
718 | 718 | } |
719 | | - if ( typeof style !== 'undefined' |
720 | | - && typeof style !== 'string' |
721 | | - && typeof style !== 'object' ) |
| 719 | + if ( typeof style !== 'undefined' |
| 720 | + && typeof style !== 'string' |
| 721 | + && typeof style !== 'object' ) |
722 | 722 | { |
723 | 723 | throw new Error( 'style must be a string or object, not a ' + typeof style ); |
724 | 724 | } |
725 | | - if ( typeof localization !== 'undefined' |
726 | | - && typeof localization !== 'object' ) |
| 725 | + if ( typeof localization !== 'undefined' |
| 726 | + && typeof localization !== 'object' ) |
727 | 727 | { |
728 | 728 | throw new Error( 'localization must be an object, not a ' + typeof localization ); |
729 | 729 | } |
730 | | - if ( typeof registry[module] !== 'undefined' |
731 | | - && typeof registry[module].script !== 'undefined' ) |
| 730 | + if ( typeof registry[module] !== 'undefined' |
| 731 | + && typeof registry[module].script !== 'undefined' ) |
732 | 732 | { |
733 | 733 | throw new Error( 'module already implemeneted: ' + module ); |
734 | 734 | } |
— | — | @@ -735,8 +735,8 @@ |
736 | 736 | registry[module].state = 'loaded'; |
737 | 737 | // Attach components |
738 | 738 | registry[module].script = script; |
739 | | - if ( typeof style === 'string' |
740 | | - || typeof style === 'object' && !( style instanceof Array ) ) |
| 739 | + if ( typeof style === 'string' |
| 740 | + || typeof style === 'object' && !( style instanceof Array ) ) |
741 | 741 | { |
742 | 742 | registry[module].style = style; |
743 | 743 | } |
— | — | @@ -744,9 +744,9 @@ |
745 | 745 | registry[module].messages = localization; |
746 | 746 | } |
747 | 747 | // Execute or queue callback |
748 | | - if ( compare( |
749 | | - filter( ['ready'], registry[module].dependencies ), |
750 | | - registry[module].dependencies ) ) |
| 748 | + if ( compare( |
| 749 | + filter( ['ready'], registry[module].dependencies ), |
| 750 | + registry[module].dependencies ) ) |
751 | 751 | { |
752 | 752 | execute( module ); |
753 | 753 | } else { |
— | — | @@ -757,7 +757,7 @@ |
758 | 758 | /** |
759 | 759 | * Executes a function as soon as one or more required modules are ready |
760 | 760 | * |
761 | | - * @param mixed string or array of strings of modules names the callback |
| 761 | + * @param mixed string or array of strings of modules names the callback |
762 | 762 | * dependencies to be ready before |
763 | 763 | * executing |
764 | 764 | * @param function callback to execute when all dependencies are ready (optional) |
— | — | @@ -766,7 +766,7 @@ |
767 | 767 | this.using = function( dependencies, ready, error ) { |
768 | 768 | // Validate input |
769 | 769 | if ( typeof dependencies !== 'object' && typeof dependencies !== 'string' ) { |
770 | | - throw new Error( 'dependencies must be a string or an array, not a ' + |
| 770 | + throw new Error( 'dependencies must be a string or an array, not a ' + |
771 | 771 | typeof dependencies ) |
772 | 772 | } |
773 | 773 | // Allow calling with a single dependency as a string |
— | — | @@ -796,24 +796,24 @@ |
797 | 797 | /** |
798 | 798 | * Loads an external script or one or more modules for future use |
799 | 799 | * |
800 | | - * @param {mixed} modules either the name of a module, array of modules, |
| 800 | + * @param {mixed} modules either the name of a module, array of modules, |
801 | 801 | * or a URL of an external script or style |
802 | | - * @param {string} type mime-type to use if calling with a URL of an |
803 | | - * external script or style; acceptable values are "text/css" and |
804 | | - * "text/javascript"; if no type is provided, text/javascript is |
| 802 | + * @param {string} type mime-type to use if calling with a URL of an |
| 803 | + * external script or style; acceptable values are "text/css" and |
| 804 | + * "text/javascript"; if no type is provided, text/javascript is |
805 | 805 | * assumed |
806 | 806 | */ |
807 | 807 | this.load = function( modules, type ) { |
808 | 808 | // Validate input |
809 | 809 | if ( typeof modules !== 'object' && typeof modules !== 'string' ) { |
810 | | - throw new Error( 'dependencies must be a string or an array, not a ' + |
| 810 | + throw new Error( 'dependencies must be a string or an array, not a ' + |
811 | 811 | typeof dependencies ) |
812 | 812 | } |
813 | 813 | // Allow calling with an external script or single dependency as a string |
814 | 814 | if ( typeof modules === 'string' ) { |
815 | 815 | // Support adding arbitrary external scripts |
816 | | - if ( modules.substr( 0, 7 ) == 'http://' |
817 | | - || modules.substr( 0, 8 ) == 'https://' ) |
| 816 | + if ( modules.substr( 0, 7 ) == 'http://' |
| 817 | + || modules.substr( 0, 8 ) == 'https://' ) |
818 | 818 | { |
819 | 819 | if ( type === 'text/css' ) { |
820 | 820 | $( 'head' ) |
— | — | @@ -821,7 +821,7 @@ |
822 | 822 | .attr( 'href', modules ) ); |
823 | 823 | return true; |
824 | 824 | } else if ( type === 'text/javascript' || typeof type === 'undefined' ) { |
825 | | - var script = mediaWiki.html.element( 'script', |
| 825 | + var script = mediaWiki.html.element( 'script', |
826 | 826 | { type: 'text/javascript', src: modules }, '' ); |
827 | 827 | if ( ready ) { |
828 | 828 | $( 'body' ).append( script ); |
— | — | @@ -923,7 +923,7 @@ |
924 | 924 | }; |
925 | 925 | |
926 | 926 | /** |
927 | | - * Wrapper object for raw HTML passed to mediaWiki.html.element(). |
| 927 | + * Wrapper object for raw HTML passed to mediaWiki.html.element(). |
928 | 928 | */ |
929 | 929 | this.Raw = function( value ) { |
930 | 930 | this.value = value; |
— | — | @@ -945,13 +945,13 @@ |
946 | 946 | * - string: The string is escaped. |
947 | 947 | * - null or undefined: The short closing form is used, e.g. <br/>. |
948 | 948 | * - this.Raw: The value attribute is included without escaping. |
949 | | - * - this.Cdata: The value attribute is included, and an exception is |
950 | | - * thrown if it contains an illegal ETAGO delimiter. |
| 949 | + * - this.Cdata: The value attribute is included, and an exception is |
| 950 | + * thrown if it contains an illegal ETAGO delimiter. |
951 | 951 | * See http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.3.2 |
952 | 952 | * |
953 | 953 | * Example: |
954 | 954 | * var h = mediaWiki.html; |
955 | | - * return h.element( 'div', {}, |
| 955 | + * return h.element( 'div', {}, |
956 | 956 | * new h.Raw( h.element( 'img', {src: '<'} ) ) ); |
957 | 957 | * Returns <div><img src="<"/></div> |
958 | 958 | */ |
Index: trunk/phase3/resources/mediawiki/mediawiki.log.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Log output to the console. |
10 | | - * |
| 10 | + * |
11 | 11 | * In the case that the browser does not have a console available, one is created by appending a |
12 | 12 | * <div> element to the bottom of the body and then appending a <div> element to that for each |
13 | 13 | * message. |
— | — | @@ -16,9 +16,9 @@ |
17 | 17 | * @param {string} string Message to output to console |
18 | 18 | */ |
19 | 19 | mediaWiki.log = function( string ) { |
20 | | - // Allow log messages to use a configured prefix |
| 20 | + // Allow log messages to use a configured prefix |
21 | 21 | if ( mw.config.exists( 'mw.log.prefix' ) ) { |
22 | | - string = mw.config.get( 'mw.log.prefix' ) + '> ' + string; |
| 22 | + string = mw.config.get( 'mw.log.prefix' ) + '> ' + string; |
23 | 23 | } |
24 | 24 | // Try to use an existing console |
25 | 25 | if ( typeof window.console !== 'undefined' && typeof window.console.log == 'function' ) { |
Index: trunk/phase3/resources/mediawiki.language/mediawiki.language.js |
— | — | @@ -1,16 +1,16 @@ |
2 | 2 | /** |
3 | 3 | * Base language object |
4 | | - * |
5 | | - * Localized Language support attempts to mirror some of the functionality of |
6 | | - * Language.php in MediaWiki. This object contains methods for loading and |
| 4 | + * |
| 5 | + * Localized Language support attempts to mirror some of the functionality of |
| 6 | + * Language.php in MediaWiki. This object contains methods for loading and |
7 | 7 | * transforming message text. |
8 | 8 | */ |
9 | 9 | |
10 | 10 | mediaWiki.language = { |
11 | 11 | /** |
12 | | - * Process the PLURAL template substitution |
13 | | - * |
14 | | - * @param {object} template Template object |
| 12 | + * Process the PLURAL template substitution |
| 13 | + * |
| 14 | + * @param {object} template Template object |
15 | 15 | * @format template |
16 | 16 | * { |
17 | 17 | * 'title': [title of template], |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | } |
28 | 28 | // Restore the count into a Number ( if it got converted earlier ) |
29 | 29 | var count = mediaWiki.language.convertNumber( template.title, true ); |
30 | | - // Do convertPlural call |
| 30 | + // Do convertPlural call |
31 | 31 | return mediaWiki.language.convertPlural( parseInt( count ), template.parameters ); |
32 | 32 | } |
33 | 33 | // Could not process plural return first form or nothing |
— | — | @@ -37,20 +37,20 @@ |
38 | 38 | }, |
39 | 39 | /** |
40 | 40 | * Plural form transformations, needed for some languages. |
41 | | - * |
| 41 | + * |
42 | 42 | * @param {integer} count Non-localized quantifier |
43 | 43 | * @param {array} forms List of plural forms |
44 | 44 | * @return {string} Correct form for quantifier in this language |
45 | 45 | */ |
46 | 46 | 'convertPlural': function( count, forms ){ |
47 | 47 | if ( !forms || forms.length == 0 ) { |
48 | | - return ''; |
| 48 | + return ''; |
49 | 49 | } |
50 | 50 | return ( parseInt( count ) == 1 ) ? forms[0] : forms[1]; |
51 | 51 | }, |
52 | 52 | /** |
53 | 53 | * Pads an array to a specific length by copying the last one element. |
54 | | - * |
| 54 | + * |
55 | 55 | * @param {array} forms Number of forms given to convertPlural |
56 | 56 | * @param {integer} count Number of forms required |
57 | 57 | * @return {array} Padded array of forms |
— | — | @@ -58,12 +58,12 @@ |
59 | 59 | 'preConvertPlural': function( forms, count ) { |
60 | 60 | while ( forms.length < count ) { |
61 | 61 | forms.push( forms[ forms.length-1 ] ); |
62 | | - } |
| 62 | + } |
63 | 63 | return forms; |
64 | 64 | }, |
65 | 65 | /** |
66 | 66 | * Converts a number using digitTransformTable. |
67 | | - * |
| 67 | + * |
68 | 68 | * @param {number} number Value to be converted |
69 | 69 | * @param {boolean} integer Convert the return value to an integer |
70 | 70 | */ |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | if ( !mediaWiki.language.digitTransformTable ) { |
73 | 73 | return number; |
74 | 74 | } |
75 | | - // Set the target Transform table: |
| 75 | + // Set the target Transform table: |
76 | 76 | var transformTable = mediaWiki.language.digitTransformTable; |
77 | 77 | // Check if the "restore" to Latin number flag is set: |
78 | 78 | if ( integer ) { |
Index: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.js |
— | — | @@ -88,9 +88,9 @@ |
89 | 89 | "`" / "{" / |
90 | 90 | "|" / "}" / |
91 | 91 | "~" |
92 | | - */ |
| 92 | + */ |
93 | 93 | var rfc5322_atext = "a-z0-9!#$%&'*+-/=?^_`{|}—~" ; |
94 | | - |
| 94 | + |
95 | 95 | /** |
96 | 96 | * Next define the RFC 1034 'ldh-str' |
97 | 97 | * <domain> ::= <subdomain> | " " |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | // "apostrophe" |
114 | 114 | '@' |
115 | 115 | + |
116 | | - // Domain first part |
| 116 | + // Domain first part |
117 | 117 | '[' + rfc1034_ldh_str + ']+' |
118 | 118 | + |
119 | 119 | // Second part and following are separated by a dot |
Index: trunk/phase3/resources/mediawiki.specials/mediawiki.specials.preferences.css |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | #mw-emailaddress-validity { |
3 | | - padding: 2px 1em; |
| 3 | + padding: 2px 1em; |
4 | 4 | } |
5 | 5 | body.ltr #mw-emailaddress-validity { |
6 | 6 | border-bottom-right-radius:0.8em; |
Index: trunk/phase3/resources/mediawiki.advanced/mediawiki.advanced.rightclickedit.js |
— | — | @@ -4,11 +4,11 @@ |
5 | 5 | $( function() { |
6 | 6 | |
7 | 7 | // Select all h1-h6 elements that contain editsection links |
8 | | - $('h1:has(.editsection a), ' + |
9 | | - 'h2:has(.editsection a), ' + |
10 | | - 'h3:has(.editsection a), ' + |
11 | | - 'h4:has(.editsection a), ' + |
12 | | - 'h5:has(.editsection a), ' + |
| 8 | + $('h1:has(.editsection a), ' + |
| 9 | + 'h2:has(.editsection a), ' + |
| 10 | + 'h3:has(.editsection a), ' + |
| 11 | + 'h4:has(.editsection a), ' + |
| 12 | + 'h5:has(.editsection a), ' + |
13 | 13 | 'h6:has(.editsection a)' |
14 | 14 | ).live( 'contextmenu', function( e ) { |
15 | 15 | // Get href of the [edit] link |