global.js
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
function initLoader() {
resizeApp();
}
function openPentaho(){
window.open();
document.location.href='http://bi.cti.fortaleza.ce.gov.br:8084/pentaho/content/pentaho-cdf-dd/Render?solution=Frotas&path=/Dashboard&file=ug_periodo_consumo.wcdf';
}
function resizeApp() {
document.getElementById('content').style.height = (currentHeight() - 50) + 'px';
document.getElementById('contentMap').style.height = (currentHeight() - 50) + 'px';
try {
var nameSize = document.getElementById('userLogin').firstChild.nodeValue.length;
if( document.getElementById('innerPopup_body') ){
document.getElementById('innerPopup_body').height = (currentHeight() - 230) + 'px';
}
if( document.getElementById('innerPopup') ){
document.getElementById('innerPopup').height = (currentHeight()) + 'px';
}
} catch (e) {}
window.onresize = resizeApp;
openCloseList(true);
}
function currentWidth() {
var width = 0;
if (typeof(window.innerWidth) == 'number') {
width = window.innerWidth;
} else if (document.documentElement && document.documentElement.clientWidth) {
width = document.documentElement.clientWidth;
} else if (document.body && document.body.clientWidth) {
width = document.body.clientWidth;
}
return width;
}
function currentHeight() {
var height = 0;
if (typeof(window.innerHeight) == 'number') {
height = window.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
height = document.documentElement.clientHeight;
} else if (document.body && document.body.clientHeight) {
height = document.body.clientHeight;
}
return height;
}