r101191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101190‎ | r101191 | r101192 >
Date:20:49, 28 October 2011
Author:preilly
Status:ok
Tags:
Comment:
expand search bar to max width
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/application.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/opensearch.js
@@ -12,6 +12,9 @@
1313 var results = document.getElementById( 'results' );
1414 var search = document.getElementById( 'search' );
1515 var sq = document.getElementById( 'sq' );
 16+var iw = ( document.documentElement.clientWidth ) ? document.documentElement.clientWidth : document.body.clientWidth;
 17+sq.style.width = ( iw - 160 ) + pixels;
 18+search.style.width = ( iw - 162 ) + pixels;;
1619
1720 results.style.width = ( sq.offsetWidth - 2 ) + pixels;
1821 results.style.left = sq.offsetLeft + pixels;
Index: trunk/extensions/MobileFrontend/views/layout/application.html.php
@@ -18,7 +18,7 @@
1919 $endScriptTag = '"></script>';
2020 $javaScriptPath = $wgExtensionAssetsPath . '/MobileFrontend/javascripts/';
2121
22 -$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=10282011120815' . $endScriptTag : '';
 22+$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=10282011124415' . $endScriptTag : '';
2323
2424 $applicationHtml = <<<EOT
2525 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Follow-up revisions

RevisionCommit summaryAuthorDate
r101201mft r101191 r101198preilly21:13, 28 October 2011

Status & tagging log