From: Florian Date: Fri, 27 May 2016 14:02:40 +0000 (+0200) Subject: SpecialSearch: Use OOUI\ActionFieldLayout for search input and button X-Git-Tag: 1.31.0-rc.0~6780 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=3070b55c513bd2478b56d4fb81274fdfc4159be1;p=lhc%2Fweb%2Fwiklou.git SpecialSearch: Use OOUI\ActionFieldLayout for search input and button This prevents the button from flipping to a new line if the window or the available width at all is smaller as the width of the input and the button together. Now, the input will be as small as needed for the button to be on the same line. Bug: T134475 Change-Id: Icc68a8e83fc7037b96a5efec2766ffdf453c5413 --- diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index e14fcf5b03..b98ddda1af 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -1241,16 +1241,19 @@ class SpecialSearch extends SpecialPage { 'dataLocation' => 'content', ] ); + $layout = new OOUI\ActionFieldLayout( $searchWidget, new OOUI\ButtonInputWidget( [ + 'type' => 'submit', + 'label' => $this->msg( 'searchbutton' )->text(), + 'flags' => [ 'progressive', 'primary' ], + ] ), [ + 'align' => 'top', + ] ); + $out = Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . Html::hidden( 'profile', $this->profile ) . Html::hidden( 'fulltext', 'Search' ) . - $searchWidget . - new OOUI\ButtonInputWidget( [ - 'type' => 'submit', - 'label' => $this->msg( 'searchbutton' )->text(), - 'flags' => [ 'progressive', 'primary' ], - ] ); + $layout; // Results-info if ( $totalNum > 0 && $this->offset < $totalNum ) { diff --git a/resources/src/mediawiki.special/mediawiki.special.search.styles.css b/resources/src/mediawiki.special/mediawiki.special.search.styles.css index 7be7c84ad4..e8fda84535 100644 --- a/resources/src/mediawiki.special/mediawiki.special.search.styles.css +++ b/resources/src/mediawiki.special/mediawiki.special.search.styles.css @@ -84,7 +84,6 @@ div.searchresult { color: #666; font-size: 95%; } - fieldset#mw-searchoptions { margin: 0; padding: 0.5em 0.75em 0.75em 0.75em;