diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-10-29 17:47:19 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-10-29 17:47:19 +0000 |
commit | d1146122184e153e1fac944eafe3535274859ca0 (patch) | |
tree | 368b450c8be8f42eeb13a071f6bce9fcc61ec91f /sca-cpp/trunk/modules/edit/htdocs/notfound/index.html | |
parent | 11adbc1719db790bd485f4f511b2740c151e5872 (diff) |
Better network connectivity status reporting and handling of orientation change events.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1194948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/edit/htdocs/notfound/index.html')
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/notfound/index.html | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/notfound/index.html b/sca-cpp/trunk/modules/edit/htdocs/notfound/index.html index 743ae59a84..8601fbfea6 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/notfound/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/notfound/index.html @@ -20,7 +20,7 @@ <html> <head> <title>Page not found</title> -<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, target-densitydpi=devicedpi"/> +<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> <meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/> <base href="/notfound/"/> @@ -46,16 +46,16 @@ appcache.get = function(uri) { http.send(null); if (http.status == 200) { if (http.getResponseHeader("X-Login") != null) { - if (log) log('http err', u, 'X-Login'); + if (log) log('http error', u, 'X-Login'); return null; } else if (http.responseText == '' || http.getResponseHeader("Content-Type") == null) { - if (log) log('http err', u, 'No-Content'); + if (log) log('http error', u, 'No-Content'); return null; } localStorage.setItem(u, http.responseText); return http.responseText; } - if (log) log('http err', u, http.status, http.statusText); + if (log) log('http error', u, http.status, http.statusText); return null; }; @@ -118,9 +118,23 @@ showmenu(mdiv); div.style.top = ui.pixpos(mdiv.offsetTop + mdiv.offsetHeight); /** + * Handle orientation change. + */ +document.body.onorientationchange = function(e) { + //log('onorientationchange'); + + // Scroll to the top and hide the address bar + window.scrollTo(0, 0); + + return true; +}; + +/** * Load post processing. */ function onload() { + //log('onload'); + // Show the page document.body.style.visibility = 'visible'; |