forked from galadril/FlatZ-Frontpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frontpage.html
302 lines (291 loc) · 12.6 KB
/
frontpage.html
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset="utf-8">
<title>FlatZ Frontpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
<link href="css/icons.css" rel="stylesheet">
<link rel="stylesheet" href="css/main.css" />
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
<script type="text/javascript" src="js/jquery.noty.packaged.js"></script>
<script type="text/javascript" src="settings/settings.js"></script>
<script type="text/javascript" src="js/noty.js"></script>
<script type="text/javascript" src="js/methods.js"></script>
<script type="text/javascript" src="js/jquery.stayInWebApp.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<style type="text/css">
body {
padding-top: 60px;
}
</style>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Google Fonts call. Font Used Open Sans & Raleway -->
<link href="http://fonts.googleapis.com/css?family=Raleway:400,300" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
</head>
<body>
<div class="navbar-nav navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="frontpage.html">FlatZ Frontpage</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a class="stay" href="frontpage.html"><i class="icon-home icon-white"></i> Home</a></li>
<script>
if ($.Lights) {
document.write('<li><a class="stay" href="lights.html"><i class="icon-th icon-white"></i> Lights</a></li>');
}
</script>
<script>
if ($.Graph) {
document.write('<li><a class="stay" href="graph.html"><i class="icon-th icon-white"></i> Graph</a></li>');
}
</script>
<script>
if ($.Camera) {
document.write('<li><a class="stay" href="camera.html"><i class="icon-th icon-white"></i> Camera</a></li>');
}
</script>
<script>
if ($.Weather) {
document.write('<li ><a class="stay" href="weather.html"><i class="icon-th icon-white"></i> Weather</a></li>');
}
</script>
<script>
if ($.News) {
document.write('<li ><a class="stay" href="news.html"><i class="icon-th icon-white"></i> News</a></li>');
}
</script>
<script>
if ($.Traffic) {
document.write('<li ><a class="stay" href="traffic.html"><i class="icon-th icon-white"></i> Traffic</a></li>');
}
</script>
<script>
if ($.Log) {
document.write('<li><a class="stay" href="logs.html"><i class="icon-th icon-white"></i> Logs</a></li>');
}
</script>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
<div class="container">
<!-- FIRST ROW OF Domoticz -->
<div class="row">
<!-- SWITCHES Domoticz -->
<div class="col-sm-3 col-x-3">
<div class="dash-unit" style="height: 610px;">
<dtitle>Switches</dtitle>
<hr>
<!-- ICON -->
<div class="info-user">
<span aria-hidden="true" class="li_params fs2"></span>
</div>
<br>
<center>
<dtitle id="desc_cell1"></dtitle>
</center>
<center>
<div id="cell1" style="margin-top:5px;width:60px;"></div>
</center>
<center>
<dtitle id="desc_cell2"></dtitle>
</center>
<center>
<div id="cell2" style="margin-top:5px;width:60px;"></div>
</center>
<center>
<dtitle id="desc_cell3"></dtitle>
</center>
<center>
<div id="cell3" style="margin-top:5px;width:60px;"></div>
</center>
<center>
<dtitle id="desc_cell4"></dtitle>
</center>
<center>
<div id="cell4" style="margin-top:5px;width:60px;"></div>
</center>
<center>
<dtitle id="desc_cell5"></dtitle>
</center>
<center>
<div id="cell5" style="margin-top:5px;width:60px;"></div>
</center>
<center>
<dtitle id="desc_cell6"></dtitle>
</center>
<center>
<div id="cell6" style="margin-top:5px;width:60px;"></div>
</center>
</div>
</div>
<!-- DONUT CHART -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell7"></dtitle>
<hr>
<div id="badkamer" style="height: 11.313em;width: 11.313em;margin: auto;"></div>
<h2 id="cell7"></h2>
<span class="text" id="cell70" style="float:right;padding-right:10px;font-size: 10px;color: #9E9E9E;" />
</div>
</div>
<!-- DONUT CHART -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell8"></dtitle>
<hr>
<div id="woonkamer" style="height: 11.313em;width: 11.313em;margin: auto;"></div>
<h2 id="cell8"></h2>
<span class="text" id="cell80" style="float:right;padding-right:10px;font-size: 10px;color: #9E9E9E;" />
</div>
</div>
<!-- DONUT CHART -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell10"></dtitle>
<hr>
<div id="buiten" style="height: 11.313em;width: 11.313em;margin: auto;"></div>
<h2 id="cell10"></h2>
<span class="text" id="cell100" style="float:right;padding-right:10px;font-size: 10px;color: #9E9E9E;" />
</div>
</div>
</div>
<!-- /row -->
<!-- SECOND ROW -->
<div class="row secondrowfix">
<div class="col-sm-3 col-lg-3">
<div class="half-unit">
<dtitle>Local Time</dtitle>
<hr>
<div class="clockcenter">
<digiclock>12:45:25</digiclock>
</div>
</div>
<div class="half-unit">
<dtitle id="desc_cell13"></dtitle>
<hr>
<div class="cont">
<p><span id="cell13"></span></p>
</div>
</div>
</div>
<div class="col-sm-3 col-lg-3">
<div class="half-unit">
<dtitle id="desc_cell11"></dtitle>
<hr>
<div class="info-user">
<span aria-hidden="true" class="li_news fs2"></span>
</div>
<div style="padding-left:20px" id="cell11"></div>
</div>
<div class="half-unit">
<dtitle id="desc_cell12"></dtitle>
<hr>
<div class="info-user">
<span aria-hidden="true" class="li_news fs2"></span>
</div>
<div style="padding-left:20px" id="cell12"></div>
</div>
</div>
<!-- GRAPH CHART - lineandbars.js file -->
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell9"></dtitle>
<hr>
<div class="section-graph">
<div class="info-user">
<span aria-hidden="true" class="li_megaphone fs2"></span>
</div>
<div class="graph-info">
<i class="graph-arrow"></i>
<span id="cell9" class="graph-info-big">--</span>
<br/>
<br/> Today: <span id="cell39" style="font-size: 12px;color: #9E9E9E;">--</span> Total: <span id="cell29" style="font-size: 12px;color: #9E9E9E;">--</span>
</div>
</div>
<br/>
<br/>
<br/>
<div class="text" id="cell19" style="float:right;padding-right:10px;font-size: 10px;color: #9E9E9E;" />
</div>
</div>
</div>
<!-- /span3 -->
</div>
<!-- /container -->
<script type="text/javascript" src="js/clock.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$(function() {
$.stayInWebApp('a.stay');
});
loadCSS("css/" + $.theme);
console.log($.domoticzurl);
RefreshDashboardData();
});
function SwitchToggle(idx, switchcmd) {
$.ajax({
url: $.domoticzurl + "/json.htm?type=command¶m=switchlight" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&level=0",
async: false,
dataType: 'json',
success: function() {
//console.log('SUCCES');
var n = noty({
text: 'Switch toggled',
type: 'success'
});
RefreshDashboardData();
},
error: function() {
console.log('ERROR');
var n = noty({
text: 'Failed to toggle switch...',
type: 'error'
});
}
});
}
function SwitchScene(idx, switchcmd) {
//console.log($.domoticzurl + "/json.htm?type=command¶m=switchscene" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&passcode=&jsoncallback=?");
$.ajax({
url: $.domoticzurl + "/json.htm?type=command¶m=switchscene" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&passcode=&jsoncallback=?",
async: false,
dataType: 'json',
success: function() {
//console.log('SUCCES');
var n = noty({
text: 'Switch toggled',
type: 'success'
});
RefreshScenesDashboard();
},
error: function() {
//console.log('ERROR');
var n = noty({
text: 'Failed to toggle switch...',
type: 'error'
});
}
});
}
</script>
</body>
</html>