Index: trunk/phase3/skins/common/protect.js |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | if( !box ) |
22 | 22 | return false; |
23 | 23 | |
24 | | - var boxbody = box.getElementsByTagName('tbody')[0] |
| 24 | + var boxbody = box.getElementsByTagName('tbody')[0]; |
25 | 25 | var row = document.createElement( 'tr' ); |
26 | 26 | boxbody.insertBefore( row, boxbody.firstChild.nextSibling ); |
27 | 27 | |
— | — | @@ -348,4 +348,4 @@ |
349 | 349 | } |
350 | 350 | }); |
351 | 351 | } |
352 | | -} |
| 352 | +}; |
Index: trunk/phase3/skins/common/metadata.js |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | return true; |
48 | 48 | } |
49 | 49 | return false; |
50 | | -} |
| 50 | +}; |
51 | 51 | |
52 | 52 | $( document ).ready( function() { |
53 | 53 | attachMetadataToggle( 'mw_metadata', mediaWiki.msg( 'metadata-expand' ), mediaWiki.msg( 'metadata-collapse' ) ); |
Index: trunk/phase3/skins/common/block.js |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | } else { |
18 | 18 | field.style.display = 'none'; |
19 | 19 | } |
20 | | -} |
| 20 | +}; |
21 | 21 | window.updateBlockOptions = function() { |
22 | 22 | if ( !document.getElementById ) { |
23 | 23 | return; |
— | — | @@ -59,6 +59,6 @@ |
60 | 60 | if( watchuserRow ) { |
61 | 61 | watchuserRow.style.display = isIpRange && !isEmpty ? 'none' : ''; |
62 | 62 | } |
63 | | -} |
| 63 | +}; |
64 | 64 | |
65 | 65 | addOnloadHook( considerChangingExpiryFocus ); |
\ No newline at end of file |
Index: trunk/phase3/skins/common/IEFixes.js |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | relativeforfloats(); |
12 | 12 | fixalpha(); |
13 | 13 | } |
14 | | -} |
| 14 | +}; |
15 | 15 | |
16 | 16 | if ( document.attachEvent ) { |
17 | 17 | document.attachEvent( 'onreadystatechange', window.hookit ); |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | linkFix.style.width = '100%'; |
63 | 63 | } |
64 | 64 | } |
65 | | -} |
| 65 | +}; |
66 | 66 | |
67 | 67 | // fix ie6 disappering float bug |
68 | 68 | window.relativeforfloats = function() { |
— | — | @@ -72,7 +72,8 @@ |
73 | 73 | } |
74 | 74 | setrelative( tables ); |
75 | 75 | setrelative( divs ); |
76 | | -} |
| 76 | +}; |
| 77 | + |
77 | 78 | window.setrelative = function( nodes ) { |
78 | 79 | var i = 0; |
79 | 80 | while ( i < nodes.length ) { |
— | — | @@ -84,7 +85,7 @@ |
85 | 86 | } |
86 | 87 | i++; |
87 | 88 | } |
88 | | -} |
| 89 | +}; |
89 | 90 | |
90 | 91 | // Expand links for printing |
91 | 92 | String.prototype.hasClass = function( classWanted ) { |
— | — | @@ -95,7 +96,7 @@ |
96 | 97 | } |
97 | 98 | } |
98 | 99 | return false; |
99 | | -} |
| 100 | +}; |
100 | 101 | |
101 | 102 | window.expandedURLs = undefined; |
102 | 103 | |
— | — | @@ -117,7 +118,7 @@ |
118 | 119 | } |
119 | 120 | } |
120 | 121 | } |
121 | | -} |
| 122 | +}; |
122 | 123 | |
123 | 124 | window.onafterprint = function() { |
124 | 125 | for ( var i = 0; i < expandedURLs.length; i++ ) { |
— | — | @@ -125,4 +126,4 @@ |
126 | 127 | expandedURLs[i].removeNode( true ); |
127 | 128 | } |
128 | 129 | } |
129 | | -} |
| 130 | +}; |
Index: trunk/phase3/skins/common/enhancedchanges.js |
— | — | @@ -37,4 +37,4 @@ |
38 | 38 | closearrow.className = 'mw-changeslist-hidden'; |
39 | 39 | subentries.className = 'mw-changeslist-hidden'; |
40 | 40 | } |
41 | | -} |
| 41 | +}; |
Index: trunk/phase3/skins/common/password.js |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | score += ( charClasses - 1 ) * 10; |
38 | 38 | |
39 | 39 | return score; |
40 | | -} |
| 40 | +}; |
41 | 41 | |
42 | 42 | // Calculates a penalty to brute force score due to character repetition |
43 | 43 | window.repetitionAdjustment = function( pwd ) { |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | var ratio = pwd.length / unique.length - 0.4; // allow up to 40% repetition, reward for less, penalize for more |
51 | 51 | |
52 | 52 | return ratio * 10; |
53 | | -} |
| 53 | +}; |
54 | 54 | |
55 | 55 | // Checks how many simple sequences ("abc", "321") are there in the password |
56 | 56 | window.sequenceScore = function( pwd ) { |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | } |
78 | 78 | } |
79 | 79 | return score; |
80 | | -} |
| 80 | +}; |
81 | 81 | |
82 | 82 | (function( $ ) { |
83 | 83 | function passwordChanged() { |
Index: trunk/phase3/skins/common/search.js |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | prefix = '&search='; |
22 | 22 | } |
23 | 23 | obj.href = parts[0] + prefix + encodeURIComponent( searchterm ) + lastpart; |
24 | | -} |
| 24 | +}; |
25 | 25 | |
26 | 26 | window.mwToggleSearchCheckboxes = function( btn ) { |
27 | 27 | if( !document.getElementById ) { |
— | — | @@ -47,4 +47,4 @@ |
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
51 | | -} |
| 51 | +}; |
Index: trunk/phase3/skins/common/changepassword.js |
— | — | @@ -7,10 +7,10 @@ |
8 | 8 | document.getElementById('wpPassword').disabled = false; |
9 | 9 | document.getElementById('wpComment').disabled = true; |
10 | 10 | } |
11 | | -} |
| 11 | +}; |
12 | 12 | |
13 | 13 | window.onNameChangeHook = function() { |
14 | 14 | document.getElementById( 'wpName' ).onblur = onNameChange; |
15 | | -} |
| 15 | +}; |
16 | 16 | |
17 | 17 | addOnloadHook( onNameChangeHook ); |
Index: trunk/phase3/skins/common/prefs.js |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | var junk = msg.split('$1'); |
13 | 13 | document.write( junk[0] + 'UTC' + tzString + junk[1] ); |
14 | 14 | } |
15 | | -} |
| 15 | +}; |
16 | 16 | |
17 | 17 | window.timezoneSetup = function() { |
18 | 18 | var tzSelect = document.getElementById( 'mw-input-timecorrection' ); |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | } |
25 | 25 | |
26 | 26 | updateTimezoneSelection( false ); |
27 | | -} |
| 27 | +}; |
28 | 28 | |
29 | 29 | // in [-]HH:MM format... |
30 | 30 | // won't yet work with non-even tzs |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | var tzString = ( ( tzRaw >= 0 ) ? '-' : '' ) + ( ( tzHour < 10 ) ? '0' : '' ) + tzHour + |
39 | 39 | ':' + ( ( tzMin < 10 ) ? '0' : '' ) + tzMin; |
40 | 40 | return tzString; |
41 | | -} |
| 41 | +}; |
42 | 42 | |
43 | 43 | window.guessTimezone = function() { |
44 | 44 | var textbox = document.getElementById( 'mw-input-timecorrection-other' ); |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | textbox.value = fetchTimezone(); |
49 | 49 | textbox.disabled = false; // The changed handler doesn't trip, obviously. |
50 | 50 | updateTimezoneSelection( true ); |
51 | | -} |
| 51 | +}; |
52 | 52 | |
53 | 53 | window.updateTimezoneSelection = function( force_offset ) { |
54 | 54 | var selector = document.getElementById( 'mw-input-timecorrection' ); |
— | — | @@ -133,6 +133,6 @@ |
134 | 134 | } |
135 | 135 | textbox.value = hour + ':' + min; |
136 | 136 | } |
137 | | -} |
| 137 | +}; |
138 | 138 | |
139 | 139 | addOnloadHook( timezoneSetup ); |
Index: trunk/phase3/skins/common/preview.js |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | |
52 | 52 | $( mw ).trigger( 'LivePreviewDone', [copyElements] ); |
53 | 53 | } ); |
54 | | -} |
| 54 | +}; |
55 | 55 | |
56 | 56 | // Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL. |
57 | 57 | // http://jquery.malsup.com/form/#download |
Index: trunk/phase3/skins/common/ajax.js |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | } |
158 | 158 | |
159 | 159 | return; |
160 | | - } |
| 160 | + }; |
161 | 161 | |
162 | 162 | sajax_debug( func_name + ' uri = ' + uri + ' / post = ' + post_data ); |
163 | 163 | x.send( post_data ); |
Index: trunk/phase3/skins/common/upload.js |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | } |
11 | 11 | // We might show a preview |
12 | 12 | wgUploadLicenseObj.fetchPreview( selection ); |
13 | | -} |
| 13 | +}; |
14 | 14 | |
15 | 15 | window.wgUploadSetup = function() { |
16 | 16 | // Disable URL box if the URL copy upload source type is not selected |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | document.getElementById( wgUploadSourceIds[i] ).onchange = function (e) { |
86 | 86 | fillDestFilename( this.id ); |
87 | 87 | }; |
88 | | -} |
| 88 | +}; |
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Iterate over all upload source fields and disable all except the selected one. |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | inputs[j].disabled = !isChecked; |
125 | 125 | } |
126 | 126 | } |
127 | | -} |
| 127 | +}; |
128 | 128 | |
129 | 129 | window.wgUploadWarningObj = { |
130 | 130 | 'responseCache' : { '' : ' ' }, |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | element.innerHTML = text; |
211 | 211 | } |
212 | 212 | } |
213 | | -} |
| 213 | +}; |
214 | 214 | |
215 | 215 | window.fillDestFilename = function(id) { |
216 | 216 | if (!wgUploadAutoFill) { |
— | — | @@ -263,7 +263,7 @@ |
264 | 264 | if( e ) e.className = 'error'; |
265 | 265 | |
266 | 266 | // Clear wpDestFile as well |
267 | | - var e = document.getElementById( 'wpDestFile' ) |
| 267 | + var e = document.getElementById( 'wpDestFile' ); |
268 | 268 | if( e ) e.value = ''; |
269 | 269 | |
270 | 270 | return false; |
— | — | @@ -283,7 +283,7 @@ |
284 | 284 | destFile.value = fname; |
285 | 285 | wgUploadWarningObj.checkNow(fname) ; |
286 | 286 | } |
287 | | -} |
| 287 | +}; |
288 | 288 | |
289 | 289 | window.toggleFilenameFiller = function() { |
290 | 290 | if(!document.getElementById) return; |
— | — | @@ -294,7 +294,7 @@ |
295 | 295 | } else { |
296 | 296 | wgUploadAutoFill = false; |
297 | 297 | } |
298 | | -} |
| 298 | +}; |
299 | 299 | |
300 | 300 | window.wgUploadLicenseObj = { |
301 | 301 | |
— | — | @@ -340,6 +340,6 @@ |
341 | 341 | previewPanel.innerHTML = preview; |
342 | 342 | } |
343 | 343 | |
344 | | -} |
| 344 | +}; |
345 | 345 | |
346 | 346 | addOnloadHook( wgUploadSetup ); |
Index: trunk/phase3/skins/common/mwsuggest.js |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | this.id = id; |
59 | 59 | this.r = r; |
60 | 60 | this.query = query; |
61 | | -} |
| 61 | +}; |
62 | 62 | |
63 | 63 | /** Property class for single search box */ |
64 | 64 | window.os_Results = function( name, formname ) { |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | this.containerTotal = 0; // total height of the container will all results |
79 | 79 | this.visible = false; // if container is visible |
80 | 80 | this.stayHidden = false; // don't try to show if lost focus |
81 | | -} |
| 81 | +}; |
82 | 82 | |
83 | 83 | /** Timer user to animate expansion/contraction of container width */ |
84 | 84 | window.os_AnimationTimer = function( r, target ) { |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | this.inc = -os_animation_min_step; |
93 | 93 | } |
94 | 94 | this.target = target; |
95 | | -} |
| 95 | +}; |
96 | 96 | |
97 | 97 | /****************** |
98 | 98 | * Initialization |
— | — | @@ -107,7 +107,7 @@ |
108 | 108 | os_initHandlers( id, form, element ); |
109 | 109 | } |
110 | 110 | } |
111 | | -} |
| 111 | +}; |
112 | 112 | |
113 | 113 | /** Init Result objects and event handlers */ |
114 | 114 | window.os_initHandlers = function( name, formname, element ) { |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | } */ |
159 | 159 | } |
160 | 160 | |
161 | | -} |
| 161 | +}; |
162 | 162 | |
163 | 163 | window.os_hookEvent = function( element, hookName, hookFunct ) { |
164 | 164 | if ( element.addEventListener ) { |
— | — | @@ -165,7 +165,7 @@ |
166 | 166 | } else if ( window.attachEvent ) { |
167 | 167 | element.attachEvent( 'on' + hookName, hookFunct ); |
168 | 168 | } |
169 | | -} |
| 169 | +}; |
170 | 170 | |
171 | 171 | /******************** |
172 | 172 | * Keyboard events |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | } |
187 | 187 | var query = targ.value; |
188 | 188 | os_fetchResults( r, query, os_search_timeout ); |
189 | | -} |
| 189 | +}; |
190 | 190 | |
191 | 191 | /** catch arrows up/down and escape to hide the suggestions */ |
192 | 192 | window.os_processKey = function( r, keypressed, targ ) { |
— | — | @@ -215,7 +215,7 @@ |
216 | 216 | } else if( r.query != document.getElementById( r.searchbox ).value ) { |
217 | 217 | // os_hideResults( r ); // don't show old suggestions |
218 | 218 | } |
219 | | -} |
| 219 | +}; |
220 | 220 | |
221 | 221 | /** When keys is held down use a timer to output regular events */ |
222 | 222 | window.os_eventKeypress = function( e ) { |
— | — | @@ -229,7 +229,7 @@ |
230 | 230 | |
231 | 231 | os_keypressed_count++; |
232 | 232 | os_processKey( r, keypressed, targ ); |
233 | | -} |
| 233 | +}; |
234 | 234 | |
235 | 235 | /** Catch the key code (Firefox bug) */ |
236 | 236 | window.os_eventKeydown = function( e ) { |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | |
248 | 248 | os_cur_keypressed = ( e.keyCode == undefined ) ? e.which : e.keyCode; |
249 | 249 | os_keypressed_count = 0; |
250 | | -} |
| 250 | +}; |
251 | 251 | |
252 | 252 | |
253 | 253 | /** When the form is submitted hide everything, cancel updates... */ |
— | — | @@ -272,7 +272,7 @@ |
273 | 273 | } |
274 | 274 | } |
275 | 275 | return true; |
276 | | -} |
| 276 | +}; |
277 | 277 | |
278 | 278 | |
279 | 279 | |
— | — | @@ -289,7 +289,7 @@ |
290 | 290 | } |
291 | 291 | r.visible = false; |
292 | 292 | r.selected = -1; |
293 | | -} |
| 293 | +}; |
294 | 294 | |
295 | 295 | window.os_decodeValue = function( value ) { |
296 | 296 | if ( decodeURIComponent ) { |
— | — | @@ -299,7 +299,7 @@ |
300 | 300 | return unescape( value ); |
301 | 301 | } |
302 | 302 | return null; |
303 | | -} |
| 303 | +}; |
304 | 304 | |
305 | 305 | window.os_encodeQuery = function( value ) { |
306 | 306 | if ( encodeURIComponent ) { |
— | — | @@ -309,7 +309,7 @@ |
310 | 310 | return escape( value ); |
311 | 311 | } |
312 | 312 | return null; |
313 | | -} |
| 313 | +}; |
314 | 314 | |
315 | 315 | /** Handles data from XMLHttpRequest, and updates the suggest results */ |
316 | 316 | window.os_updateResults = function( r, query, text, cacheKey ) { |
— | — | @@ -340,7 +340,7 @@ |
341 | 341 | os_cache[cacheKey] = null; |
342 | 342 | } |
343 | 343 | } |
344 | | -} |
| 344 | +}; |
345 | 345 | |
346 | 346 | /** |
347 | 347 | * Create and populate a <datalist>. |
— | — | @@ -370,7 +370,7 @@ |
371 | 371 | r.results[i] = title; |
372 | 372 | c.appendChild( opt ); |
373 | 373 | } |
374 | | -} |
| 374 | +}; |
375 | 375 | |
376 | 376 | /** Fetch namespaces from checkboxes or hidden fields in the search form, |
377 | 377 | if none defined use wgSearchNamespaces global */ |
— | — | @@ -395,7 +395,7 @@ |
396 | 396 | namespaces = wgSearchNamespaces.join('|'); |
397 | 397 | } |
398 | 398 | return namespaces; |
399 | | -} |
| 399 | +}; |
400 | 400 | |
401 | 401 | /** Update results if user hasn't already typed something else */ |
402 | 402 | window.os_updateIfRelevant = function( r, query, text, cacheKey ) { |
— | — | @@ -404,7 +404,7 @@ |
405 | 405 | os_updateResults( r, query, text, cacheKey ); |
406 | 406 | } |
407 | 407 | r.query = query; |
408 | | -} |
| 408 | +}; |
409 | 409 | |
410 | 410 | /** Fetch results after some timeout */ |
411 | 411 | window.os_delayedFetch = function() { |
— | — | @@ -441,7 +441,7 @@ |
442 | 442 | } |
443 | 443 | } |
444 | 444 | } |
445 | | -} |
| 445 | +}; |
446 | 446 | |
447 | 447 | /** Init timed update via os_delayedUpdate() */ |
448 | 448 | window.os_fetchResults = function( r, query, timeout ) { |
— | — | @@ -466,7 +466,7 @@ |
467 | 467 | os_timer = new os_Timer( null, r, query ); |
468 | 468 | os_delayedFetch(); // do it now! |
469 | 469 | } |
470 | | -} |
| 470 | +}; |
471 | 471 | |
472 | 472 | /** Find event target */ |
473 | 473 | window.os_getTarget = function( e ) { |
— | — | @@ -480,7 +480,7 @@ |
481 | 481 | } else { |
482 | 482 | return null; |
483 | 483 | } |
484 | | -} |
| 484 | +}; |
485 | 485 | |
486 | 486 | /** Check if x is a valid integer */ |
487 | 487 | window.os_isNumber = function( x ) { |
— | — | @@ -494,12 +494,12 @@ |
495 | 495 | } |
496 | 496 | } |
497 | 497 | return true; |
498 | | -} |
| 498 | +}; |
499 | 499 | |
500 | 500 | /** Call this to enable suggestions on input (id=inputId), on a form (name=formName) */ |
501 | 501 | window.os_enableSuggestionsOn = function( inputId, formName ) { |
502 | 502 | os_initHandlers( inputId, formName, document.getElementById( inputId ) ); |
503 | | -} |
| 503 | +}; |
504 | 504 | |
505 | 505 | /** Call this to disable suggestios on input box (id=inputId) */ |
506 | 506 | window.os_disableSuggestionsOn = function( inputId ) { |
— | — | @@ -519,7 +519,7 @@ |
520 | 520 | if ( index >= 0 ) { |
521 | 521 | os_autoload_inputs[index] = os_autoload_forms[index] = ''; |
522 | 522 | } |
523 | | -} |
| 523 | +}; |
524 | 524 | |
525 | 525 | /************************************************ |
526 | 526 | * Div-only functions (irrelevant for datalist) |
— | — | @@ -542,7 +542,7 @@ |
543 | 543 | } |
544 | 544 | os_timer = null; |
545 | 545 | } |
546 | | -} |
| 546 | +}; |
547 | 547 | |
548 | 548 | /** Event: focus (catch only when stopped) */ |
549 | 549 | window.os_eventFocus = function( e ) { |
— | — | @@ -552,7 +552,7 @@ |
553 | 553 | return; // not our event |
554 | 554 | } |
555 | 555 | r.stayHidden = false; |
556 | | -} |
| 556 | +}; |
557 | 557 | |
558 | 558 | /** |
559 | 559 | * Create and populate a <div>, for non-<datalist>-supporting browsers. |
— | — | @@ -573,7 +573,7 @@ |
574 | 574 | os_fitContainer( r ); |
575 | 575 | os_trimResultText( r ); |
576 | 576 | os_showResults( r ); |
577 | | -} |
| 577 | +}; |
578 | 578 | |
579 | 579 | /** Create the result table to be placed in the container div */ |
580 | 580 | window.os_createResultTable = function( r, results ) { |
— | — | @@ -589,7 +589,7 @@ |
590 | 590 | } |
591 | 591 | html += '</table>'; |
592 | 592 | return html; |
593 | | -} |
| 593 | +}; |
594 | 594 | |
595 | 595 | /** Show results div */ |
596 | 596 | window.os_showResults = function( r ) { |
— | — | @@ -607,7 +607,7 @@ |
608 | 608 | c.style.visibility = 'visible'; |
609 | 609 | r.visible = true; |
610 | 610 | } |
611 | | -} |
| 611 | +}; |
612 | 612 | |
613 | 613 | window.os_operaWidthFix = function( x ) { |
614 | 614 | // For browsers that don't understand overflow-x, estimate scrollbar width |
— | — | @@ -615,7 +615,7 @@ |
616 | 616 | return 30; |
617 | 617 | } |
618 | 618 | return 0; |
619 | | -} |
| 619 | +}; |
620 | 620 | |
621 | 621 | /** Brower-dependent functions to find window inner size, and scroll status */ |
622 | 622 | window.f_clientWidth = function() { |
— | — | @@ -624,7 +624,7 @@ |
625 | 625 | document.documentElement ? document.documentElement.clientWidth : 0, |
626 | 626 | document.body ? document.body.clientWidth : 0 |
627 | 627 | ); |
628 | | -} |
| 628 | +}; |
629 | 629 | |
630 | 630 | window.f_clientHeight = function() { |
631 | 631 | return f_filterResults( |
— | — | @@ -632,7 +632,7 @@ |
633 | 633 | document.documentElement ? document.documentElement.clientHeight : 0, |
634 | 634 | document.body ? document.body.clientHeight : 0 |
635 | 635 | ); |
636 | | -} |
| 636 | +}; |
637 | 637 | |
638 | 638 | window.f_scrollLeft = function() { |
639 | 639 | return f_filterResults( |
— | — | @@ -640,7 +640,7 @@ |
641 | 641 | document.documentElement ? document.documentElement.scrollLeft : 0, |
642 | 642 | document.body ? document.body.scrollLeft : 0 |
643 | 643 | ); |
644 | | -} |
| 644 | +}; |
645 | 645 | |
646 | 646 | window.f_scrollTop = function() { |
647 | 647 | return f_filterResults( |
— | — | @@ -648,7 +648,7 @@ |
649 | 649 | document.documentElement ? document.documentElement.scrollTop : 0, |
650 | 650 | document.body ? document.body.scrollTop : 0 |
651 | 651 | ); |
652 | | -} |
| 652 | +}; |
653 | 653 | |
654 | 654 | window.f_filterResults = function( n_win, n_docel, n_body ) { |
655 | 655 | var n_result = n_win ? n_win : 0; |
— | — | @@ -656,7 +656,7 @@ |
657 | 657 | n_result = n_docel; |
658 | 658 | } |
659 | 659 | return n_body && ( !n_result || ( n_result > n_body ) ) ? n_body : n_result; |
660 | | -} |
| 660 | +}; |
661 | 661 | |
662 | 662 | /** Get the height available for the results container */ |
663 | 663 | window.os_availableHeight = function( r ) { |
— | — | @@ -666,7 +666,7 @@ |
667 | 667 | absTop = absTop.substring( 0, px ); |
668 | 668 | } |
669 | 669 | return f_clientHeight() - ( absTop - f_scrollTop() ); |
670 | | -} |
| 670 | +}; |
671 | 671 | |
672 | 672 | /** Get element absolute position {left,top} */ |
673 | 673 | window.os_getElementPosition = function( elemID ) { |
— | — | @@ -683,33 +683,41 @@ |
684 | 684 | offsetTop += document.body.topMargin; |
685 | 685 | } |
686 | 686 | return { left:offsetLeft, top:offsetTop }; |
687 | | -} |
| 687 | +}; |
688 | 688 | |
689 | 689 | /** Create the container div that will hold the suggested titles */ |
690 | | -window.os_createContainer = function( r ) { |
691 | | - var c = document.createElement( 'div' ); |
692 | | - var s = document.getElementById( r.searchbox ); |
693 | | - var pos = os_getElementPosition( r.searchbox ); |
| 690 | +window.os_createContainer = function(r) { |
| 691 | + var c = document.createElement('div'); |
| 692 | + var s = document.getElementById(r.searchbox); |
| 693 | + var pos = os_getElementPosition(r.searchbox); |
694 | 694 | var left = pos.left; |
695 | 695 | var top = pos.top + s.offsetHeight; |
696 | 696 | c.className = 'os-suggest'; |
697 | | - c.setAttribute( 'id', r.container ); |
698 | | - document.body.appendChild( c ); |
| 697 | + c.setAttribute('id', r.container); |
| 698 | + document.body.appendChild(c); |
699 | 699 | |
700 | 700 | // dynamically generated style params |
701 | 701 | // IE workaround, cannot explicitely set "style" attribute |
702 | | - c = document.getElementById( r.container ); |
| 702 | + c = document.getElementById(r.container); |
703 | 703 | c.style.top = top + 'px'; |
704 | 704 | c.style.left = left + 'px'; |
705 | 705 | c.style.width = s.offsetWidth + 'px'; |
706 | 706 | |
707 | 707 | // mouse event handlers |
708 | | - c.onmouseover = function( event ) { os_eventMouseover( r.searchbox, event ); }; |
709 | | - c.onmousemove = function( event ) { os_eventMousemove( r.searchbox, event ); }; |
710 | | - c.onmousedown = function( event ) { return os_eventMousedown( r.searchbox, event ); }; |
711 | | - c.onmouseup = function( event ) { os_eventMouseup( r.searchbox, event ); }; |
| 708 | + c.onmouseover = function(event) { |
| 709 | + os_eventMouseover(r.searchbox, event); |
| 710 | + }; |
| 711 | + c.onmousemove = function(event) { |
| 712 | + os_eventMousemove(r.searchbox, event); |
| 713 | + }; |
| 714 | + c.onmousedown = function(event) { |
| 715 | + return os_eventMousedown(r.searchbox, event); |
| 716 | + }; |
| 717 | + c.onmouseup = function(event) { |
| 718 | + os_eventMouseup(r.searchbox, event); |
| 719 | + }; |
712 | 720 | return c; |
713 | | -} |
| 721 | +}; |
714 | 722 | |
715 | 723 | /** change container height to fit to screen */ |
716 | 724 | window.os_fitContainer = function( r ) { |
— | — | @@ -730,7 +738,7 @@ |
731 | 739 | c.style.height = r.containerTotal + 'px'; |
732 | 740 | r.containerCount = r.resultCount; |
733 | 741 | } |
734 | | -} |
| 742 | +}; |
735 | 743 | |
736 | 744 | /** If some entries are longer than the box, replace text with "..." */ |
737 | 745 | window.os_trimResultText = function( r ) { |
— | — | @@ -796,7 +804,7 @@ |
797 | 805 | document.getElementById( r.resultTable + i ).setAttribute( 'title', r.results[i] ); |
798 | 806 | } |
799 | 807 | } |
800 | | -} |
| 808 | +}; |
801 | 809 | |
802 | 810 | /** Invoked on timer to animate change in container width */ |
803 | 811 | window.os_animateChangeWidth = function() { |
— | — | @@ -820,7 +828,7 @@ |
821 | 829 | c.style.left = ( normL + normW + ( target - nw ) - os_animation_timer.target - 1 ) + 'px'; |
822 | 830 | } |
823 | 831 | } |
824 | | -} |
| 832 | +}; |
825 | 833 | |
826 | 834 | /** Change the highlighted row (i.e. suggestion), from position cur to next */ |
827 | 835 | window.os_changeHighlight = function( r, cur, next, updateSearchBox ) { |
— | — | @@ -868,7 +876,7 @@ |
869 | 877 | if( updateSearchBox ) { |
870 | 878 | os_updateSearchQuery( r, newText ); |
871 | 879 | } |
872 | | -} |
| 880 | +}; |
873 | 881 | |
874 | 882 | window.os_HighlightClass = function() { |
875 | 883 | var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); |
— | — | @@ -882,12 +890,12 @@ |
883 | 891 | } |
884 | 892 | } |
885 | 893 | return 'os-suggest-result-hl'; |
886 | | -} |
| 894 | +}; |
887 | 895 | |
888 | 896 | window.os_updateSearchQuery = function( r, newText ) { |
889 | 897 | document.getElementById( r.searchbox ).value = newText; |
890 | 898 | r.query = newText; |
891 | | -} |
| 899 | +}; |
892 | 900 | |
893 | 901 | |
894 | 902 | /******************** |
— | — | @@ -905,7 +913,7 @@ |
906 | 914 | if( num >= 0 ) { |
907 | 915 | os_changeHighlight( r, r.selected, num, false ); |
908 | 916 | } |
909 | | -} |
| 917 | +}; |
910 | 918 | |
911 | 919 | /* Get row where the event occured (from its id) */ |
912 | 920 | window.os_getNumberSuffix = function( id ) { |
— | — | @@ -918,12 +926,12 @@ |
919 | 927 | } else { |
920 | 928 | return -1; |
921 | 929 | } |
922 | | -} |
| 930 | +}; |
923 | 931 | |
924 | 932 | /** Save mouse move as last action */ |
925 | 933 | window.os_eventMousemove = function( srcId, e ) { |
926 | 934 | os_mouse_moved = true; |
927 | | -} |
| 935 | +}; |
928 | 936 | |
929 | 937 | /** Mouse button held down, register possible click */ |
930 | 938 | window.os_eventMousedown = function( srcId, e ) { |
— | — | @@ -943,7 +951,7 @@ |
944 | 952 | document.getElementById( r.searchbox ).focus(); |
945 | 953 | |
946 | 954 | return false; // prevents selection |
947 | | -} |
| 955 | +}; |
948 | 956 | |
949 | 957 | /** Mouse button released, check for click on some row */ |
950 | 958 | window.os_eventMouseup = function( srcId, e ) { |
— | — | @@ -962,7 +970,7 @@ |
963 | 971 | os_mouse_pressed = false; |
964 | 972 | // keep the focus on the search field |
965 | 973 | document.getElementById( r.searchbox ).focus(); |
966 | | -} |
| 974 | +}; |
967 | 975 | |
968 | 976 | /** Toggle stuff seems to be dead code? */ |
969 | 977 | |
— | — | @@ -978,7 +986,7 @@ |
979 | 987 | link.appendChild( msg ); |
980 | 988 | t.appendChild( link ); |
981 | 989 | return t; |
982 | | -} |
| 990 | +}; |
983 | 991 | |
984 | 992 | /** Call when user clicks on some of the toggle links */ |
985 | 993 | window.os_toggle = function( inputId, formName ) { |
— | — | @@ -995,6 +1003,6 @@ |
996 | 1004 | // change message |
997 | 1005 | var link = document.getElementById( r.toggle ).firstChild; |
998 | 1006 | link.replaceChild( document.createTextNode( msg ), link.firstChild ); |
999 | | -} |
| 1007 | +}; |
1000 | 1008 | |
1001 | 1009 | hookEvent( 'load', os_MWSuggestInit ); |
Index: trunk/phase3/skins/common/edit.js |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | 'tagClose': tagClose, |
14 | 14 | 'sampleText': sampleText |
15 | 15 | }); |
16 | | -} |
| 16 | +}; |
17 | 17 | |
18 | 18 | // this function adds one toolbar button from a mwEditButtons/mwCustomEditButtons item |
19 | 19 | window.mwInsertEditButton = function( parent, item ) { |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | parent.appendChild( image ); |
42 | 42 | return true; |
43 | | -} |
| 43 | +}; |
44 | 44 | |
45 | 45 | // this function generates the actual toolbar buttons with localized text |
46 | 46 | // we use it to avoid creating the toolbar where javascript is not enabled |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | mwInsertEditButton( toolbar, mwCustomEditButtons[i] ); |
75 | 75 | } |
76 | 76 | return true; |
77 | | -} |
| 77 | +}; |
78 | 78 | |
79 | 79 | // apply tagOpen/tagClose to selection in textarea, |
80 | 80 | // use sampleText instead of selection if there is none |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
164 | | -} |
| 164 | +}; |
165 | 165 | |
166 | 166 | /** |
167 | 167 | * Restore the edit box scroll state following a preview operation, |
— | — | @@ -178,7 +178,7 @@ |
179 | 179 | scrollTop.value = editBox.scrollTop; |
180 | 180 | } ); |
181 | 181 | } |
182 | | -} |
| 182 | +}; |
183 | 183 | hookEvent( 'load', scrollEditBox ); |
184 | 184 | hookEvent( 'load', mwSetupToolbar ); |
185 | 185 | hookEvent( 'load', function() { |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | e.returnValue = false; //IE |
264 | 264 | return false; |
265 | 265 | } |
266 | | - } |
| 266 | + }; |
267 | 267 | |
268 | 268 | addHandler(summary, 'keypress', checkSummary); |
269 | 269 | }); |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | } else { |
65 | 65 | hookFunct(); // bug in MSIE script loading |
66 | 66 | } |
67 | | -} |
| 67 | +}; |
68 | 68 | |
69 | 69 | window.importScript = function( page ) { |
70 | 70 | // TODO: might want to introduce a utility function to match wfUrlencode() in PHP |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') + |
73 | 73 | '&action=raw&ctype=text/javascript'; |
74 | 74 | return importScriptURI( uri ); |
75 | | -} |
| 75 | +}; |
76 | 76 | |
77 | 77 | window.loadedScripts = {}; // included-scripts tracker |
78 | 78 | window.importScriptURI = function( url ) { |
— | — | @@ -84,11 +84,11 @@ |
85 | 85 | s.setAttribute( 'type', 'text/javascript' ); |
86 | 86 | document.getElementsByTagName('head')[0].appendChild( s ); |
87 | 87 | return s; |
88 | | -} |
| 88 | +}; |
89 | 89 | |
90 | 90 | window.importStylesheet = function( page ) { |
91 | 91 | return importStylesheetURI( wgScript + '?action=raw&ctype=text/css&title=' + encodeURIComponent( page.replace(/ /g,'_') ) ); |
92 | | -} |
| 92 | +}; |
93 | 93 | |
94 | 94 | window.importStylesheetURI = function( url, media ) { |
95 | 95 | var l = document.createElement( 'link' ); |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | } |
102 | 102 | document.getElementsByTagName('head')[0].appendChild( l ); |
103 | 103 | return l; |
104 | | -} |
| 104 | +}; |
105 | 105 | |
106 | 106 | window.appendCSS = function( text ) { |
107 | 107 | var s = document.createElement( 'style' ); |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | } |
115 | 115 | document.getElementsByTagName('head')[0].appendChild( s ); |
116 | 116 | return s; |
117 | | -} |
| 117 | +}; |
118 | 118 | |
119 | 119 | // Special stylesheet links for Monobook only (see bug 14717) |
120 | 120 | if ( typeof stylepath != 'undefined' && skin == 'monobook' ) { |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | toggleToc(); |
172 | 172 | } |
173 | 173 | } |
174 | | -} |
| 174 | +}; |
175 | 175 | |
176 | 176 | window.changeText = function( el, newText ) { |
177 | 177 | // Safari work around |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | } else if ( el.firstChild && el.firstChild.nodeValue ) { |
181 | 181 | el.firstChild.nodeValue = newText; |
182 | 182 | } |
183 | | -} |
| 183 | +}; |
184 | 184 | |
185 | 185 | window.killEvt = function( evt ) { |
186 | 186 | evt = evt || window.event || window.Event; // W3C, IE, Netscape |
— | — | @@ -190,7 +190,7 @@ |
191 | 191 | evt.cancelBubble = true; // IE |
192 | 192 | } |
193 | 193 | return false; // Don't follow the link (IE) |
194 | | -} |
| 194 | +}; |
195 | 195 | |
196 | 196 | window.toggleToc = function() { |
197 | 197 | var tocmain = document.getElementById( 'toc' ); |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | tocmain.className = 'toc tochidden'; |
211 | 211 | } |
212 | 212 | return false; |
213 | | -} |
| 213 | +}; |
214 | 214 | |
215 | 215 | window.mwEditButtons = []; |
216 | 216 | window.mwCustomEditButtons = []; // eg to add in MediaWiki:Common.js |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | re = new RegExp( "\\n", "g" ); |
222 | 222 | text = text.replace( re, "\\n" ); |
223 | 223 | return escapeQuotesHTML( text ); |
224 | | -} |
| 224 | +}; |
225 | 225 | |
226 | 226 | window.escapeQuotesHTML = function( text ) { |
227 | 227 | var re = new RegExp( '&', "g" ); |
— | — | @@ -232,7 +232,7 @@ |
233 | 233 | re = new RegExp( '>', "g" ); |
234 | 234 | text = text.replace( re, ">" ); |
235 | 235 | return text; |
236 | | -} |
| 236 | +}; |
237 | 237 | |
238 | 238 | /** |
239 | 239 | * Set the accesskey prefix based on browser detection. |
— | — | @@ -291,7 +291,7 @@ |
292 | 292 | element.setAttribute( 'title', tip ); |
293 | 293 | } |
294 | 294 | } |
295 | | -} |
| 295 | +}; |
296 | 296 | |
297 | 297 | /** |
298 | 298 | * Add a link to one of the portlet menus on the page, including: |
— | — | @@ -384,7 +384,7 @@ |
385 | 385 | } |
386 | 386 | |
387 | 387 | return item; |
388 | | -} |
| 388 | +}; |
389 | 389 | |
390 | 390 | window.getInnerText = function( el ) { |
391 | 391 | if ( el.getAttribute( 'data-sort-value' ) !== null ) { |
— | — | @@ -418,12 +418,12 @@ |
419 | 419 | } |
420 | 420 | } |
421 | 421 | return str; |
422 | | -} |
| 422 | +}; |
423 | 423 | |
424 | 424 | /* Dummy for deprecated function */ |
425 | 425 | window.ta = []; |
426 | 426 | window.akeytt = function( doId ) { |
427 | | -} |
| 427 | +}; |
428 | 428 | |
429 | 429 | window.checkboxes = undefined; |
430 | 430 | window.lastCheckbox = undefined; |
— | — | @@ -433,7 +433,7 @@ |
434 | 434 | lastCheckbox = null; |
435 | 435 | var inputs = document.getElementsByTagName( 'input' ); |
436 | 436 | addCheckboxClickHandlers( inputs ); |
437 | | -} |
| 437 | +}; |
438 | 438 | |
439 | 439 | window.addCheckboxClickHandlers = function( inputs, start ) { |
440 | 440 | if ( !start ) { |
— | — | @@ -461,7 +461,7 @@ |
462 | 462 | addCheckboxClickHandlers( inputs, finish ); |
463 | 463 | }, 200 ); |
464 | 464 | } |
465 | | -} |
| 465 | +}; |
466 | 466 | |
467 | 467 | window.checkboxClickHandler = function( e ) { |
468 | 468 | if ( typeof e == 'undefined' ) { |
— | — | @@ -488,7 +488,7 @@ |
489 | 489 | } |
490 | 490 | lastCheckbox = this.index; |
491 | 491 | return true; |
492 | | -} |
| 492 | +}; |
493 | 493 | |
494 | 494 | |
495 | 495 | /* |
— | — | @@ -539,7 +539,7 @@ |
540 | 540 | } |
541 | 541 | } |
542 | 542 | return ( arrReturnElements ); |
543 | | -} |
| 543 | +}; |
544 | 544 | |
545 | 545 | window.redirectToFragment = function( fragment ) { |
546 | 546 | var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); |
— | — | @@ -568,7 +568,7 @@ |
569 | 569 | }); |
570 | 570 | } |
571 | 571 | } |
572 | | -} |
| 572 | +}; |
573 | 573 | |
574 | 574 | /* |
575 | 575 | * Table sorting script based on one (c) 1997-2006 Stuart Langridge and Joost |
— | — | @@ -601,7 +601,7 @@ |
602 | 602 | } |
603 | 603 | ts_makeSortable( tables[ti] ); |
604 | 604 | } |
605 | | -} |
| 605 | +}; |
606 | 606 | |
607 | 607 | window.ts_makeSortable = function( table ) { |
608 | 608 | var firstRow; |
— | — | @@ -632,11 +632,11 @@ |
633 | 633 | if ( ts_alternate_row_colors ) { |
634 | 634 | ts_alternate( table ); |
635 | 635 | } |
636 | | -} |
| 636 | +}; |
637 | 637 | |
638 | 638 | window.ts_getInnerText = function( el ) { |
639 | 639 | return getInnerText( el ); |
640 | | -} |
| 640 | +}; |
641 | 641 | |
642 | 642 | window.ts_resortTable = function( lnk ) { |
643 | 643 | // get the span |
Index: trunk/phase3/skins/common/htmlform.js |
— | — | @@ -36,5 +36,5 @@ |
37 | 37 | textbox.disabled = true; |
38 | 38 | } |
39 | 39 | } |
40 | | -} |
| 40 | +}; |
41 | 41 | |
Index: trunk/phase3/skins/common/history.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | } |
9 | 9 | } |
10 | 10 | return radios; |
11 | | -} |
| 11 | +}; |
12 | 12 | |
13 | 13 | // check selection and tweak visibility/class onclick |
14 | 14 | window.diffcheck = function() { |
— | — | @@ -74,4 +74,4 @@ |
75 | 75 | } |
76 | 76 | } |
77 | 77 | return true; |
78 | | -} |
| 78 | +}; |