r60959 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60958‎ | r60959 | r60960 >
Date:05:04, 12 January 2010
Author:adam
Status:resolved (Comments)
Tags:
Comment:
Further work on the footer cleanup demoing
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup/FooterCleanup.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/vector.footerCleanup.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/FooterCleanup/FooterCleanup.js
@@ -17,14 +17,24 @@
1818 .change( function() {
1919 if( $j( this ).val().length == 0 ){
2020 $j( this )
21 - .val( $j( this ).data( 'hint' ) )
22 - .addClass( 'inline-hint' );
 21+ .addClass( 'inline-hint' )
 22+ .val( $j( this ).data( 'hint' ) );
 23+
2324 } else {
2425 $j( this ).removeClass( 'inline-hint' );
2526 } } )
 27+ .focus( function() {
 28+ if( $j( this ).val() == $j( this ).data( 'hint' ) ) {
 29+ $j( this )
 30+ .removeClass( 'inline-hint' )
 31+ .val( "" );
 32+ }
 33+ })
 34+ .blur( function() { $j( this ).trigger( 'change' ); } )
2635 .trigger( 'change' );
27 - $j( '#wpSummary, .editCheckboxes' )
28 - .wrap( '<div id="editpage-summary-fields"></div>');
 36+ $j( '#wpSummary' )
 37+ .add( '.editCheckboxes' )
 38+ .wrapAll( '<div id="editpage-summary-fields"></div>');
2939
3040 $j( '#editpage-specialchars' ).remove();
3141
@@ -47,5 +57,15 @@
4858 .find( 'ul' )
4959 .slideToggle( 'fast' );
5060 return false;
51 - })
 61+ })
 62+ .trigger( 'click' );
 63+ $j( '#wpPreview' )
 64+ .remove();
 65+ $j( '#wpDiff' )
 66+ .remove();
 67+ $j( '#mw-editform-cancel' )
 68+ .remove()
 69+ .appendTo('.editButtons');
 70+ $j( '.editHelp' )
 71+ .remove();
5272 } );
Index: trunk/extensions/UsabilityInitiative/css/vector.footerCleanup.css
@@ -3,7 +3,7 @@
44 background-color: #F3F3F3;
55 border: 1px solid silver;
66 border-top: none;
7 - padding: 20px;
 7+ padding: 20px 170px 20px 170px;
88 margin-right: -2px;
99 }
1010
@@ -37,3 +37,51 @@
3838 margin-bottom: 0px;
3939 }
4040
 41+.editOptions {
 42+ width: 100%;
 43+}
 44+#wpSummaryLabel,
 45+#editpage-summary-fields,
 46+.editButtons {
 47+ float: left;
 48+}
 49+#wpSummaryLabel{
 50+ width: 150px;
 51+ margin-left: -150px;
 52+ position: relative;
 53+}
 54+#editpage-summary-fields {
 55+ width: 100%;
 56+ margin-right: -100%;
 57+}
 58+#editpage-summary-fields input.mw-summary {
 59+ width: 95%;
 60+}
 61+.editButtons {
 62+ width: 150px;
 63+ margin-right: -150px;
 64+ float: right;
 65+ position: relative;
 66+}
 67+#editpage-copywarn {
 68+ margin-left: -150px;
 69+ margin-right: 10px;
 70+}
 71+/* Why don't we use self clearing floats anywhere? */
 72+
 73+.editOptions:after {
 74+ content: ".";
 75+ display: block;
 76+ height: 0;
 77+ clear: both;
 78+ visibility: hidden;
 79+}
 80+.editOptions {
 81+ display: inline-block;
 82+}
 83+* html .editOptions {
 84+ height: 1%;
 85+}
 86+.editOptions {
 87+ display:block;
 88+}
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r61190Followup change to r60959 - implimenting Roan's suggested improvementadam01:05, 18 January 2010

Comments

#Comment by Catrope (talk | contribs)   22:08, 17 January 2010
+		$j( '#wpPreview' )
+			.remove();
+		$j( '#wpDiff' )
+			.remove();
+		$j( '#mw-editform-cancel' )
+			.remove()
+			.appendTo('.editButtons');
+		$j( '.editHelp' )
+			.remove();

It's probably clearer and more concise to use something like:

$j( '#wpPreview, #wpDiff, .editHelp' )
        .remove();
#Comment by Adammiller~mediawikiwiki (talk | contribs)   01:05, 18 January 2010

Implemented in r61190.

Status & tagging log