Generalise search trigger mechanism
Allow content to trigger it. Bug: T189316 Change-Id: Ie9a66b001b3ea4f79e465747b80b181df948cd34
This commit is contained in:
parent
cb6b99f43b
commit
888129478b
|
@ -287,7 +287,7 @@ class MinervaTemplate extends BaseTemplate {
|
||||||
// which is problematic in Opera Mini (see T140490)
|
// which is problematic in Opera Mini (see T140490)
|
||||||
'searchButton' => Html::rawElement( 'button', [
|
'searchButton' => Html::rawElement( 'button', [
|
||||||
'id' => 'searchIcon',
|
'id' => 'searchIcon',
|
||||||
'class' => MinervaUI::iconClass( 'magnifying-glass', 'element' ),
|
'class' => MinervaUI::iconClass( 'magnifying-glass', 'element', 'skin-minerva-search-trigger' ),
|
||||||
], wfMessage( 'searchbutton' ) ),
|
], wfMessage( 'searchbutton' ) ),
|
||||||
'secondaryButtonData' => $data['secondaryButtonData'],
|
'secondaryButtonData' => $data['secondaryButtonData'],
|
||||||
'mainmenuhtml' => $this->getMainMenuHtml( $data ),
|
'mainmenuhtml' => $this->getMainMenuHtml( $data ),
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<input class="search" type="search" name="search" id="searchInput"
|
<input class="search skin-minerva-search-trigger" type="search" name="search" id="searchInput"
|
||||||
autocomplete="off" placeholder="{{placeholder}}"
|
autocomplete="off" placeholder="{{placeholder}}"
|
||||||
value="{{search}}">
|
value="{{search}}">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
// focus() (see SearchOverlay#show) opens virtual keyboard only if triggered
|
// focus() (see SearchOverlay#show) opens virtual keyboard only if triggered
|
||||||
// from user context event, so using it in route callback won't work
|
// from user context event, so using it in route callback won't work
|
||||||
// http://stackoverflow.com/questions/6837543/show-virtual-keyboard-on-mobile-phones-in-javascript
|
// http://stackoverflow.com/questions/6837543/show-virtual-keyboard-on-mobile-phones-in-javascript
|
||||||
$( '#searchInput, #searchIcon' ).on( 'click', openSearchOverlay )
|
$( '#searchInput, #searchIcon, .skin-minerva-search-trigger' ).on( 'click', openSearchOverlay )
|
||||||
// Apparently needed for main menu to work correctly.
|
// Apparently needed for main menu to work correctly.
|
||||||
.prop( 'readonly', true );
|
.prop( 'readonly', true );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue