From: Prateek Saxena Date: Mon, 22 Sep 2014 20:33:37 +0000 (-0700) Subject: Special:Contributions: Use mediawiki.ui X-Git-Tag: 1.31.0-rc.0~13762^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=bb132a3326692522c21f54f3047faaa1126ecf4e;p=lhc%2Fweb%2Fwiklou.git Special:Contributions: Use mediawiki.ui * 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 --- diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 94b7b7a922..a3c23608d9 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -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' ) ) ); diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 32a887c407..4b4f5452ff 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -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( ' ', $tagFilter ) + array(), + array_shift( $tagFilter ) . implode( ' ', $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 ) ) ); diff --git a/resources/src/mediawiki.special/mediawiki.special.css b/resources/src/mediawiki.special/mediawiki.special.css index 0356fc741e..d245726222 100644 --- a/resources/src/mediawiki.special/mediawiki.special.css +++ b/resources/src/mediawiki.special/mediawiki.special.css @@ -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; +}