r40122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40121‎ | r40122 | r40123 >
Date:07:14, 28 August 2008
Author:raymond
Status:old
Tags:
Comment:
* (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the last input element (like Special:Watchlist too)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -406,15 +406,22 @@
407407 $panel[] = '<hr />';
408408
409409 $extraOpts = $this->getExtraOptions( $opts );
 410+ $extraOptsCount = count( $extraOpts );
 411+ $count = 0;
 412+ $submit = ' ' . Xml::submitbutton( wfMsg( 'allpagessubmit' ) );
410413
411 - $out = Xml::openElement( 'table' );
 414+ $out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
412415 foreach ( $extraOpts as $optionRow ) {
 416+ # Add submit button to the last row only
 417+ ++$count;
 418+ $addSubmit = $count === $extraOptsCount ? $submit : '';
 419+
413420 $out .= Xml::openElement( 'tr' );
414 - if ( is_array($optionRow) ) {
415 - $out .= Xml::tags( 'td', null, $optionRow[0] );
416 - $out .= Xml::tags( 'td', null, $optionRow[1] );
 421+ if ( is_array( $optionRow ) ) {
 422+ $out .= Xml::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
 423+ $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
417424 } else {
418 - $out .= Xml::tags( 'td', array( 'colspan' => 2 ), $optionRow );
 425+ $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
419426 }
420427 $out .= Xml::closeElement( 'tr' );
421428 }
@@ -454,7 +461,6 @@
455462 }
456463
457464 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
458 - $extraOpts['submit'] = Xml::submitbutton( wfMsg('allpagessubmit') );
459465 return $extraOpts;
460466 }
461467
Index: trunk/phase3/RELEASE-NOTES
@@ -154,6 +154,8 @@
155155 literally; now converting them to spaces per expectation.
156156 * (bug 15342) "Invert" checkbox now works correctly when selecting main
157157 namespace in Special:Watchlist
 158+* (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the
 159+ last input element (like Special:Watchlist too)
158160
159161
160162 === API changes in 1.14 ===