Index: trunk/extensions/MobileFrontend/ApplicationTemplate.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | $endScriptTag = '"></script>'; |
26 | 26 | $javaScriptPath = $this->data['wgExtensionAssetsPath'] . '/MobileFrontend/javascripts/'; |
27 | 27 | |
28 | | - $openSearchScript = $startScriptTag . $javaScriptPath . $betaPrefix . 'opensearch.js?version=12142011126437' . $endScriptTag; |
| 28 | + $openSearchScript = $startScriptTag . $javaScriptPath . $betaPrefix . 'opensearch.js?version=12142011129437' . $endScriptTag; |
29 | 29 | $jQueryScript = ( $this->data['device']['supports_jquery'] ) ? $startScriptTag . $javaScriptPath . 'jquery-1.7.1.min.js' . $endScriptTag : ''; |
30 | 30 | $filePageScript = ( $this->data['isFilePage'] ) ? $startScriptTag . $javaScriptPath . 'filepage.js' . $endScriptTag : ''; |
31 | 31 | |
Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js |
— | — | @@ -22,10 +22,26 @@ |
23 | 23 | function hideResults() { |
24 | 24 | results.style.display = 'none'; |
25 | 25 | } |
| 26 | +function resetViewPort() { |
| 27 | + if ( navigator.userAgent.match( /iPhone/i ) || navigator.userAgent.match( /iPad/i ) ) { |
| 28 | + var viewportmeta = document.querySelector( 'meta[name="viewport"]' ); |
| 29 | + if ( viewportmeta ) { |
| 30 | + viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0'; |
| 31 | + document.body.addEventListener( 'gesturestart', function () { |
| 32 | + viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6'; |
| 33 | + }, false ); |
| 34 | + } |
| 35 | + } |
| 36 | +} |
26 | 37 | |
| 38 | +resetViewPort(); |
| 39 | + |
27 | 40 | var focused = false; |
28 | 41 | var ol = new Object(); |
29 | 42 | search.onfocus = function() { |
| 43 | + |
| 44 | + resetViewPort(); |
| 45 | + |
30 | 46 | if ( !focused ) { |
31 | 47 | content.style.display = 'none'; |
32 | 48 | footer.style.display = 'none'; |