r60952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60951‎ | r60952 | r60953 >
Date:23:52, 11 January 2010
Author:adam
Status:ok
Tags:
Comment:
First pass at edit page footer cleanup. Still disabled as there's a lot left to impliment from the proposed design.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup (added) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup/FooterCleanup.js (added) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/vector.footerCleanup.css (added) (history)
  • /trunk/extensions/UsabilityInitiative/images/wikiEditor/templateEditor/expand.png (added) (history)

Diff [purge]

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 @@
2424 'collapsiblenav' => array( 'global' => true, 'user' => false ),
2525 'collapsibletabs' => array( 'global' => true, 'user' => false ),
2626 'editwarning' => array( 'global' => false, 'user' => true ),
 27+ 'footercleanup' => array( 'global' => false, 'user' => false ),
2728 'simplesearch' => array( 'global' => true, 'user' => false ),
2829 );
2930
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -15,6 +15,7 @@
1616 array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 6 ),
1717 array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 6 ),
1818 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 4 ),
 19+ array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 1 ),
1920 array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 5 ),
2021 ),
2122 'combined' => array(
@@ -46,6 +47,8 @@
4748 'vector-editwarning-warning',
4849 ),
4950 ),
 51+ 'footercleanup' => array(
 52+ ),
5053 'simplesearch' => array(
5154 'i18n' => 'WikiEditorToc',
5255 'messages' => array(
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -20,6 +20,7 @@
2121 'raw' => array(
2222 array( 'src' => 'css/suggestions.css', 'version' => 6 ),
2323 array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 6 ),
 24+ array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ),
2425 array( 'src' => 'css/wikiEditor.css', 'version' => 7 ),
2526 array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 10 ),
2627 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
2728 + 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+

Status & tagging log