Special:Contributions: Use mediawiki.ui
authorPrateek Saxena <prtksxna@gmail.com>
Mon, 22 Sep 2014 20:33:37 +0000 (13:33 -0700)
committerPrateek Saxena <prtksxna@gmail.com>
Mon, 29 Sep 2014 18:42:25 +0000 (11:42 -0700)
 * Use 'mw-ui-input-inline' for tagfilter input
 * Use 'mw-ui-input-inline' for IP/Username
 * Use 'mw-ui-progressive' for Search button
 * Vertically align the select dropdown

Bug: 71137
Change-Id: I20b0ebeb194ce0505abede6fb3bdd69b28350f04

includes/ChangeTags.php
includes/specials/SpecialContributions.php
resources/src/mediawiki.special/mediawiki.special.css

index 94b7b7a..a3c2360 100644 (file)
@@ -265,7 +265,7 @@ class ChangeTags {
                                'tagfilter',
                                20,
                                $selected,
-                               array( 'class' => 'mw-tagfilter-input', 'id' => 'tagfilter' )
+                               array( 'class' => 'mw-tagfilter-input mw-ui-input mw-ui-input-inline', 'id' => 'tagfilter' )
                        )
                );
 
index 32a887c..4b4f545 100644 (file)
@@ -478,13 +478,8 @@ class SpecialContributions extends IncludableSpecialPage {
                if ( $tagFilter ) {
                        $filterSelection = Html::rawElement(
                                'td',
-                               array( 'class' => 'mw-label' ),
-                               array_shift( $tagFilter )
-                       );
-                       $filterSelection .= Html::rawElement(
-                               'td',
-                               array( 'class' => 'mw-input' ),
-                               implode( '&#160', $tagFilter )
+                               array(),
+                               array_shift( $tagFilter ) . implode( '&#160', $tagFilter )
                        );
                } else {
                        $filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );
@@ -510,7 +505,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        'target',
                        $this->opts['target'],
                        'text',
-                       array( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +
+                       array( 'size' => '40', 'required' => '', 'class' => 'mw-input mw-ui-input-inline' ) +
                                ( $this->opts['target'] ? array() : array( 'autofocus' )
                                )
                );
@@ -522,16 +517,12 @@ class SpecialContributions extends IncludableSpecialPage {
 
                $namespaceSelection = Xml::tags(
                        'td',
-                       array( 'class' => 'mw-label' ),
+                       array(),
                        Xml::label(
                                $this->msg( 'namespace' )->text(),
                                'namespace',
                                ''
-                       )
-               );
-               $namespaceSelection .= Html::rawElement(
-                       'td',
-                       null,
+                       ) .
                        Html::namespaceSelector(
                                array( 'selected' => $this->opts['namespace'], 'all' => '' ),
                                array(
@@ -612,6 +603,11 @@ class SpecialContributions extends IncludableSpecialPage {
                        $deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly
                );
 
+               $className = 'mw-submit';
+               if ( $this->getConfig( 'UseMediaWikiUIEverywhere') ) {
+                       $className .= ' mw-ui-button mw-ui-progressive';
+               }
+
                $dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),
                        Xml::dateMenu(
                                $this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],
@@ -619,7 +615,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        ) . ' ' .
                                Xml::submitButton(
                                        $this->msg( 'sp-contributions-submit' )->text(),
-                                       array( 'class' => 'mw-submit' )
+                                       array( 'class' => $className )
                                )
                );
 
index 0356fc7..d245726 100644 (file)
@@ -118,3 +118,8 @@ table.mw-userrights-groups * td,
 table.mw-userrights-groups * th {
        padding-right: 1.5em;
 }
+
+/* Special:Contributions */
+.mw-contributions-form select {
+       vertical-align: middle;
+}