Index: trunk/phase3/skins/common/changepassword.js |
— | — | @@ -1,11 +1,11 @@ |
2 | 2 | |
3 | 3 | window.onNameChange = function() { |
4 | | - if ( wgUserName != document.getElementById('wpName').value ) { |
| 4 | + if ( wgUserName == document.getElementById('wpName').value ) { |
| 5 | + document.getElementById('wpPassword').disabled = false; |
| 6 | + document.getElementById('wpComment').disabled = true; |
| 7 | + } else { |
5 | 8 | document.getElementById('wpPassword').disabled = true; |
6 | 9 | document.getElementById('wpComment').disabled = false; |
7 | | - } else { |
8 | | - document.getElementById('wpPassword').disabled = false; |
9 | | - document.getElementById('wpComment').disabled = true; |
10 | 10 | } |
11 | 11 | }; |
12 | 12 | |
Index: trunk/phase3/skins/common/ajaxwatch.js |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | // update the link text with the new message |
114 | 114 | $link.text( mediaWiki.msg( otheraction ) ); |
115 | 115 | } |
116 | | - }; |
| 116 | + } |
117 | 117 | return false; |
118 | 118 | }); |
119 | 119 | |
Index: trunk/phase3/skins/common/ajax.js |
— | — | @@ -154,8 +154,6 @@ |
155 | 155 | } else { |
156 | 156 | alert( 'bad target for sajax_do_call: not a function or object: ' + target ); |
157 | 157 | } |
158 | | - |
159 | | - return; |
160 | 158 | }; |
161 | 159 | |
162 | 160 | sajax_debug( func_name + ' uri = ' + uri + ' / post = ' + post_data ); |
Index: trunk/phase3/skins/common/upload.js |
— | — | @@ -289,11 +289,7 @@ |
290 | 290 | if(!document.getElementById) return; |
291 | 291 | var upfield = document.getElementById('wpUploadFile'); |
292 | 292 | var destName = document.getElementById('wpDestFile').value; |
293 | | - if (destName=='' || destName==' ') { |
294 | | - wgUploadAutoFill = true; |
295 | | - } else { |
296 | | - wgUploadAutoFill = false; |
297 | | - } |
| 293 | + wgUploadAutoFill = ( destName == '' || destName == ' ' ); |
298 | 294 | }; |
299 | 295 | |
300 | 296 | window.wgUploadLicenseObj = { |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -866,7 +866,7 @@ |
867 | 867 | } |
868 | 868 | return date.substr( 7, 4 ) + month + date.substr( 0, 2 ); |
869 | 869 | } else if ( date.length == 10 ) { |
870 | | - if ( ts_europeandate == false ) { |
| 870 | + if ( !ts_europeandate ) { |
871 | 871 | return date.substr( 6, 4 ) + date.substr( 0, 2 ) + date.substr( 3, 2 ); |
872 | 872 | } else { |
873 | 873 | return date.substr( 6, 4 ) + date.substr( 3, 2 ) + date.substr( 0, 2 ); |
— | — | @@ -878,7 +878,7 @@ |
879 | 879 | } else { |
880 | 880 | yr = '19' + yr; |
881 | 881 | } |
882 | | - if ( ts_europeandate == true ) { |
| 882 | + if ( ts_europeandate ) { |
883 | 883 | return yr + date.substr( 3, 2 ) + date.substr( 0, 2 ); |
884 | 884 | } else { |
885 | 885 | return yr + date.substr( 0, 2 ) + date.substr( 3, 2 ); |
Index: trunk/phase3/skins/common/htmlform.js |
— | — | @@ -30,11 +30,7 @@ |
31 | 31 | var id = select.id; |
32 | 32 | var textbox = document.getElementById( id + '-other' ); |
33 | 33 | |
34 | | - if ( select.value == 'other' ) { |
35 | | - textbox.disabled = false; |
36 | | - } else { |
37 | | - textbox.disabled = true; |
38 | | - } |
| 34 | + textbox.disabled = ( select.value != 'other' ); |
39 | 35 | } |
40 | 36 | }; |
41 | 37 | |
Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | */ |
83 | 83 | function Map( global ) { |
84 | 84 | this.values = ( global === true ) ? window : {}; |
85 | | - }; |
| 85 | + } |
86 | 86 | |
87 | 87 | /** |
88 | 88 | * Gets the value of a key, or a list of key/value pairs for an array of keys. |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | this.map = map; |
156 | 156 | this.key = key; |
157 | 157 | this.parameters = typeof parameters === 'undefined' ? [] : $.makeArray( parameters ); |
158 | | - }; |
| 158 | + } |
159 | 159 | |
160 | 160 | /** |
161 | 161 | * Appends parameters for replacement |
— | — | @@ -396,7 +396,7 @@ |
397 | 397 | } |
398 | 398 | } |
399 | 399 | return true; |
400 | | - }; |
| 400 | + } |
401 | 401 | |
402 | 402 | /** |
403 | 403 | * Generates an ISO8601 "basic" string from a UNIX timestamp |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | return resolved; |
474 | 474 | } |
475 | 475 | throw new Error( 'Invalid module argument: ' + module ); |
476 | | - }; |
| 476 | + } |
477 | 477 | |
478 | 478 | /** |
479 | 479 | * Narrows a list of module names down to those matching a specific |