From: Amir Sarabadani Date: Sat, 27 Aug 2016 17:26:40 +0000 (+0430) Subject: Rework UserContribs options section X-Git-Tag: 1.31.0-rc.0~5513 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=aafd53d9c3d4268ae34527e8e42473bb4553df5b;p=lhc%2Fweb%2Fwiklou.git Rework UserContribs options section It will make it more mobile friendly and fixes several issues. Bug: T143518 Bug: T50544 Change-Id: Ie353af860aaec7d6921ae83fa59980ab0a5c8d9b --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 68289a770c..0858b1813f 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -496,12 +496,12 @@ class SpecialContributions extends IncludableSpecialPage { if ( $tagFilter ) { $filterSelection = Html::rawElement( - 'td', + 'div', [], implode( ' ', $tagFilter ) ); } else { - $filterSelection = Html::rawElement( 'td', [ 'colspan' => 2 ], '' ); + $filterSelection = Html::rawElement( 'div', [], '' ); } $this->getOutput()->addModules( 'mediawiki.userSuggest' ); @@ -542,13 +542,13 @@ class SpecialContributions extends IncludableSpecialPage { ); $targetSelection = Html::rawElement( - 'td', - [ 'colspan' => 2 ], - $labelNewbies . '
' . $labelUsername . ' ' . $input . ' ' + 'div', + [], + $labelNewbies . '
' . $labelUsername . ' ' . $input . ' ' ); $namespaceSelection = Xml::tags( - 'td', + 'div', [], Xml::label( $this->msg( 'namespace' )->text(), @@ -647,12 +647,12 @@ class SpecialContributions extends IncludableSpecialPage { ); $extraOptions = Html::rawElement( - 'td', - [ 'colspan' => 2 ], + 'div', + [], implode( '', $filters ) ); - $dateSelectionAndSubmit = Xml::tags( 'td', [ 'colspan' => 2 ], + $dateSelectionAndSubmit = Xml::tags( 'div', [], Xml::dateMenu( $this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'], $this->opts['month'] @@ -663,13 +663,14 @@ class SpecialContributions extends IncludableSpecialPage { ) ); - $form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() ); - $form .= Html::rawElement( 'table', [ 'class' => 'mw-contributions-table' ], "\n" . - Html::rawElement( 'tr', [], $targetSelection ) . "\n" . - Html::rawElement( 'tr', [], $namespaceSelection ) . "\n" . - Html::rawElement( 'tr', [], $filterSelection ) . "\n" . - Html::rawElement( 'tr', [], $extraOptions ) . "\n" . - Html::rawElement( 'tr', [], $dateSelectionAndSubmit ) . "\n" + $form .= Xml::fieldset( + $this->msg( 'sp-contributions-search' )->text(), + $targetSelection . + $namespaceSelection . + $filterSelection . + $extraOptions . + $dateSelectionAndSubmit, + [ 'class' => 'mw-contributions-table' ] ); $explain = $this->msg( 'sp-contributions-explain' ); @@ -677,7 +678,7 @@ class SpecialContributions extends IncludableSpecialPage { $form .= "

{$explain->parse()}

"; } - $form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ); + $form .= Xml::closeElement( 'form' ); return $form; } diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index de442e91f6..84ab8c445f 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -162,6 +162,7 @@ input#wpSummary { .mw-input-with-label { white-space: nowrap; + display: inline-block; } /**