Revision d9484003
b/snf-astakos-app/astakos/im/static/im/js/common.js | ||
---|---|---|
13 | 13 |
|
14 | 14 |
} |
15 | 15 |
|
16 |
// fix for iPhone - iPad orientation bug |
|
17 |
var metas = document.getElementsByTagName('meta'); |
|
18 |
function resetViewport() { |
|
19 |
var i; |
|
20 |
if (navigator.userAgent.match(/iPhone/i)) { |
|
21 |
for (i=0; i<metas.length; i++) { |
|
22 |
if (metas[i].name == "viewport") { |
|
23 |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; |
|
24 |
} |
|
25 |
} |
|
26 |
} |
|
27 |
} |
|
28 |
resetViewport(); |
|
29 |
|
|
30 |
window.onorientationchange = function() { |
|
31 |
resetViewport(); |
|
32 |
}; |
|
33 |
|
|
34 |
function gestureStart() { |
|
35 |
for (i=0; i<metas.length; i++) { |
|
36 |
if (metas[i].name == "viewport") { |
|
37 |
metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6"; |
|
38 |
} |
|
39 |
} |
|
40 |
} |
|
41 |
document.addEventListener("gesturestart", gestureStart, false); |
|
42 |
|
|
43 |
//end of fix |
|
44 |
|
|
16 | 45 |
$(document).ready(function() { |
17 | 46 |
|
18 | 47 |
|
b/snf-astakos-app/astakos/im/templates/im/base.html | ||
---|---|---|
11 | 11 |
|
12 | 12 |
<meta name="description" content=""> |
13 | 13 |
<meta name="author" content=""> |
14 |
<meta name="viewport" content="width=device-width; initial-scale=1.0">
|
|
14 |
<meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0">
|
|
15 | 15 |
|
16 | 16 |
{% block page.js %} |
17 | 17 |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> |
... | ... | |
29 | 29 |
|
30 | 30 |
<link href="https://fonts.googleapis.com/css?family=Antic" rel="stylesheet" type="text/css"> |
31 | 31 |
<link rel="stylesheet" type="text/css" href="{{ IM_STATIC_URL }}css/global.css"> |
32 |
<link rel="stylesheet" type="text/css" href="{{ IM_STATIC_URL }}css/print.css" media="print"> |
|
32 | 33 |
<!--[if lte IE 7]> |
33 | 34 |
<link rel="stylesheet" type="text/css" href="{{ IM_STATIC_URL }}css/ie7.css"> |
34 | 35 |
<![endif]--> |
Also available in: Unified diff