Resolve bug #18704 ("Add an unique CSS class or ID to the tagfilter table row at...
authorjarry1250 <jarry1250@gmail.com>
Mon, 9 Apr 2012 18:33:28 +0000 (19:33 +0100)
committerjarry1250 <jarry1250@gmail.com>
Mon, 9 Apr 2012 18:33:28 +0000 (19:33 +0100)
Effectively followup previous attempts which suffered from incorrect
placement of brackets (SVN r111186, Git r3659)

Change-Id: Ie52be2c3c92e5e89896ac063acfc95b15f77533a

RELEASE-NOTES-1.20
includes/ChangeTags.php
includes/specials/SpecialRecentchanges.php

index 81de85a..0b6cd17 100644 (file)
@@ -78,6 +78,7 @@ production.
   Subversion when invoked with the --modified option.
 * (bug 35069) On history pages, the " . . " separator after the number of
   characters changed in a revision is now suppressed if no text would follow.
+* (bug 18704) Add a unique CSS class or ID to the tagfilter table row at RecentChanges
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index 63d3732..0dbaac6 100644 (file)
@@ -210,7 +210,7 @@ class ChangeTags {
                        return $fullForm ? '' : array();
 
                $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMsgExt( 'tag-filter', 'parseinline' ) ),
-                       Xml::input( 'tagfilter', 20, $selected ) );
+                       Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input' ) ) );
 
                if ( !$fullForm ) {
                        return $data;
@@ -219,7 +219,7 @@ class ChangeTags {
                $html = implode( '&#160;', $data );
                $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'tag-filter-submit' ) ) );
                $html .= "\n" . Html::hidden( 'title', $title->getPrefixedText() );
-               $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'method' => 'get' ), $html );
+               $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'class' => 'mw-tagfilter-form', 'method' => 'get' ), $html );
 
                return $html;
        }
index bfc5248..c05aaad 100644 (file)
@@ -568,14 +568,14 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $submit = ' ' . Xml::submitbutton( wfMsg( 'allpagessubmit' ) );
 
                $out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
-               foreach( $extraOpts as $optionRow ) {
+               foreach( $extraOpts as $name => $optionRow ) {
                        # Add submit button to the last row only
                        ++$count;
-                       $addSubmit = $count === $extraOptsCount ? $submit : '';
+                       $addSubmit = ( $count === $extraOptsCount ) ? $submit : '';
 
                        $out .= Xml::openElement( 'tr' );
                        if( is_array( $optionRow ) ) {
-                               $out .= Xml::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
+                               $out .= Xml::tags( 'td', array( 'class' => 'mw-label mw-' . $name . '-label' ), $optionRow[0] );
                                $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
                        } else {
                                $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );