Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.textSelection.test.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | } ); |
8 | 8 | |
9 | 9 | /** |
10 | | - * Test factory for $.fn.textSelection('encapsulateText') |
| 10 | + * Test factory for $.fn.textSelection( 'encapsulateText' ) |
11 | 11 | * |
12 | 12 | * @param options {object} associative array containing: |
13 | 13 | * description {string} |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * output {string} |
16 | 16 | * start {int} starting char for selection |
17 | 17 | * end {int} ending char for selection |
18 | | - * params {object} add'l parameters for $().textSelection('encapsulateText') |
| 18 | + * params {object} add'l parameters for $().textSelection( 'encapsulateText' ) |
19 | 19 | */ |
20 | 20 | var encapsulateTest = function( options ) { |
21 | 21 | var opt = $.extend({ |
— | — | @@ -41,11 +41,11 @@ |
42 | 42 | } |
43 | 43 | expect(tests); |
44 | 44 | |
45 | | - var $fixture = $('<div id="qunit-fixture"></div>'); |
46 | | - var $textarea = $('<textarea>'); |
| 45 | + var $fixture = $( '<div id="qunit-fixture"></div>' ); |
| 46 | + var $textarea = $( '<textarea>' ); |
47 | 47 | |
48 | 48 | $fixture.append($textarea); |
49 | | - $('body').append($fixture); |
| 49 | + $( 'body' ).append($fixture); |
50 | 50 | |
51 | 51 | //$textarea.textSelection( 'setContents', opt.before.text); // this method is actually missing atm... |
52 | 52 | $textarea.val( opt.before.text ); // won't work with the WikiEditor iframe? |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.client.test.js |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | "version": "4.0.1", |
72 | 72 | "versionBase": "4", |
73 | 73 | "versionNumber": 4 |
74 | | - } |
| 74 | + } |
75 | 75 | }, |
76 | 76 | // Firefox 5 |
77 | 77 | // Safari 3 |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | "version": "4.0.5", |
88 | 88 | "versionBase": "4", |
89 | 89 | "versionNumber": 4 |
90 | | - } |
| 90 | + } |
91 | 91 | }, |
92 | 92 | 'Mozilla/5.0 (Windows; U; Windows NT 6.0; cs-CZ) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7': { |
93 | 93 | title: 'Safari 4', |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | |
6 | 6 | equal( $.trimLeft( ' foo bar ' ), 'foo bar ', 'trimLeft' ); |
7 | 7 | equal( $.trimRight( ' foo bar ' ), ' foo bar', 'trimRight' ); |
8 | | - equal( $.ucFirst( 'foo'), 'Foo', 'ucFirst' ); |
| 8 | + equal( $.ucFirst( 'foo' ), 'Foo', 'ucFirst' ); |
9 | 9 | |
10 | 10 | equal( $.escapeRE( '<!-- ([{+mW+}]) $^|?>' ), |
11 | 11 | '<!\\-\\- \\(\\[\\{\\+mW\\+\\}\\]\\) \\$\\^\\|\\?>', 'escapeRE - Escape specials' ); |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js |
— | — | @@ -82,9 +82,7 @@ |
83 | 83 | byteLimitTest({ |
84 | 84 | description: 'Plain text input', |
85 | 85 | $input: $( '<input>' ) |
86 | | - .attr( { |
87 | | - 'type': 'text' |
88 | | - }), |
| 86 | + .attr( 'type', 'text' ), |
89 | 87 | sample: simpleSample, |
90 | 88 | hasLimit: false, |
91 | 89 | expected: simpleSample |
— | — | @@ -105,9 +103,7 @@ |
106 | 104 | byteLimitTest({ |
107 | 105 | description: 'Limit using a custom value', |
108 | 106 | $input: $( '<input>' ) |
109 | | - .attr( { |
110 | | - 'type': 'text' |
111 | | - }) |
| 107 | + .attr( 'type', 'text' ) |
112 | 108 | .byteLimit( 10 ), |
113 | 109 | sample: simpleSample, |
114 | 110 | hasLimit: true, |
— | — | @@ -130,9 +126,7 @@ |
131 | 127 | byteLimitTest({ |
132 | 128 | description: 'Limit using a custom value (multibyte)', |
133 | 129 | $input: $( '<input>' ) |
134 | | - .attr( { |
135 | | - 'type': 'text' |
136 | | - }) |
| 130 | + .attr( 'type', 'text' ) |
137 | 131 | .byteLimit( 14 ), |
138 | 132 | sample: mbSample, |
139 | 133 | hasLimit: true, |
— | — | @@ -143,9 +137,7 @@ |
144 | 138 | byteLimitTest({ |
145 | 139 | description: 'Limit using a custom value (multibyte) overlapping a byte', |
146 | 140 | $input: $( '<input>' ) |
147 | | - .attr( { |
148 | | - 'type': 'text' |
149 | | - }) |
| 141 | + .attr( 'type', 'text' ) |
150 | 142 | .byteLimit( 12 ), |
151 | 143 | sample: mbSample, |
152 | 144 | hasLimit: true, |
— | — | @@ -156,9 +148,7 @@ |
157 | 149 | byteLimitTest({ |
158 | 150 | description: 'Pass the limit and a callback as input filter', |
159 | 151 | $input: $( '<input>' ) |
160 | | - .attr( { |
161 | | - 'type': 'text' |
162 | | - }) |
| 152 | + .attr( 'type', 'text' ) |
163 | 153 | .byteLimit( 6, function( val ) { |
164 | 154 | _titleConfig(); |
165 | 155 | |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.byteLength.test.js |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | test( 'Special text', window.foo = function() { |
27 | 27 | expect(5); |
28 | 28 | |
29 | | - // http://en.wikipedia.org/wiki/UTF-8 |
| 29 | + // http://en.wikipedia.org/wiki/UTF-8 |
30 | 30 | var U_0024 = '\u0024', |
31 | 31 | U_00A2 = '\u00A2', |
32 | 32 | U_20AC = '\u20AC', |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js |
— | — | @@ -3,9 +3,9 @@ |
4 | 4 | module( 'jquery.tablesorter' ); |
5 | 5 | |
6 | 6 | // setup hack |
7 | | -mw.config.set('wgMonthNames', window.wgMonthNames = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']); |
8 | | -mw.config.set('wgMonthNamesShort', window.wgMonthNamesShort = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']); |
9 | | -mw.config.set('wgDefaultDateFormat', window.wgDefaultDateFormat = 'dmy'); |
| 7 | +mw.config.set( 'wgMonthNames', window.wgMonthNames = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']); |
| 8 | +mw.config.set( 'wgMonthNamesShort', window.wgMonthNamesShort = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']); |
| 9 | +mw.config.set( 'wgDefaultDateFormat', window.wgDefaultDateFormat = 'dmy' ); |
10 | 10 | |
11 | 11 | test( '-- Initial check', function() { |
12 | 12 | expect(1); |
— | — | @@ -21,23 +21,23 @@ |
22 | 22 | * @return jQuery |
23 | 23 | */ |
24 | 24 | var tableCreate = function( header, data ) { |
25 | | - var $table = $('<table class="sortable"><thead></thead><tbody></tbody></table>'), |
26 | | - $thead = $table.find('thead'), |
27 | | - $tbody = $table.find('tbody'); |
28 | | - var $tr = $('<tr>'); |
29 | | - $.each(header, function(i, str) { |
30 | | - var $th = $('<th>'); |
31 | | - $th.text(str).appendTo($tr); |
| 25 | + var $table = $( '<table class="sortable"><thead></thead><tbody></tbody></table>' ), |
| 26 | + $thead = $table.find( 'thead' ), |
| 27 | + $tbody = $table.find( 'tbody' ); |
| 28 | + var $tr = $( '<tr>' ); |
| 29 | + $.each( header, function( i, str ) { |
| 30 | + var $th = $( '<th>' ); |
| 31 | + $th.text( str ).appendTo( $tr ); |
32 | 32 | }); |
33 | | - $tr.appendTo($thead); |
| 33 | + $tr.appendTo( $thead ); |
34 | 34 | |
35 | 35 | for (var i = 0; i < data.length; i++) { |
36 | | - $tr = $('<tr>'); |
37 | | - $.each(data[i], function(j, str) { |
38 | | - var $td = $('<td>'); |
39 | | - $td.text(str).appendTo($tr); |
| 36 | + $tr = $( '<tr>' ); |
| 37 | + $.each( data[i], function( j, str ) { |
| 38 | + var $td = $( '<td>' ); |
| 39 | + $td.text( str ).appendTo( $tr ); |
40 | 40 | }); |
41 | | - $tr.appendTo($tbody); |
| 41 | + $tr.appendTo( $tbody ); |
42 | 42 | } |
43 | 43 | return $table; |
44 | 44 | }; |
— | — | @@ -50,12 +50,12 @@ |
51 | 51 | */ |
52 | 52 | var tableExtract = function( $table ) { |
53 | 53 | var data = []; |
54 | | - $table.find('tbody').find('tr').each(function(i, tr) { |
| 54 | + $table.find( 'tbody' ).find( 'tr' ).each( function( i, tr ) { |
55 | 55 | var row = []; |
56 | | - $(tr).find('td,th').each(function(i, td) { |
57 | | - row.push($(td).text()); |
| 56 | + $( tr ).find( 'td,th' ).each( function( i, td ) { |
| 57 | + row.push( $( td ).text() ); |
58 | 58 | }); |
59 | | - data.push(row); |
| 59 | + data.push( row ); |
60 | 60 | }); |
61 | 61 | return data; |
62 | 62 | }; |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | expect(1); |
77 | 77 | |
78 | 78 | var $table = tableCreate( header, data ); |
79 | | - //$('body').append($table); |
| 79 | + //$( 'body' ).append($table); |
80 | 80 | |
81 | 81 | // Give caller a chance to set up sorting and manipulate the table. |
82 | 82 | callback( $table ); |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | ascendingName, |
116 | 116 | function( $table ) { |
117 | 117 | $table.tablesorter(); |
118 | | - $table.find('.headerSort:eq(0)').click(); |
| 118 | + $table.find( '.headerSort:eq(0)' ).click(); |
119 | 119 | } |
120 | 120 | ); |
121 | 121 | tableTest( |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | ascendingName, |
126 | 126 | function( $table ) { |
127 | 127 | $table.tablesorter(); |
128 | | - $table.find('.headerSort:eq(0)').click(); |
| 128 | + $table.find( '.headerSort:eq(0)' ).click(); |
129 | 129 | } |
130 | 130 | ); |
131 | 131 | tableTest( |
— | — | @@ -134,7 +134,7 @@ |
135 | 135 | reversed(ascendingName), |
136 | 136 | function( $table ) { |
137 | 137 | $table.tablesorter(); |
138 | | - $table.find('.headerSort:eq(0)').click().click(); |
| 138 | + $table.find( '.headerSort:eq(0)' ).click().click(); |
139 | 139 | } |
140 | 140 | ); |
141 | 141 | tableTest( |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | ascendingRadius, |
146 | 146 | function( $table ) { |
147 | 147 | $table.tablesorter(); |
148 | | - $table.find('.headerSort:eq(1)').click(); |
| 148 | + $table.find( '.headerSort:eq(1)' ).click(); |
149 | 149 | } |
150 | 150 | ); |
151 | 151 | tableTest( |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | reversed(ascendingRadius), |
156 | 156 | function( $table ) { |
157 | 157 | $table.tablesorter(); |
158 | | - $table.find('.headerSort:eq(1)').click().click(); |
| 158 | + $table.find( '.headerSort:eq(1)' ).click().click(); |
159 | 159 | } |
160 | 160 | ); |
161 | 161 | |
— | — | @@ -181,9 +181,9 @@ |
182 | 182 | ], |
183 | 183 | function( $table ) { |
184 | 184 | // @fixme reset it at end or change module to allow us to override it |
185 | | - mw.config.set('wgDefaultDateFormat', window.wgDefaultDateFormat = 'dmy'); |
| 185 | + mw.config.set( 'wgDefaultDateFormat', window.wgDefaultDateFormat = 'dmy' ); |
186 | 186 | $table.tablesorter(); |
187 | | - $table.find('.headerSort:eq(0)').click(); |
| 187 | + $table.find( '.headerSort:eq(0)' ).click(); |
188 | 188 | } |
189 | 189 | ); |
190 | 190 | tableTest( |
— | — | @@ -207,9 +207,9 @@ |
208 | 208 | ], |
209 | 209 | function( $table ) { |
210 | 210 | // @fixme reset it at end or change module to allow us to override it |
211 | | - mw.config.set('wgDefaultDateFormat', window.wgDefaultDateFormat = 'mdy'); |
| 211 | + mw.config.set( 'wgDefaultDateFormat', window.wgDefaultDateFormat = 'mdy' ); |
212 | 212 | $table.tablesorter(); |
213 | | - $table.find('.headerSort:eq(0)').click(); |
| 213 | + $table.find( '.headerSort:eq(0)' ).click(); |
214 | 214 | } |
215 | 215 | ); |
216 | 216 | |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | ipv4Sorted, |
244 | 244 | function( $table ) { |
245 | 245 | $table.tablesorter(); |
246 | | - $table.find('.headerSort:eq(0)').click(); |
| 246 | + $table.find( '.headerSort:eq(0)' ).click(); |
247 | 247 | } |
248 | 248 | ); |
249 | 249 | tableTest( |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | reversed(ipv4Sorted), |
254 | 254 | function( $table ) { |
255 | 255 | $table.tablesorter(); |
256 | | - $table.find('.headerSort:eq(0)').click().click(); |
| 256 | + $table.find( '.headerSort:eq(0)' ).click().click(); |
257 | 257 | } |
258 | 258 | ); |
259 | 259 | |
— | — | @@ -286,10 +286,10 @@ |
287 | 287 | umlautWords, |
288 | 288 | umlautWordsSorted, |
289 | 289 | function( $table ) { |
290 | | - mw.config.set('tableSorterCollation', {'ä':'ae', 'ö' : 'oe', 'ß': 'ss', 'ü':'ue'}); |
| 290 | + mw.config.set( 'tableSorterCollation', {'ä':'ae', 'ö' : 'oe', 'ß': 'ss', 'ü':'ue'}); |
291 | 291 | $table.tablesorter(); |
292 | | - $table.find('.headerSort:eq(0)').click(); |
293 | | - mw.config.set('tableSorterCollation', {}); |
| 292 | + $table.find( '.headerSort:eq(0)' ).click(); |
| 293 | + mw.config.set( 'tableSorterCollation', {} ); |
294 | 294 | } |
295 | 295 | ); |
296 | 296 | |
— | — | @@ -303,10 +303,10 @@ |
304 | 304 | planetsRowspan, |
305 | 305 | function( $table ) { |
306 | 306 | //Quick&Dirty mod |
307 | | - $table.find('tr:eq(3) td:eq(1), tr:eq(4) td:eq(1)').remove(); |
308 | | - $table.find('tr:eq(2) td:eq(1)').prop('rowspan', '3'); |
| 307 | + $table.find( 'tr:eq(3) td:eq(1), tr:eq(4) td:eq(1)' ).remove(); |
| 308 | + $table.find( 'tr:eq(2) td:eq(1)' ).prop( 'rowspan', '3' ); |
309 | 309 | $table.tablesorter(); |
310 | | - $table.find('.headerSort:eq(0)').click(); |
| 310 | + $table.find( '.headerSort:eq(0)' ).click(); |
311 | 311 | } |
312 | 312 | ); |
313 | 313 | tableTest( |
— | — | @@ -316,10 +316,10 @@ |
317 | 317 | planetsRowspanII, |
318 | 318 | function( $table ) { |
319 | 319 | //Quick&Dirty mod |
320 | | - $table.find('tr:eq(3) td:eq(0), tr:eq(4) td:eq(0)').remove(); |
321 | | - $table.find('tr:eq(2) td:eq(0)').prop('rowspan', '3'); |
| 320 | + $table.find( 'tr:eq(3) td:eq(0), tr:eq(4) td:eq(0)' ).remove(); |
| 321 | + $table.find( 'tr:eq(2) td:eq(0)' ).prop( 'rowspan', '3' ); |
322 | 322 | $table.tablesorter(); |
323 | | - $table.find('.headerSort:eq(0)').click(); |
| 323 | + $table.find( '.headerSort:eq(0)' ).click(); |
324 | 324 | } |
325 | 325 | ); |
326 | 326 | |
— | — | @@ -346,9 +346,9 @@ |
347 | 347 | complexMDYDates, |
348 | 348 | complexMDYSorted, |
349 | 349 | function( $table ) { |
350 | | - mw.config.set('wgDefaultDateFormat', window.wgDefaultDateFormat = 'mdy'); |
| 350 | + mw.config.set( 'wgDefaultDateFormat', window.wgDefaultDateFormat = 'mdy' ); |
351 | 351 | $table.tablesorter(); |
352 | | - $table.find('.headerSort:eq(0)').click(); |
| 352 | + $table.find( '.headerSort:eq(0)' ).click(); |
353 | 353 | } |
354 | 354 | ); |
355 | 355 | |
— | — | @@ -362,9 +362,9 @@ |
363 | 363 | planets, |
364 | 364 | ascendingNameLegacy, |
365 | 365 | function( $table ) { |
366 | | - $table.find('tr:last').addClass('sortbottom'); |
| 366 | + $table.find( 'tr:last' ).addClass( 'sortbottom' ); |
367 | 367 | $table.tablesorter(); |
368 | | - $table.find('.headerSort:eq(0)').click(); |
| 368 | + $table.find( '.headerSort:eq(0)' ).click(); |
369 | 369 | } |
370 | 370 | ); |
371 | 371 | |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js |
— | — | @@ -2,12 +2,8 @@ |
3 | 3 | |
4 | 4 | test( '-- Initial check', function() { |
5 | 5 | expect( 2 ); |
6 | | - ok( mw.special.recentchanges.init, |
7 | | - 'mw.special.recentchanges.init defined' |
8 | | - ); |
9 | | - ok( mw.special.recentchanges.updateCheckboxes, |
10 | | - 'mw.special.recentchanges.updateCheckboxes defined' |
11 | | - ); |
| 6 | + ok( mw.special.recentchanges.init, 'mw.special.recentchanges.init defined' ); |
| 7 | + ok( mw.special.recentchanges.updateCheckboxes, 'mw.special.recentchanges.updateCheckboxes defined' ); |
12 | 8 | // TODO: verify checkboxes == [ 'nsassociated', 'nsinvert' ] |
13 | 9 | }); |
14 | 10 | |
— | — | @@ -61,7 +57,7 @@ |
62 | 58 | $options.eq(1).removeProp( 'selected' ); |
63 | 59 | $options.eq(0).prop( 'selected', true ); |
64 | 60 | $( '#namespace' ).change(); |
65 | | - |
| 61 | + |
66 | 62 | // ... and checkboxes should now be disabled |
67 | 63 | strictEqual( $( '#nsinvert' ).prop( 'disabled' ), true ); |
68 | 64 | strictEqual( $( '#nsassociated' ).prop( 'disabled' ), true ); |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js |
— | — | @@ -157,8 +157,8 @@ |
158 | 158 | var tbMW = mw.util.addPortletLink( 'p-tb', 'http://mediawiki.org/', |
159 | 159 | 'MediaWiki.org', 't-mworg', 'Go to MediaWiki.org ', 'm', tbRL ), |
160 | 160 | $tbMW = $( tbMW ); |
161 | | - |
162 | 161 | |
| 162 | + |
163 | 163 | equal( $tbMW.attr( 'id' ), 't-mworg', 'Link has correct ID set' ); |
164 | 164 | equal( $tbMW.closest( '.portlet' ).attr( 'id' ), 'p-tb', 'Link was inserted within correct portlet' ); |
165 | 165 | equal( $tbMW.next().attr( 'id' ), 't-rl', 'Link is in the correct position (by passing nextnode)' ); |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | |
174 | 174 | strictEqual( $tbMW.find( 'span').length, 0, 'No <span> element should be added for porlets without vectorTabs class.' ); |
175 | 175 | strictEqual( $( caFoo ).find( 'span').length, 1, 'A <span> element should be added for porlets with vectorTabs class.' ); |
176 | | - |
| 176 | + |
177 | 177 | // Clean up |
178 | 178 | $( [tbRL, tbMW, tbRLDM, caFoo] ) |
179 | 179 | .add( $mwPanel ) |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.test.js |
— | — | @@ -159,7 +159,7 @@ |
160 | 160 | // Extract path |
161 | 161 | var tests_path = rePath.exec( location.href ); |
162 | 162 | |
163 | | - mw.loader.implement( 'is.awesome', [QUnit.fixurl( tests_path + 'data/defineTestCallback.js')], {}, {} ); |
| 163 | + mw.loader.implement( 'is.awesome', [QUnit.fixurl( tests_path + 'data/defineTestCallback.js' )], {}, {} ); |
164 | 164 | |
165 | 165 | mw.loader.using( 'is.awesome', function() { |
166 | 166 | |
Index: trunk/phase3/resources/jquery/jquery.makeCollapsible.js |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | // After this $defaultToggle is either null or a valid jQuery instance. |
46 | 46 | return; |
47 | 47 | } |
48 | | - |
| 48 | + |
49 | 49 | var $containers = null; |
50 | 50 | |
51 | 51 | if ( action == 'collapse' ) { |
— | — | @@ -55,17 +55,17 @@ |
56 | 56 | // Slide doens't work with tables, but fade does as of jQuery 1.1.3 |
57 | 57 | // http://stackoverflow.com/questions/467336#920480 |
58 | 58 | $containers = $collapsible.find( '>tbody>tr' ); |
59 | | - if ( $defaultToggle ) { |
| 59 | + if ( $defaultToggle ) { |
60 | 60 | // Exclude tablerow containing togglelink |
61 | 61 | $containers.not( $defaultToggle.closest( 'tr' ) ).stop(true, true).fadeOut(); |
62 | 62 | } else { |
63 | | - if ( instantHide ) { |
| 63 | + if ( instantHide ) { |
64 | 64 | $containers.hide(); |
65 | 65 | } else { |
66 | 66 | $containers.stop( true, true ).fadeOut(); |
67 | 67 | } |
68 | 68 | } |
69 | | - |
| 69 | + |
70 | 70 | } else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) { |
71 | 71 | $containers = $collapsible.find( '> li' ); |
72 | 72 | if ( $defaultToggle ) { |
— | — | @@ -78,10 +78,10 @@ |
79 | 79 | $containers.stop( true, true ).slideUp(); |
80 | 80 | } |
81 | 81 | } |
82 | | - |
| 82 | + |
83 | 83 | } else { // <div>, <p> etc. |
84 | 84 | var $collapsibleContent = $collapsible.find( '> .mw-collapsible-content' ); |
85 | | - |
| 85 | + |
86 | 86 | // If a collapsible-content is defined, collapse it |
87 | 87 | if ( $collapsibleContent.length ) { |
88 | 88 | if ( instantHide ) { |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | } |
104 | 104 | |
105 | 105 | } else { |
106 | | - |
| 106 | + |
107 | 107 | // Expand the element |
108 | 108 | if ( $collapsible.is( 'table' ) ) { |
109 | 109 | $containers = $collapsible.find( '>tbody>tr' ); |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | } else { |
114 | 114 | $containers.stop(true, true).fadeIn(); |
115 | 115 | } |
116 | | - |
| 116 | + |
117 | 117 | } else if ( $collapsible.is( 'ul' ) || $collapsible.is( 'ol' ) ) { |
118 | 118 | $containers = $collapsible.find( '> li' ); |
119 | 119 | if ( $defaultToggle ) { |
— | — | @@ -121,10 +121,10 @@ |
122 | 122 | } else { |
123 | 123 | $containers.stop( true, true ).slideDown(); |
124 | 124 | } |
125 | | - |
| 125 | + |
126 | 126 | } else { // <div>, <p> etc. |
127 | 127 | var $collapsibleContent = $collapsible.find( '> .mw-collapsible-content' ); |
128 | | - |
| 128 | + |
129 | 129 | // If a collapsible-content is defined, collapse it |
130 | 130 | if ( $collapsibleContent.length ) { |
131 | 131 | $collapsibleContent.slideDown(); |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | $collapsible = $that.closest( '.mw-collapsible.mw-made-collapsible' ).toggleClass( 'mw-collapsed' ); |
149 | 149 | e.preventDefault(); |
150 | 150 | e.stopPropagation(); |
151 | | - |
| 151 | + |
152 | 152 | // It's expanded right now |
153 | 153 | if ( !$that.hasClass( 'mw-collapsible-toggle-collapsed' ) ) { |
154 | 154 | // Change link to "Show" |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | } |
184 | 184 | e.preventDefault(); |
185 | 185 | e.stopPropagation(); |
186 | | - |
| 186 | + |
187 | 187 | // It's expanded right now |
188 | 188 | if ( !$that.hasClass( 'mw-collapsible-toggle-collapsed' ) ) { |
189 | 189 | // Change toggle to collapsed |
— | — | @@ -210,7 +210,7 @@ |
211 | 211 | var action = $collapsible.hasClass( 'mw-collapsed' ) ? 'expand' : 'collapse'; |
212 | 212 | $collapsible.toggleClass( 'mw-collapsed' ); |
213 | 213 | toggleElement( $collapsible, action, $that ); |
214 | | - |
| 214 | + |
215 | 215 | }; |
216 | 216 | |
217 | 217 | // Use custom text or default ? |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | } else { |
241 | 241 | $that.addClass( 'mw-made-collapsible' ); |
242 | 242 | } |
243 | | - |
| 243 | + |
244 | 244 | // Check if this element has a custom position for the toggle link |
245 | 245 | // (ie. outside the container or deeper inside the tree) |
246 | 246 | // Then: Locate the custom toggle link(s) and bind them |
— | — | @@ -248,7 +248,7 @@ |
249 | 249 | var thatId = $that.attr( 'id' ), |
250 | 250 | $customTogglers = $( '.' + thatId.replace( 'mw-customcollapsible', 'mw-customtoggle' ) ); |
251 | 251 | mw.log( _fn + 'Found custom collapsible: #' + thatId ); |
252 | | - |
| 252 | + |
253 | 253 | // Double check that there is actually a customtoggle link |
254 | 254 | if ( $customTogglers.length ) { |
255 | 255 | $customTogglers.bind( 'click.mw-collapse', function( e ) { |
— | — | @@ -257,7 +257,7 @@ |
258 | 258 | } else { |
259 | 259 | mw.log( _fn + '#' + thatId + ': Missing toggler!' ); |
260 | 260 | } |
261 | | - |
| 261 | + |
262 | 262 | // Initial state |
263 | 263 | if ( $that.hasClass( 'mw-collapsed' ) ) { |
264 | 264 | $that.removeClass( 'mw-collapsed' ); |
— | — | @@ -265,7 +265,7 @@ |
266 | 266 | } |
267 | 267 | |
268 | 268 | // If this is not a custom case, do the default: |
269 | | - // Wrap the contents add the toggle link |
| 269 | + // Wrap the contents add the toggle link |
270 | 270 | } else { |
271 | 271 | |
272 | 272 | // Elements are treated differently |
— | — | @@ -273,7 +273,7 @@ |
274 | 274 | // The toggle-link will be in one the the cells (td or th) of the first row |
275 | 275 | var $firstRowCells = $( 'tr:first th, tr:first td', that ), |
276 | 276 | $toggle = $firstRowCells.find( '> .mw-collapsible-toggle' ); |
277 | | - |
| 277 | + |
278 | 278 | // If theres no toggle link, add it to the last cell |
279 | 279 | if ( !$toggle.length ) { |
280 | 280 | $firstRowCells.eq(-1).prepend( $toggleLink ); |
— | — | @@ -282,19 +282,19 @@ |
283 | 283 | toggleLinkPremade( $toggle, e ); |
284 | 284 | } ); |
285 | 285 | } |
286 | | - |
| 286 | + |
287 | 287 | } else if ( $that.is( 'ul' ) || $that.is( 'ol' ) ) { |
288 | 288 | // The toggle-link will be in the first list-item |
289 | 289 | var $firstItem = $( 'li:first', $that), |
290 | 290 | $toggle = $firstItem.find( '> .mw-collapsible-toggle' ); |
291 | | - |
| 291 | + |
292 | 292 | // If theres no toggle link, add it |
293 | 293 | if ( !$toggle.length ) { |
294 | 294 | // Make sure the numeral order doesn't get messed up, force the first (soon to be second) item |
295 | 295 | // to be "1". Except if the value-attribute is already used. |
296 | 296 | // If no value was set WebKit returns "", Mozilla returns '-1', others return null or undefined. |
297 | 297 | var firstval = $firstItem.attr( 'value' ); |
298 | | - if ( firstval === undefined || !firstval || firstval == '-1' ) { |
| 298 | + if ( firstval === undefined || !firstval || firstval == '-1' ) { |
299 | 299 | $firstItem.attr( 'value', '1' ); |
300 | 300 | } |
301 | 301 | $that.prepend( $toggleLink.wrap( '<li class="mw-collapsible-toggle-li"></li>' ).parent() ); |
— | — | @@ -303,9 +303,9 @@ |
304 | 304 | toggleLinkPremade( $toggle, e ); |
305 | 305 | } ); |
306 | 306 | } |
307 | | - |
| 307 | + |
308 | 308 | } else { // <div>, <p> etc. |
309 | | - |
| 309 | + |
310 | 310 | // The toggle-link will be the first child of the element |
311 | 311 | var $toggle = $that.find( '> .mw-collapsible-toggle' ); |
312 | 312 | |
— | — | @@ -313,7 +313,7 @@ |
314 | 314 | if ( !$that.find( '> .mw-collapsible-content' ).length ) { |
315 | 315 | $that.wrapInner( '<div class="mw-collapsible-content"></div>' ); |
316 | 316 | } |
317 | | - |
| 317 | + |
318 | 318 | // If theres no toggle link, add it |
319 | 319 | if ( !$toggle.length ) { |
320 | 320 | $that.prepend( $toggleLink ); |
Index: trunk/phase3/resources/jquery/jquery.textSelection.js |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | encapsulateSelection: function( options ) { |
56 | 56 | return this.each( function() { |
57 | 57 | var pre = options.pre, post = options.post; |
58 | | - |
| 58 | + |
59 | 59 | /** |
60 | 60 | * Check if the selected text is the same as the insert text |
61 | 61 | */ |
— | — | @@ -77,10 +77,10 @@ |
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
81 | | - |
| 81 | + |
82 | 82 | /** |
83 | 83 | * Do the splitlines stuff. |
84 | | - * |
| 84 | + * |
85 | 85 | * Wrap each line of the selected text with pre and post |
86 | 86 | */ |
87 | 87 | function doSplitLines( selText, pre, post ) { |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | } |
96 | 96 | return insertText; |
97 | 97 | } |
98 | | - |
| 98 | + |
99 | 99 | var isSample = false; |
100 | 100 | if ( this.style.display == 'none' ) { |
101 | 101 | // Do nothing |
— | — | @@ -106,8 +106,8 @@ |
107 | 107 | var endPos = this.selectionEnd; |
108 | 108 | var scrollTop = this.scrollTop; |
109 | 109 | checkSelectedText(); |
110 | | - |
111 | | - var insertText = pre + selText + post; |
| 110 | + |
| 111 | + var insertText = pre + selText + post; |
112 | 112 | if ( options.splitlines ) { |
113 | 113 | insertText = doSplitLines( selText, pre, post ); |
114 | 114 | } |
— | — | @@ -146,9 +146,9 @@ |
147 | 147 | var selText = $(this).textSelection( 'getSelection' ); |
148 | 148 | var scrollTop = this.scrollTop; |
149 | 149 | var range = document.selection.createRange(); |
150 | | - |
| 150 | + |
151 | 151 | checkSelectedText(); |
152 | | - var insertText = pre + selText + post; |
| 152 | + var insertText = pre + selText + post; |
153 | 153 | if ( options.splitlines ) { |
154 | 154 | insertText = doSplitLines( selText, pre, post ); |
155 | 155 | } |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | post += "\n"; |
171 | 171 | } |
172 | 172 | } |
173 | | - |
| 173 | + |
174 | 174 | range.text = insertText; |
175 | 175 | if ( isSample && options.selectPeri && range.moveStart ) { |
176 | 176 | range.moveStart( 'character', - post.length - selText.length ); |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | if ( newLines ) length = length - newLines.length; |
300 | 300 | selection.moveStart( 'character', options.start ); |
301 | 301 | selection.moveEnd( 'character', -length + options.end ); |
302 | | - |
| 302 | + |
303 | 303 | // This line can cause an error under certain circumstances (textarea empty, no selection) |
304 | 304 | // Silence that error |
305 | 305 | try { |
— | — | @@ -447,7 +447,7 @@ |
448 | 448 | } |
449 | 449 | var context = $(this).data( 'wikiEditor-context' ); |
450 | 450 | var hasIframe = typeof context !== 'undefined' && context && typeof context.$iframe !== 'undefined'; |
451 | | - |
| 451 | + |
452 | 452 | // IE selection restore voodoo |
453 | 453 | var needSave = false; |
454 | 454 | if ( hasIframe && context.savedSelection !== null ) { |
Index: trunk/phase3/resources/jquery/jquery.byteLimit.js |
— | — | @@ -61,11 +61,11 @@ |
62 | 62 | // Based on key-event info from http://unixpapa.com/js/key.html |
63 | 63 | // jQuery should also normalize e.which to be consistent cross-browser, |
64 | 64 | // however the same check is still needed regardless of jQuery. |
65 | | - |
| 65 | + |
66 | 66 | // Note: At the moment, for some older opera versions (~< 10.5) |
67 | 67 | // some special keys won't be recognized (aka left arrow key). |
68 | 68 | // Backspace will be, so not big issue. |
69 | | - |
| 69 | + |
70 | 70 | if ( e.which === 0 || e.charCode === 0 || e.which === 8 || |
71 | 71 | e.ctrlKey || e.altKey || e.metaKey ) |
72 | 72 | { |
Index: trunk/phase3/resources/jquery/jquery.collapsibleTabs.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | if( !this.length ) return this; |
9 | 9 | //merge options into the defaults |
10 | 10 | var $settings = $.extend( {}, $.collapsibleTabs.defaults, options ); |
11 | | - |
| 11 | + |
12 | 12 | this.each( function() { |
13 | 13 | var $this = $( this ); |
14 | 14 | // add the element to our array of collapsible managers |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | $.collapsibleTabs.addData( $( this ) ); |
22 | 22 | } ); |
23 | 23 | } ); |
24 | | - |
| 24 | + |
25 | 25 | // if we haven't already bound our resize hanlder, bind it now |
26 | 26 | if( !$.collapsibleTabs.boundEvent ) { |
27 | 27 | $( window ) |
— | — | @@ -70,15 +70,15 @@ |
71 | 71 | $.collapsibleTabs.instances.each( function() { |
72 | 72 | var $this = $( this ), data = $.collapsibleTabs.getSettings( $this ); |
73 | 73 | if( data.shifting ) return; |
74 | | - |
| 74 | + |
75 | 75 | // if the two navigations are colliding |
76 | 76 | if( $this.children( data.collapsible ).length > 0 && data.collapseCondition() ) { |
77 | | - |
| 77 | + |
78 | 78 | $this.trigger( "beforeTabCollapse" ); |
79 | 79 | // move the element to the dropdown menu |
80 | 80 | $.collapsibleTabs.moveToCollapsed( $this.children( data.collapsible + ':last' ) ); |
81 | 81 | } |
82 | | - |
| 82 | + |
83 | 83 | // if there are still moveable items in the dropdown menu, |
84 | 84 | // and there is sufficient space to place them in the tab container |
85 | 85 | if( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0 |
Index: trunk/phase3/resources/jquery/jquery.autoEllipsis.js |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | $el.text( $el.data( 'autoEllipsis.originalText' ) ); |
27 | 27 | } |
28 | 28 | } |
29 | | - |
| 29 | + |
30 | 30 | // container element - used for measuring against |
31 | 31 | var $container = $el; |
32 | 32 | // trimmable text element - only the text within this element will be trimmed |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | .empty() |
45 | 45 | .append( $trimmableText ); |
46 | 46 | } |
47 | | - |
| 47 | + |
48 | 48 | var text = $container.text(); |
49 | 49 | var trimmableText = $trimmableText.text(); |
50 | 50 | var w = $container.width(); |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | return; |
83 | 83 | } |
84 | 84 | } |
85 | | - |
| 85 | + |
86 | 86 | if ( $trimmableText.width() + pw > w ) { |
87 | 87 | switch ( options.position ) { |
88 | 88 | case 'right': |
— | — | @@ -136,7 +136,7 @@ |
137 | 137 | } else { |
138 | 138 | cache[text][w][options.position] = $container.html(); |
139 | 139 | } |
140 | | - |
| 140 | + |
141 | 141 | } ); |
142 | 142 | }; |
143 | 143 | |
Index: trunk/phase3/resources/jquery/jquery.client.js |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | /* Public Methods */ |
16 | 16 | |
17 | 17 | $.client = { |
18 | | - |
| 18 | + |
19 | 19 | /** |
20 | 20 | * Get an object containing information about the client. |
21 | 21 | * |
— | — | @@ -37,18 +37,18 @@ |
38 | 38 | } |
39 | 39 | // Use the cached version if possible |
40 | 40 | if ( profileCache[nav.userAgent] === undefined ) { |
41 | | - |
| 41 | + |
42 | 42 | /* Configuration */ |
43 | | - |
| 43 | + |
44 | 44 | // Name of browsers or layout engines we don't recognize |
45 | 45 | var uk = 'unknown'; |
46 | 46 | // Generic version digit |
47 | 47 | var x = 'x'; |
48 | 48 | // Strings found in user agent strings that need to be conformed |
49 | | - var wildUserAgents = [ 'Opera', 'Navigator', 'Minefield', 'KHTML', 'Chrome', 'PLAYSTATION 3']; |
| 49 | + var wildUserAgents = ['Opera', 'Navigator', 'Minefield', 'KHTML', 'Chrome', 'PLAYSTATION 3']; |
50 | 50 | // Translations for conforming user agent strings |
51 | 51 | var userAgentTranslations = [ |
52 | | - // Tons of browsers lie about being something they are not |
| 52 | + // Tons of browsers lie about being something they are not |
53 | 53 | [/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ''], |
54 | 54 | // Chrome lives in the shadow of Safari still |
55 | 55 | ['Chrome Safari', 'Chrome'], |
— | — | @@ -86,9 +86,9 @@ |
87 | 87 | var platforms = ['win', 'mac', 'linux', 'sunos', 'solaris', 'iphone']; |
88 | 88 | // Translations for conforming operating system names |
89 | 89 | var platformTranslations = [['sunos', 'solaris']]; |
90 | | - |
| 90 | + |
91 | 91 | /* Methods */ |
92 | | - |
| 92 | + |
93 | 93 | // Performs multiple replacements on a string |
94 | 94 | var translate = function( source, translations ) { |
95 | 95 | for ( var i = 0; i < translations.length; i++ ) { |
— | — | @@ -96,9 +96,9 @@ |
97 | 97 | } |
98 | 98 | return source; |
99 | 99 | }; |
100 | | - |
101 | | - /* Pre-processing */ |
102 | | - |
| 100 | + |
| 101 | + /* Pre-processing */ |
| 102 | + |
103 | 103 | var ua = nav.userAgent, |
104 | 104 | match, |
105 | 105 | name = uk, |
— | — | @@ -113,9 +113,9 @@ |
114 | 114 | } |
115 | 115 | // Everything will be in lowercase from now on |
116 | 116 | ua = ua.toLowerCase(); |
117 | | - |
| 117 | + |
118 | 118 | /* Extraction */ |
119 | | - |
| 119 | + |
120 | 120 | if ( match = new RegExp( '(' + names.join( '|' ) + ')' ).exec( ua ) ) { |
121 | 121 | name = translate( match[1], nameTranslations ); |
122 | 122 | } |
— | — | @@ -131,9 +131,9 @@ |
132 | 132 | if ( match = new RegExp( '(' + versionPrefixes.join( '|' ) + ')' + versionSuffix ).exec( ua ) ) { |
133 | 133 | version = match[3]; |
134 | 134 | } |
135 | | - |
| 135 | + |
136 | 136 | /* Edge Cases -- did I mention about how user agent string lie? */ |
137 | | - |
| 137 | + |
138 | 138 | // Decode Safari's crazy 400+ version numbers |
139 | 139 | if ( name.match( /safari/ ) && version > 400 ) { |
140 | 140 | version = '2.0'; |
— | — | @@ -143,9 +143,9 @@ |
144 | 144 | version = ua.match( /version\/([0-9\.]*)/i )[1] || 10; |
145 | 145 | } |
146 | 146 | var versionNumber = parseFloat( version, 10 ) || 0.0; |
147 | | - |
| 147 | + |
148 | 148 | /* Caching */ |
149 | | - |
| 149 | + |
150 | 150 | profileCache[nav.userAgent] = { |
151 | 151 | 'name': name, |
152 | 152 | 'layout': layout, |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | } |
160 | 160 | return profileCache[nav.userAgent]; |
161 | 161 | }, |
162 | | - |
| 162 | + |
163 | 163 | /** |
164 | 164 | * Checks the current browser against a support map object to determine if the browser has been black-listed or |
165 | 165 | * not. If the browser was not configured specifically it is assumed to work. It is assumed that the body |
Index: trunk/phase3/resources/jquery/jquery.placeholder.js |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | // text somewhere in the middle of the placeholder string, |
48 | 48 | // we want to set the contents of the search box to the |
49 | 49 | // dropped text. |
50 | | - |
| 50 | + |
51 | 51 | // IE wants getData( 'text' ) but Firefox wants getData( 'text/plain' ) |
52 | 52 | // Firefox fails gracefully with an empty string, IE barfs with an error |
53 | 53 | try { |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | // Got an exception, so use the IE way |
58 | 58 | this.value = e.originalEvent.dataTransfer.getData( 'text' ); |
59 | 59 | } |
60 | | - |
| 60 | + |
61 | 61 | // On Firefox, drop fires after the dropped text has been inserted, |
62 | 62 | // but on IE it fires before. If we don't prevent the default action, |
63 | 63 | // IE will insert the dropped text twice. |
Index: trunk/phase3/resources/jquery/jquery.tablesorter.js |
— | — | @@ -539,13 +539,13 @@ |
540 | 540 | |
541 | 541 | if ( firstTime ) { |
542 | 542 | firstTime = false; |
543 | | - |
| 543 | + |
544 | 544 | // Legacy fix of .sortbottoms |
545 | 545 | // Wrap them inside inside a tfoot (because that's what they actually want to be) & |
546 | 546 | // Move them up one level in the DOM |
547 | 547 | var sortbottoms = $table.find('tr.sortbottom').wrap('<tfoot>'); |
548 | 548 | sortbottoms.parents('table').append(sortbottoms.parent()); |
549 | | - |
| 549 | + |
550 | 550 | explodeRowspans( $table ); |
551 | 551 | // try to auto detect column type, and store in tables config |
552 | 552 | table.config.parsers = buildParserCache( table, $headers ); |
Index: trunk/phase3/resources/jquery/jquery.checkboxShiftClick.js |
— | — | @@ -16,9 +16,9 @@ |
17 | 17 | if ( prevCheckbox !== null && e.shiftKey ) { |
18 | 18 | // Check or uncheck this one and all in-between checkboxes |
19 | 19 | $box.slice( |
20 | | - Math.min( $box.index( prevCheckbox ), $box.index( e.target ) ), |
21 | | - Math.max( $box.index( prevCheckbox ), $box.index( e.target ) ) + 1 |
22 | | - ).prop( {checked: e.target.checked ? true : false} ); |
| 20 | + Math.min( $box.index( prevCheckbox ), $box.index( e.target ) ), |
| 21 | + Math.max( $box.index( prevCheckbox ), $box.index( e.target ) ) + 1 |
| 22 | + ).prop( 'checked', e.target.checked ? true : false ); |
23 | 23 | } |
24 | 24 | // Either way, update the prevCheckbox variable to the one clicked now |
25 | 25 | prevCheckbox = e.target; |
Index: trunk/phase3/resources/jquery/jquery.messageBox.js |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | 'group': 'default', |
60 | 60 | 'replace': false, // if true replaces any previous message in this group |
61 | 61 | 'target': 'js-messagebox' |
62 | | - }, options ); |
| 62 | + }, options ); |
63 | 63 | var $target = $.messageBoxNew( { id: options.target } ); |
64 | 64 | var groupID = options.target + '-' + options.group; |
65 | 65 | var $group = $( '#' + groupID ); |
Index: trunk/phase3/resources/jquery/jquery.tabIndex.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | ( function( $ ) { |
6 | 6 | /** |
7 | 7 | * Finds the lowerst tabindex in use within a selection |
8 | | - * |
| 8 | + * |
9 | 9 | * @return number Lowest tabindex on the page |
10 | 10 | */ |
11 | 11 | $.fn.firstTabIndex = function() { |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Finds the highest tabindex in use within a selection |
33 | | - * |
| 33 | + * |
34 | 34 | * @return number Highest tabindex on the page |
35 | 35 | */ |
36 | 36 | $.fn.lastTabIndex = function() { |
Index: trunk/phase3/resources/jquery/jquery.color.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | fx.start = getColor( fx.elem, attr ); |
17 | 17 | fx.end = $.colorUtil.getRGB( fx.end ); |
18 | 18 | } |
19 | | - |
| 19 | + |
20 | 20 | fx.elem.style[attr] = 'rgb(' + [ |
21 | 21 | Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0), |
22 | 22 | Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0), |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | } |
26 | 26 | } |
27 | 27 | ); |
28 | | - |
| 28 | + |
29 | 29 | function getColor(elem, attr) { |
30 | 30 | var color; |
31 | 31 | |
— | — | @@ -33,12 +33,12 @@ |
34 | 34 | |
35 | 35 | // Keep going until we find an element that has color, or we hit the body |
36 | 36 | if ( color != '' && color != 'transparent' || $.nodeName(elem, 'body') ) |
37 | | - break; |
| 37 | + break; |
38 | 38 | |
39 | 39 | attr = 'backgroundColor'; |
40 | 40 | } while ( elem = elem.parentNode ); |
41 | 41 | |
42 | 42 | return $.colorUtil.getRGB(color); |
43 | 43 | }; |
44 | | - |
| 44 | + |
45 | 45 | } )( jQuery ); |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.upload.js |
— | — | @@ -51,12 +51,12 @@ |
52 | 52 | '</div>' ); |
53 | 53 | thumb.find( '.filename' ).text( file.name ).end() |
54 | 54 | .find( '.fileinfo' ).text( prettySize( file.size ) ).end(); |
55 | | - |
| 55 | + |
56 | 56 | var ctx = thumb.find( 'canvas' )[0].getContext( '2d' ), |
57 | 57 | spinner = new Image(); |
58 | | - spinner.onload = function() { |
59 | | - ctx.drawImage( spinner, (previewSize - spinner.width) / 2, |
60 | | - (previewSize - spinner.height) / 2 ); |
| 58 | + spinner.onload = function() { |
| 59 | + ctx.drawImage( spinner, (previewSize - spinner.width) / 2, |
| 60 | + (previewSize - spinner.height) / 2 ); |
61 | 61 | }; |
62 | 62 | spinner.src = mw.config.get( 'wgScriptPath' ) + '/skins/common/images/spinner.gif'; |
63 | 63 | $( '#mw-htmlform-source' ).parent().prepend( thumb ); |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | fetchPreview( file, function( dataURL ) { |
67 | 67 | var img = new Image(), |
68 | 68 | rotation = 0; |
69 | | - |
| 69 | + |
70 | 70 | if ( meta && meta.tiff && meta.tiff.Orientation ) { |
71 | 71 | rotation = (360 - function () { |
72 | 72 | // See includes/media/Bitmap.php |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | } |
83 | 83 | }() ) % 360; |
84 | 84 | } |
85 | | - |
| 85 | + |
86 | 86 | img.onload = function() { |
87 | 87 | var width, height, x, y, dx, dy; |
88 | 88 | // Fit the image within the previewSizexpreviewSize box |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | dy = (180 - height) / 2; |
99 | 99 | switch ( rotation ) { |
100 | 100 | // If a rotation is applied, the direction of the axis |
101 | | - // changes as well. You can derive the values below by |
| 101 | + // changes as well. You can derive the values below by |
102 | 102 | // drawing on paper an axis system, rotate it and see |
103 | 103 | // where the positive axis direction is |
104 | 104 | case 0: |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | y = dy; |
107 | 107 | break; |
108 | 108 | case 90: |
109 | | - |
| 109 | + |
110 | 110 | x = dx; |
111 | 111 | y = dy - previewSize; |
112 | 112 | break; |
— | — | @@ -118,11 +118,11 @@ |
119 | 119 | y = dy; |
120 | 120 | break; |
121 | 121 | } |
122 | | - |
| 122 | + |
123 | 123 | ctx.clearRect( 0, 0, 180, 180 ); |
124 | 124 | ctx.rotate( rotation / 180 * Math.PI ); |
125 | 125 | ctx.drawImage( img, x, y, width, height ); |
126 | | - |
| 126 | + |
127 | 127 | // Image size |
128 | 128 | var info = mw.msg( 'widthheight', img.width, img.height ) + |
129 | 129 | ', ' + prettySize( file.size ); |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | function clearPreview() { |
193 | 193 | $( '#mw-upload-thumbnail' ).remove(); |
194 | 194 | } |
195 | | - |
| 195 | + |
196 | 196 | /** |
197 | 197 | * Check if the file does not exceed the maximum size |
198 | 198 | */ |
— | — | @@ -204,18 +204,18 @@ |
205 | 205 | return sizes['*']; |
206 | 206 | } |
207 | 207 | $( '.mw-upload-source-error' ).remove(); |
208 | | - |
209 | | - var maxSize = getMaxUploadSize( 'file' ); |
| 208 | + |
| 209 | + var maxSize = getMaxUploadSize( 'file' ); |
210 | 210 | if ( file.size > maxSize ) { |
211 | | - var error = $( '<p class="error mw-upload-source-error" id="wpSourceTypeFile-error">' + |
| 211 | + var error = $( '<p class="error mw-upload-source-error" id="wpSourceTypeFile-error">' + |
212 | 212 | mw.message( 'largefileserver', file.size, maxSize ).escaped() + '</p>' ); |
213 | 213 | $( '#wpUploadFile' ).after( error ); |
214 | 214 | return false; |
215 | 215 | } |
216 | 216 | return true; |
217 | 217 | } |
218 | | - |
219 | | - |
| 218 | + |
| 219 | + |
220 | 220 | /** |
221 | 221 | * Initialization |
222 | 222 | */ |
— | — | @@ -226,11 +226,11 @@ |
227 | 227 | if ( this.files && this.files.length ) { |
228 | 228 | // Note: would need to be updated to handle multiple files. |
229 | 229 | var file = this.files[0]; |
230 | | - |
| 230 | + |
231 | 231 | if ( !checkMaxUploadSize( file ) ) { |
232 | 232 | return; |
233 | 233 | } |
234 | | - |
| 234 | + |
235 | 235 | if ( fileIsPreviewable( file ) ) { |
236 | 236 | showPreview( file ); |
237 | 237 | } |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.recentchanges.js |
— | — | @@ -9,12 +9,12 @@ |
10 | 10 | var $select = null; |
11 | 11 | |
12 | 12 | var rc = mw.special.recentchanges = { |
13 | | - |
| 13 | + |
14 | 14 | /** |
15 | 15 | * Handler to disable/enable the namespace selector checkboxes when the |
16 | 16 | * special 'all' namespace is selected/unselected respectively. |
17 | 17 | */ |
18 | | - updateCheckboxes: function() { |
| 18 | + updateCheckboxes: function() { |
19 | 19 | // The option element for the 'all' namespace has an empty value |
20 | 20 | var isAllNS = ('' === $select.find('option:selected').val() ); |
21 | 21 | |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | |
28 | 28 | init: function() { |
29 | 29 | // Populate |
30 | | - $select = $( '#namespace' ); |
| 30 | + $select = $( '#namespace' ); |
31 | 31 | |
32 | 32 | // Bind to change event, and trigger once to set the initial state of the checkboxes. |
33 | 33 | $select.change( rc.updateCheckboxes ).change(); |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.preferences.js |
— | — | @@ -22,13 +22,13 @@ |
23 | 23 | $legend.parent().show(); |
24 | 24 | } |
25 | 25 | var ident = $legend.parent().attr( 'id' ); |
26 | | - |
| 26 | + |
27 | 27 | var $li = $( '<li/>', { |
28 | 28 | 'class' : ( i === 0 ) ? 'selected' : null |
29 | 29 | }); |
30 | 30 | var $a = $( '<a/>', { |
31 | 31 | text : $legend.text(), |
32 | | - id : ident.replace('prefsection', 'preftab'), |
| 32 | + id : ident.replace('prefsection', 'preftab'), |
33 | 33 | href : '#' + ident |
34 | 34 | }).click( function( e ) { |
35 | 35 | e.preventDefault(); |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | var scrollTop = $(window).scrollTop(); |
39 | 39 | window.location.hash = $(this).attr('href'); |
40 | 40 | $(window).scrollTop(scrollTop); |
41 | | - |
| 41 | + |
42 | 42 | $preftoc.find( 'li' ).removeClass( 'selected' ); |
43 | 43 | $(this).parent().addClass( 'selected' ); |
44 | 44 | $( '#preferences > fieldset' ).hide(); |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | $tzTextbox.val( minutesToHours( minuteDiff ) ); |
147 | 147 | $tzSelect.val( 'other' ); |
148 | 148 | $tzTextbox.get( 0 ).disabled = false; |
149 | | - } else if ( type == 'other' ) { |
| 149 | + } else if ( type == 'other' ) { |
150 | 150 | // Grab data from the textbox, parse it. |
151 | 151 | minuteDiff = hoursToMinutes( $tzTextbox.val() ); |
152 | 152 | } else { |
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.search.css |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | /** |
3 | | - * Fixes sister projects box moving down the extract |
| 3 | + * Fixes sister projects box moving down the extract |
4 | 4 | * of the first result (bug #16886). |
5 | | - * It only happens when the window is small and |
6 | | - * This changes slightly the layout for big screens |
7 | | - * where there was space for the extracts and the |
8 | | - * sister projects and thus it showed like in any |
| 5 | + * It only happens when the window is small and |
| 6 | + * This changes slightly the layout for big screens |
| 7 | + * where there was space for the extracts and the |
| 8 | + * sister projects and thus it showed like in any |
9 | 9 | * other browser. |
10 | 10 | * |
11 | 11 | * This will only affect IE 7 and lower |
Index: trunk/phase3/resources/mediawiki/mediawiki.htmlform.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | /** |
3 | 3 | * Utility functions for jazzing up HTMLForm elements |
4 | 4 | */ |
5 | | -( function( $ ) { |
| 5 | +( function( $ ) { |
6 | 6 | |
7 | 7 | /** |
8 | 8 | * jQuery plugin to fade or snap to visible state. |
Index: trunk/phase3/resources/mediawiki/mediawiki.title.js |
— | — | @@ -163,8 +163,8 @@ |
164 | 164 | } |
165 | 165 | return title; |
166 | 166 | }; |
167 | | - |
168 | 167 | |
| 168 | + |
169 | 169 | /* Static space */ |
170 | 170 | |
171 | 171 | /** |
Index: trunk/phase3/resources/mediawiki.page/mediawiki.page.mwsuggest.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | $suggestionList, |
6 | 6 | url = mw.util.wikiScript( 'api' ), |
7 | 7 | maxRowWindow; |
8 | | - |
| 8 | + |
9 | 9 | //Append the container which will hold the menu to the body |
10 | 10 | $( 'body' ).append( $container ); |
11 | 11 | |