forked from galadril/FlatZ-Frontpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lights.html
320 lines (296 loc) · 13.2 KB
/
lights.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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<!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 href="css/slider.css" rel="stylesheet">
<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/color.css" />
<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-ui.min.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;
}
button,
input,
select,
textarea {
background: grey none repeat scroll 0 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.k-button .cancel {
display: none;
}
.k-button {}
</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><a class="stay" href="frontpage.html"><i class="icon-home icon-white"></i> Home</a></li>
<script>
if ($.Lights) {
document.write('<li class="active"><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>
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell7"></dtitle>
<hr>
<div class="info-user" style="float:right;padding-right:20px;">
<span aria-hidden="true" class="li_bulb"></span>
</div>
<center>
<div id="cell7" style="margin-top:5px;width:60px;"></div>
</center>
<div class="flat-slider" id="slider_cell7" style="margin-top:28px"></div>
<center>
<div id="color_cell7" class="picker"></div>
</center>
</div>
</div>
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell8"></dtitle>
<hr>
<div class="info-user" style="float:right;padding-right:20px;">
<span aria-hidden="true" class="li_bulb"></span>
</div>
<center>
<div id="cell8" style="margin-top:5px;width:60px;"></div>
</center>
<div class="flat-slider" id="slider_cell8" style="margin-top:28px"></div>
<center>
<div id="color_cell8" class="picker"></div>
</center>
</div>
</div>
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell10"></dtitle>
<hr>
<div class="info-user" style="float:right;padding-right:20px;">
<span aria-hidden="true" class="li_bulb"></span>
</div>
<center>
<div id="cell10" style="margin-top:5px;width:60px;"></div>
</center>
<div class="flat-slider" id="slider_cell10" style="margin-top:28px"></div>
<center>
<div id="color_cell10" class="picker"></div>
</center>
</div>
</div>
</div>
<!-- /row -->
<!-- SECOND ROW -->
<div class="row secondrowfix">
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell11"></dtitle>
<hr>
<div class="info-user" style="float:right;padding-right:20px;">
<span aria-hidden="true" class="li_bulb"></span>
</div>
<center>
<div id="cell11" style="margin-top:5px;width:60px;"></div>
</center>
<div class="flat-slider" id="slider_cell11" style="margin-top:28px"></div>
<center>
<div id="color_cell11" class="picker"></div>
</center>
</div>
</div>
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell12"></dtitle>
<hr>
<div class="info-user" style="float:right;padding-right:20px;">
<span aria-hidden="true" class="li_bulb"></span>
</div>
<center>
<div id="cell12" style="margin-top:5px;width:60px;"></div>
</center>
<div class="flat-slider" id="slider_cell12" style="margin-top:28px"></div>
<center>
<div id="color_cell12" class="picker"></div>
</center>
</div>
</div>
<div class="col-sm-3 col-lg-3">
<div class="dash-unit">
<dtitle id="desc_cell13"></dtitle>
<hr>
<div class="info-user" style="float:right;padding-right:20px;">
<span aria-hidden="true" class="li_bulb"></span>
</div>
<center>
<div id="cell13" style="margin-top:5px;width:60px;"></div>
</center>
<div class="flat-slider" id="slider_cell13" style="margin-top:28px"></div>
<center>
<div id="color_cell13" class="picker"></div>
</center>
</div>
</div>
<!-- /span3 -->
</div>
<!-- /container -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$(function() {
$.stayInWebApp('a.stay');
});
loadCSS("css/" + $.theme);
loadJS("js/kendo.all.min.js"); //load this script later (big one)
loadJS("js/colors.js"); //load this script later (big one)
RefreshSwitchData();
RefreshLightData();
});
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'
});
RefreshLightData();
RefreshSwitchData();
},
error: function() {
console.log('ERROR');
var n = noty({
text: 'Failed to toggle switch...',
type: 'error'
});
}
});
}
</script>
</body>
</html>