Index: trunk/extensions/MobileFrontend/javascripts/application.js |
— | — | @@ -71,30 +71,9 @@ |
72 | 72 | wm_reveal_for_hash( document.location.hash ); |
73 | 73 | } |
74 | 74 | |
75 | | -updateOrientation(); |
76 | | - |
77 | 75 | // Try to scroll and hide URL bar |
78 | 76 | window.scrollTo( 0, 1 ); |
79 | 77 | |
80 | | -/** |
81 | | - * updateOrientation checks the current orientation, sets the body's class |
82 | | - * attribute to portrait, landscapeLeft, or landscapeRight, |
83 | | - * and displays a descriptive message on "Handling iPhone or iPod touch Orientation Events". |
84 | | - */ |
85 | | -function updateOrientation() { |
86 | | - switch( window.orientation ) { |
87 | | - case 0: |
88 | | - document.body.setAttribute( 'class', 'portrait' ); |
89 | | - break; |
90 | | - case 90: |
91 | | - case -90: |
92 | | - document.body.setAttribute( 'class', 'landscape' ); |
93 | | - } |
94 | | -} |
95 | | - |
96 | | -// Point to the updateOrientation function when iPhone switches between portrait and landscape modes. |
97 | | -window.onorientationchange = updateOrientation; |
98 | | - |
99 | 78 | function wm_reveal_for_hash( hash ) { |
100 | 79 | var targetel = document.getElementById( hash.substr(1) ); |
101 | 80 | if ( targetel ) { |
Index: trunk/extensions/MobileFrontend/stylesheets/iphone.css |
— | — | @@ -350,14 +350,15 @@ |
351 | 351 | font-size: 16px; |
352 | 352 | } |
353 | 353 | |
354 | | -body.landscape #searchbox { |
355 | | - width: 450px; |
| 354 | +@media all and (orientation:landscape) { |
| 355 | + #searchbox { |
| 356 | + width: 450px; |
| 357 | + } |
| 358 | + #searchbox #searchField { |
| 359 | + width: 375px; |
| 360 | + } |
356 | 361 | } |
357 | 362 | |
358 | | -body.landscape #searchbox #searchField { |
359 | | - width: 375px; |
360 | | -} |
361 | | - |
362 | 363 | #header { |
363 | 364 | max-width: 290px; |
364 | 365 | } |