r101223 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101222‎ | r101223 | r101224 >
Date:22:16, 28 October 2011
Author:preilly
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/views/layout/application.html.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/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: branches/wmf/1.18wmf1/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"

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101222need to size results correctly and update versionpreilly22:15, 28 October 2011

Status & tagging log