Index: trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup/FooterCleanup.js |
— | — | @@ -13,41 +13,46 @@ |
14 | 14 | .remove() |
15 | 15 | .text() |
16 | 16 | // FIXME - Not a long-term solution. This change should be done in the message itself |
17 | | - .replace( /\)|\(/g, '' ) ) |
| 17 | + .replace( /\)|\(/g, '' ) |
| 18 | + ) |
18 | 19 | .change( function() { |
19 | | - if( $j( this ).val().length == 0 ){ |
| 20 | + if ( $j( this ).val().length == 0 ) |
20 | 21 | $j( this ) |
21 | 22 | .addClass( 'inline-hint' ) |
22 | 23 | .val( $j( this ).data( 'hint' ) ); |
23 | | - |
24 | 24 | } else { |
25 | 25 | $j( this ).removeClass( 'inline-hint' ); |
26 | | - } } ) |
| 26 | + } |
| 27 | + } ) |
27 | 28 | .focus( function() { |
28 | | - if( $j( this ).val() == $j( this ).data( 'hint' ) ) { |
29 | | - $j( this ) |
30 | | - .removeClass( 'inline-hint' ) |
31 | | - .val( "" ); |
32 | | - } |
33 | | - }) |
| 29 | + if ( $j( this ).val() == $j( this ).data( 'hint' ) ) { |
| 30 | + $j( this ) |
| 31 | + .removeClass( 'inline-hint' ) |
| 32 | + .val( "" ); |
| 33 | + } |
| 34 | + }) |
34 | 35 | .blur( function() { $j( this ).trigger( 'change' ); } ) |
35 | 36 | .trigger( 'change' ); |
36 | | - $j( '#wpSummary' ) |
37 | | - .add( '.editCheckboxes' ) |
38 | | - .wrapAll( '<div id="editpage-summary-fields"></div>'); |
39 | | - |
40 | | - // transclusions |
41 | | - // FIXME - bad CSS styling here with double class selectors. Should address here. |
42 | | - var transclusionCount = ( $j( '.templatesUsed ul li' ).length ); |
43 | | - $j( '.templatesUsed ul' ) |
44 | | - .wrap('<div id="transclusions-list" class="collapsible-list collapsed"></div>') |
45 | | - .parent() |
46 | | - .prepend( '<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' |
47 | | - + transclusionCount |
48 | | - + "</strong> other pages.</label>"); |
49 | | - $j( '.mw-templatesUsedExplanation' ).remove(); |
| 37 | + $j( '#wpSummary' ) |
| 38 | + .add( '.editCheckboxes' ) |
| 39 | + .wrapAll( '<div id="editpage-summary-fields"></div>'); |
50 | 40 | |
51 | | - $j( '.collapsible-list label' ).click( function() { |
| 41 | + $j( '#editpage-specialchars' ).remove(); |
| 42 | + |
| 43 | + // transclusions |
| 44 | + // FIXME - bad CSS styling here with double class selectors. Should address here. |
| 45 | + var transclusionCount = $j( '.templatesUsed ul li' ).size(); |
| 46 | + $j( '.templatesUsed ul' ) |
| 47 | + .wrap( '<div id="transclusions-list" class="collapsible-list collapsed"></div>' ) |
| 48 | + .parent() |
| 49 | + // FIXME: i18n, remove link from message and let community add link to transclusion page if it exists |
| 50 | + .prepend( '<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' |
| 51 | + + transclusionCount |
| 52 | + + '</strong> other pages.</label>'); |
| 53 | + $j( '.mw-templatesUsedExplanation' ).remove(); |
| 54 | + |
| 55 | + $j( '.collapsible-list label' ) |
| 56 | + .click( function() { |
52 | 57 | $j( this ) |
53 | 58 | .parent() |
54 | 59 | .toggleClass( 'expanded' ) |
— | — | @@ -55,11 +60,11 @@ |
56 | 61 | .find( 'ul' ) |
57 | 62 | .slideToggle( 'fast' ); |
58 | 63 | return false; |
59 | | - }) |
60 | | - .trigger( 'click' ); |
61 | | - $j( '#wpPreview, #wpDiff, .editHelp, #editpage-specialchars' ) |
62 | | - .remove(); |
63 | | - $j( '#mw-editform-cancel' ) |
64 | | - .remove() |
65 | | - .appendTo('.editButtons'); |
| 64 | + }) |
| 65 | + .trigger( 'click' ); |
| 66 | + $j( '#wpPreview, #wpDiff, .editHelp, #editpage-specialchars' ) |
| 67 | + .remove(); |
| 68 | + $j( '#mw-editform-cancel' ) |
| 69 | + .remove() |
| 70 | + .appendTo('.editButtons'); |
66 | 71 | } ); |