r101222 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101221‎ | r101222 | r101223 >
Date:22:15, 28 October 2011
Author:preilly
Status:ok
Tags:
Comment:
need to size results correctly and update version
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
@@ -15,20 +15,19 @@
1616 var sb = document.getElementById( 'searchbox' );
1717
1818 function updateSearchWidth() {
19 - if ( sq && search && sb ) {
 19+ if ( sq && search && sb && results ) {
2020 var iw = ( document.documentElement.clientWidth ) ? document.documentElement.clientWidth : document.body.clientWidth;
2121 sb.style.width = ( iw - 30 ) + pixels;
2222 sq.style.width = ( iw - 110 ) + pixels;
2323 search.style.width = ( iw - 140 ) + pixels;
 24+ results.style.width = ( sq.offsetWidth - 2 ) + pixels;
 25+ results.style.left = sq.offsetLeft + pixels;
 26+ results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels;
2427 }
2528 }
2629
2730 updateSearchWidth();
2831
29 -results.style.width = ( sq.offsetWidth - 2 ) + pixels;
30 -results.style.left = sq.offsetLeft + pixels;
31 -results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels;
32 -
3332 function updateOrientationSearchWidth() {
3433 switch( window.orientation ) {
3534 case 0:
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=10282011120819' . $endScriptTag : '';
 22+$openSearchScript = ( self::$isBetaGroupMember ) ? $startScriptTag . $javaScriptPath . 'opensearch.js?version=10282011121527' . $endScriptTag : '';
2323
2424 $applicationHtml = <<<EOT
2525 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Follow-up revisions

RevisionCommit summaryAuthorDate
r101223mft r101222preilly22:16, 28 October 2011

Status & tagging log