Resolve bug #18704 ("Add an unique CSS class or ID to the tagfilter table row at...
authorjarry1250 <jarry1250@gmail.com>
Fri, 23 Mar 2012 20:33:45 +0000 (20:33 +0000)
committerjarry1250 <jarry1250@gmail.com>
Fri, 23 Mar 2012 22:27:58 +0000 (22:27 +0000)
Effectively followup previous attempt (r111186)

Change-Id: If11e2351ae7553da9ce010fce30354dbaf82b2dd

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

index bef93ee..d4533aa 100644 (file)
@@ -50,6 +50,7 @@ production.
 * (bug 34735) Updated compressOld.php documentation to mention the different
   usages of -s and -n parameters depending on compression type
 * (bug 13896) Rendering of devanagari numbers in automatic '#' number lists
+* (bug 18704) Add an 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..01b93ad 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 );