Index: trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup/FooterCleanup.js |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +/* Prototype code to demonstrate proposed edit page footer cleanups */ |
| 3 | +/* First draft and will be changing greatly */ |
| 4 | + |
| 5 | +mw.ready( function() { |
| 6 | + if( !wgVectorEnabledModules.footercleanup ) { |
| 7 | + return true; |
| 8 | + } |
| 9 | + $j( '#editpage-copywarn' ) |
| 10 | + .add( '.editOptions' ) |
| 11 | + .wrapAll( '<div id="editpage-bottom"></div>' ); |
| 12 | + $j( '#wpSummary' ).data( 'hint', |
| 13 | + $j( '#wpSummaryLabel span small' ) |
| 14 | + .remove() |
| 15 | + .text() |
| 16 | + // FIXME - Not a long-term solution. This change should be done in the message itself |
| 17 | + .replace( /\)|\(/g, '' ) ) |
| 18 | + .change( function() { |
| 19 | + if( $j( this ).val().length == 0 ){ |
| 20 | + $j( this ) |
| 21 | + .val( $j( this ).data( 'hint' ) ) |
| 22 | + .addClass( 'inline-hint' ); |
| 23 | + } else { |
| 24 | + $j( this ).removeClass( 'inline-hint' ); |
| 25 | + } } ) |
| 26 | + .trigger( 'change' ); |
| 27 | + $j( '#wpSummary, .editCheckboxes' ) |
| 28 | + .wrap( '<div id="editpage-summary-fields"></div>'); |
| 29 | + |
| 30 | + $j( '#editpage-specialchars' ).remove(); |
| 31 | + |
| 32 | + // transclusions |
| 33 | + // FIXME - bad CSS styling here with double class selectors. Should address here. |
| 34 | + var transclusionCount = ( $j( '.templatesUsed ul li' ).length ); |
| 35 | + $j( '.templatesUsed ul' ) |
| 36 | + .wrap('<div id="transclusions-list" class="collapsible-list collapsed"></div>') |
| 37 | + .parent() |
| 38 | + .prepend( '<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' |
| 39 | + + transclusionCount |
| 40 | + + "</strong> other pages.</label>"); |
| 41 | + $j( '.mw-templatesUsedExplanation' ).remove(); |
| 42 | + |
| 43 | + $j( '.collapsible-list label' ).click( function() { |
| 44 | + $j( this ) |
| 45 | + .parent() |
| 46 | + .toggleClass( 'expanded' ) |
| 47 | + .toggleClass( 'collapsed' ) |
| 48 | + .find( 'ul' ) |
| 49 | + .slideToggle( 'fast' ); |
| 50 | + return false; |
| 51 | + }) |
| 52 | +} ); |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.php |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | 'collapsiblenav' => array( 'global' => true, 'user' => false ), |
25 | 25 | 'collapsibletabs' => array( 'global' => true, 'user' => false ), |
26 | 26 | 'editwarning' => array( 'global' => false, 'user' => true ), |
| 27 | + 'footercleanup' => array( 'global' => false, 'user' => false ), |
27 | 28 | 'simplesearch' => array( 'global' => true, 'user' => false ), |
28 | 29 | ); |
29 | 30 | |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 6 ), |
17 | 17 | array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 4 ), |
| 19 | + array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 1 ), |
19 | 20 | array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 5 ), |
20 | 21 | ), |
21 | 22 | 'combined' => array( |
— | — | @@ -46,6 +47,8 @@ |
47 | 48 | 'vector-editwarning-warning', |
48 | 49 | ), |
49 | 50 | ), |
| 51 | + 'footercleanup' => array( |
| 52 | + ), |
50 | 53 | 'simplesearch' => array( |
51 | 54 | 'i18n' => 'WikiEditorToc', |
52 | 55 | 'messages' => array( |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | 'raw' => array( |
22 | 22 | array( 'src' => 'css/suggestions.css', 'version' => 6 ), |
23 | 23 | array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 6 ), |
| 24 | + array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ), |
24 | 25 | array( 'src' => 'css/wikiEditor.css', 'version' => 7 ), |
25 | 26 | array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 10 ), |
26 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
Index: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/expand.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/expand.png |
___________________________________________________________________ |
Name: svn:mime-type |
27 | 28 | + application/octet-stream |
Index: trunk/extensions/UsabilityInitiative/css/vector.footerCleanup.css |
— | — | @@ -0,0 +1,39 @@ |
| 2 | +/* Prototype code to show collapsing left nav options */ |
| 3 | +#editpage-bottom { |
| 4 | + background-color: #F3F3F3; |
| 5 | + border: 1px solid silver; |
| 6 | + border-top: none; |
| 7 | + padding: 20px; |
| 8 | + margin-right: -2px; |
| 9 | +} |
| 10 | + |
| 11 | +input.inline-hint { |
| 12 | + color: #999999; |
| 13 | + font-style: italic; |
| 14 | +} |
| 15 | +.collapsible-list { |
| 16 | + border-top: 1px solid silver; |
| 17 | + border-bottom: 1px solid silver; |
| 18 | +} |
| 19 | + |
| 20 | +/* Prototype code to show collapsing left nav options */ |
| 21 | +.collapsible-list { |
| 22 | + border-top: 1px solid silver; |
| 23 | + border-bottom: 1px solid silver; |
| 24 | + padding: 3px 2px; |
| 25 | +} |
| 26 | +.collapsible-list ul { |
| 27 | + display: block; |
| 28 | + padding: 0 0 0 14px; |
| 29 | +} |
| 30 | +.collapsible-list.collapsed label { |
| 31 | + background: url(../images/vector/collapsibleNav/arrow-down.png) 0 50% no-repeat; |
| 32 | + padding: 4px 0 3px 1.5em; |
| 33 | + margin-bottom: 0px; |
| 34 | +} |
| 35 | +.collapsible-list.expanded label { |
| 36 | + background: url(../images/vector/collapsibleNav/arrow-right.png) 0 50% no-repeat; |
| 37 | + padding: 4px 0 3px 1.5em; |
| 38 | + margin-bottom: 0px; |
| 39 | +} |
| 40 | + |