r111649 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111648‎ | r111649 | r111650 >
Date:16:49, 16 February 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
mimic behaviour in beta_ introduced in r111638
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/beta_application.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_application.js
@@ -82,30 +82,9 @@
8383 wm_reveal_for_hash( document.location.hash );
8484 }
8585
86 -updateOrientation();
87 -
8886 // Try to scroll and hide URL bar
8987 window.scrollTo( 0, 1 );
9088
91 -/**
92 - * updateOrientation checks the current orientation, sets the body's class
93 - * attribute to portrait, landscapeLeft, or landscapeRight,
94 - * and displays a descriptive message on "Handling iPhone or iPod touch Orientation Events".
95 - */
96 -function updateOrientation() {
97 - switch( window.orientation ) {
98 - case 0:
99 - document.body.setAttribute( 'class', 'portrait' );
100 - break;
101 - case 90:
102 - case -90:
103 - document.body.setAttribute( 'class', 'landscape' );
104 - }
105 -}
106 -
107 -// Point to the updateOrientation function when iPhone switches between portrait and landscape modes.
108 -window.onorientationchange = updateOrientation;
109 -
11089 function wm_reveal_for_hash( hash ) {
11190 var targetel = document.getElementById( hash.substr(1) );
11291 if ( targetel ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111638swap out javascript orientation styling for media query...jdlrobson13:42, 16 February 2012

Status & tagging log