-
Notifications
You must be signed in to change notification settings - Fork 3
/
widget_list.html
executable file
·412 lines (382 loc) · 16.7 KB
/
widget_list.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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Niko Will
* @copyright 2013
* @license GPL <http://www.gnu.de>
* -----------------------------------------------------------------------------
*/
{% macro header() %}
<li data-icon="false">
<div class="nw_table">
<div class="text">Gerät</div>
<div class="status">Status</div>
<div class="buttons">Steuerung</div>
<div class="landscape">Uhr</div>
</div>
</li>
{% endmacro %}
/**
* Simple switch
*
* @param unique id for this widget
* @param name of the switch
* @param a gad/item for switching
* @param a gad/item for UZSU
* @param the pic for the 'on' state
* @param the pic for the 'off' state
* @param the minimum value if the slider is moved to total left (optional, default 0)
* @param the maximum value if the slider is moved to total right (optional, default 255)
* @param step between two values (optional, default 5)
*/
{% macro switch(id, txt, gad_switch, gad_uzsu, pic_on, pic_off) %}
{% import "basic.html" as basic %}
{% import "widget_uzsu.html" as visu %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.switch(id~'list_switch', gad_switch, pic_on, pic_off) }}
</div>
<div class="buttons"></div>
<div class="landscape">
{% if gad_uzsu %}
{{ visu.uzsu_icon(id~'UZSU', gad_uzsu, '', '', '', '', 'list') }}
{% endif %}
</div>
</div>
</li>
{% endmacro %}
/**
* Simple InterTechno Dimmer
*
* @param unique id for this widget
* @param name of the switch
* @param a gad/item for switching
* @param a gad/item for dimming
* @param a gad/item for UZSU
* @param the pic for the 'on' state
* @param the pic for the 'off' state
*/
{% macro it_dimmer(id, txt, gad_switch, gad_dim, gad_uzsu, pic_on, pic_off) %}
{% import "basic.html" as basic %}
{% import 'basic2.html' as basic2 %}
{% import "widget_uzsu.html" as visu %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.switch(id~'list_it_switch', '', gad_switch, pic_on, pic_off) }}
</div>
<div class="buttons">
{{ basic2.lbutton(id~'dim', gad_dim, icon1~'light_control.png', 'on') }}
{{ basic2.lbutton(id~'stop', gad_dim, icon0~'audio_stop.png', 'off') }}
</div>
<div class="landscape">
{% if gad_uzsu %}
{{ visu.uzsu_icon(id~'UZSU', gad_uzsu, '', '', '', '', 'list') }}
{% endif %}
</div>
</div>
</li>
{% endmacro %}
/**
* Simple InterTechno Blind
*
* @param unique id for this widget
* @param name of the switch
* @param a gad/item for roll - up
* @param a gad/item for roll - down
* @param a gad/item for UZSU
*/
{% macro it_blind(id, txt, gad_roll, gad_uzsu) %}
{% import 'basic2.html' as basic2 %}
{% import "widget_uzsu.html" as visu %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
<img class="icon" src='{{ icon0 }}fts_shutter_10.png'>
</div>
<div class="buttons">
{{ basic2.lbutton(id~'down', gad_roll, icon0~'control_arrow_down.png', 'on') }}
{{ basic2.lbutton(id~'up', gad_roll, icon0~'control_arrow_up.png', 'off') }}
</div>
<div class="landscape">
{% if gad_uzsu %}
{{ visu.uzsu_icon(id~'UZSU', gad_uzsu, '', '', '', '', 'list', 'on,off') }}
{% endif %}
</div>
</div>
</li>
{% endmacro %}
{% macro symbol(id, txt, gad, pic_on, pic_off) %}
{% import "basic.html" as basic %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.symbol(id~'list_symbol_off', gad, '', pic_off, 0) }}
{{ basic.symbol(id~'list_symbol_on', gad, '', pic_on, 1) }}
</div>
<div class="buttons"></div>
<div class="landscape">
</div>
</div>
</li>
{% endmacro %}
{% macro float(id, txt, gad, unit) %}
{% import "basic.html" as basic %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.float(id~'list_float', gad, unit) }}
</div>
<div class="buttons"></div>
<div class="landscape"></div>
</div>
</li>
{% endmacro %}
{% macro value(id, txt, gad, unit, colspan) %}
{% import "basic.html" as basic %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
{% if colspan %}
<div class=status">
{{ basic.value(id~'list_value', gad, unit) }}
</div>
{% else %}
<div class="status">
{{ basic.value(id~'list_value', gad, unit) }}
</div>
<div class="buttons"></div>
<div class="landscape"></div>
{% endif %}
</div>
</li>
{% endmacro %}
/**
* Standard dimmer with switching and dimming function
*
* @param unique id for this widget
* @param name of the dimmer
* @param a gad/item for switching
* @param a gad/item for dimming
* @param the minimum value if the slider is moved to total left (optional, default 0)
* @param the maximum value if the slider is moved to total right (optional, default 255)
* @param step between two values (optional, default 5)
*/
{% macro dimmer(id, txt, gad_switch, gad_value, gad_uzsu, min, max, step) %}
{% import "basic.html" as basic %}
{% import "widget_uzsu.html" as visu %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.shifter(id~'list_dimmer_shifter', gad_switch, gad_value, '', '', min, max) }}
</div>
<div class="buttons">
<a href="#{{ uid(page, id) }}_list_dimmer_popup" data-rel="popup" data-position-to="window">
{{ basic.value(id~'_list_dimmer_actual', gad_value) }}%
</a>
{{ popup.dimmer(uid(page, id)~'_list_dimmer_popup', txt, gad_switch, gad_value, min, max, step) }}
</div>
<div class="landscape">
{% if gad_uzsu %}
{{ visu.uzsu_icon(id~'UZSU', gad_uzsu, '', '', '', '', 'num') }}
{% endif %}
</div>
</div>
</li>
{% endmacro %}
/**
* Standard dimmer with switching and dimming function
*
* @param unique id for this widget
* @param name of the dimmer
* @param a gad/item for switching
* @param a gad/item for dimming
* @param the minimum value if the slider is moved to total left (optional, default 0)
* @param the maximum value if the slider is moved to total right (optional, default 255)
* @param step between two values (optional, default 5)
*/
{% macro dimmerEx(id, txt, gad_switch, gad_value, gad_uzsu, pic_on, pic_off, min, max, step) %}
{% import "basic.html" as basic %}
{% import "widget_uzsu.html" as visu %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.switch(id~'list_dimmer_switch', gad_switch, pic_on, pic_off) }}
</div>
<div class="buttons">
<a href="#{{ uid(page, id) }}_list_dimmerEx_popup" data-rel="popup" data-position-to="window">
{{ basic.value(id~'_list_dimmer_actual', gad_value) }}
</a>
{{ popup.dimmerEx(uid(page, id)~'_list_dimmerEx_popup', txt, gad_switch, gad_value, pic_on, pic_off, min, max, step) }}
</div>
<div class="landscape">
{% if gad_uzsu %}
{{ visu.uzsu_icon(id~'UZSU', gad_uzsu, '', '', '', '', 'num') }}
{% endif %}
</div>
</div>
</li>
{% endmacro %}
{% macro rgb(id, txt, gad_switch_r, gad_value_r, gad_switch_g, gad_value_g, gad_switch_b, gad_value_b, min, max, step, colors) %}
{% import "basic.html" as basic %}
{% import "widget_uzsu.html" as visu %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.rgb(id, gad_value_r, gad_value_g, gad_value_b, min, max, step, colors) }}
</div>
<div class="buttons">
<a href="#{{ uid(page, id) }}_list_rgb_popup" data-rel="popup" data-position-to="window" style="font-size: 0.6em;">
{{ basic.value(id~'_list_rgb_r_actual', gad_value_r) }};
{{ basic.value(id~'_list_rgb_g_actual', gad_value_g) }};
{{ basic.value(id~'_list_rgb_b_actual', gad_value_b) }}
</a>
{{ popup.rgb(uid(page, id)~'_list_rgb_popup', txt, gad_switch_r, gad_value_r, gad_switch_g, gad_value_g, gad_switch_b, gad_value_b, min, max, step) }}
</div>
<div class="landscape"></div>
</div>
</li>
{% endmacro %}
{% macro garage(id, txt, gad_switch, gad_value, min, max) %}
{% import "basic.html" as basic %}
{% import 'multimedia.html' as multimedia %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
<a href="#{{ uid(page, id) }}_camera_popup" data-rel="popup" data-position-to="window">
{{ multimedia.image(uid(page, id)~'Cam_mini','http://192.168.178.26:8080/shot.jpg', 'corner', '10s') }}
</a>
{{ popup.image(uid(page, id)~'_camera_popup', txt, 'http://192.168.178.26:8080', '/shot.jpg', 'corner', '1s') }}
</div>
<div class="buttons">{{ basic.shifter(uid(page, id)~'_tor', gad_switch, gad_value, icon1~'fts_garage_door_00.png', '', min, max) }}</div>
<div class="landscape"></div>
</div>
</li>
{% endmacro %}
{% macro blind(id, txt, gad_move, gad_stop, gad_pos, gad_shift, gad_angle, gad_uzsu, min, max, step) %}
{% import "basic.html" as basic %}
{% import 'basic2.html' as basic2 %}
{% import "widget_uzsu.html" as visu %}
{% import "icon.html" as icon %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
<a href="#{{ uid(page, id) }}_list_blind_popup" data-rel="popup" data-position-to="window">
/**{{ basic.shifter(id~'list_blind_shifter', '', gad_pos, icon1~'fts_shutter_00.png', icon0~'fts_shutter_10.png', min, max) }}*/
{{ icon.shutter(id~'list_blind_shifter', '', gad_pos, min, max) }}
</a>
{{ popup.blind(uid(page, id)~'_list_blind_popup', txt, gad_move, gad_stop, gad_pos, gad_shift, gad_angle, min, max, step) }}
</div>
<div class="buttons">
<div class="nw_table">
<div class="no_border">
{{ basic2.lbutton(id~'down', gad_move, icon0~'control_arrow_down.png', 'on') }}
</div>
<div class="no_border">
{{ basic2.lbutton(id~'stop', gad_stop, icon0~'audio_stop.png', 'stop') }}
</div>
<div class="no_border">
{{ basic2.lbutton(id~'up', gad_move, icon0~'control_arrow_up.png', 'off') }}
</div>
</div>
</div>
<div class="landscape">
{% if gad_uzsu %}
{{ visu.uzsu_icon(id~'UZSU', gad_uzsu, '', '', '', '', 'num') }}
{% endif %}
</div>
</div>
</li>
{% endmacro %}
{% macro rtr(id, txt, gad_actual, gad_set, gad_controlmode, gad_daytemp, gad_nighttemp, gad_window, gad_battery, gad_state, gad_txt, step, gad_humidity, gad_prog, gad_p1_sat, gad_p1_sun, gad_p1_mon, gad_p1_tue, gad_p1_wed, gad_p1_thu, gad_p1_fri, gad_init, gad_save, gad_restore, gad_p2_sat, gad_p2_sun, gad_p2_mon, gad_p2_tue, gad_p2_wed, gad_p2_thu, gad_p2_fri, gad_p3_sat, gad_p3_sun, gad_p3_mon, gad_p3_tue, gad_p3_wed, gad_p3_thu, gad_p3_fri) %}
{% import "basic.html" as basic %}
{% import "widget_uzsu.html" as visu %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
<a href="#{{ uid(page, id) }}_list_rtr_popup" data-rel="popup" data-position-to="window">
{{ basic.float(id~'_actual_value', gad_actual, '°') }}
</a>
</div>
<div class="buttons">
<a href="#{{ uid(page, id) }}_list_rtr_popup" data-rel="popup" data-position-to="window">
{{ basic.float(id~'_set_value', gad_set, '°') }}{% if gad_humidity %}{{ basic.value(id~'_humidity', gad_humidity, '%') }}{% endif %}
</a>
{{ popup.rtr(uid(page, id)~'_list_rtr_popup', txt, gad_actual, gad_set, gad_controlmode, gad_daytemp, gad_nighttemp, gad_window, gad_battery, gad_state, gad_txt, step, gad_humidity) }}
</div>
<div class="landscape">
<a href="#{{ uid(page, id) }}_list_rtr_timer_popup" data-rel="popup" data-position-to="window">
{{ basic.symbol(id~'auto', gad_controlmode, '', icon1~'time_clock.png', 'auto') }}
{{ basic.symbol(id~'man', gad_controlmode, '', icon0~'time_clock.png', 'manual') }}
{{ basic.symbol(id~'man', gad_controlmode, '', icon0~'time_clock.png', 'boost') }}
</a>
{{ popup.hmtctimer(uid(page, id)~'_list_rtr_timer_popup', txt, gad_prog, gad_p1_sat, gad_p1_sun, gad_p1_mon, gad_p1_tue, gad_p1_wed, gad_p1_thu, gad_p1_fri, gad_init, gad_save, gad_restore, gad_p2_sat, gad_p2_sun, gad_p2_mon, gad_p2_tue, gad_p2_wed, gad_p2_thu, gad_p2_fri, gad_p3_sat, gad_p3_sun, gad_p3_mon, gad_p3_tue, gad_p3_wed, gad_p3_thu, gad_p3_fri) }}
</div>
</div>
</li>
{% endmacro %}
{% macro rtrCC(id, txt, gad_actual, gad_set, gad_controlmode, gad_daytemp, gad_nighttemp, gad_window, gad_battery, gad_state, gad_txt, step, gad_valve, gad_p1_sat, gad__p1_sun, gad_p1_mon, gad_p1_tue, gad_p1_wed, gad_p1_thu, gad_p1_fri, gad_init, gad_save, gad_restore) %}
{% import "basic.html" as basic %}
{% import "widget_uzsu.html" as visu %}
{% import "widget_popup.html" as popup %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
<a href="#{{ uid(page, id) }}_list_rtrCC_popup" data-rel="popup" data-position-to="window">
{{ basic.float(id~'_actual_value', gad_actual, '°') }}
</a>
</div>
<div class="buttons">
<a href="#{{ uid(page, id) }}_list_rtrCC_popup" data-rel="popup" data-position-to="window">
{{ basic.float(id~'_set_value', gad_set, '°') }}{% if gad_valve %}{{ basic.value(id~'_valve_value', gad_valve, '%') }}{% endif %}
</a>
{{ popup.rtrCC(uid(page, id)~'_list_rtrCC_popup', txt, gad_actual, gad_set, gad_controlmode, gad_daytemp, gad_nighttemp, gad_window, gad_battery, gad_state, gad_txt, step, gad_valve) }}
</div>
<div class="landscape">
<a href="#{{ uid(page, id) }}_list_rtr_timer_popup" data-rel="popup" data-position-to="window">
{{ basic.symbol(id~'auto', gad_controlmode, '', icon1~'time_clock.png', 'auto') }}
{{ basic.symbol(id~'man', gad_controlmode, '', icon0~'time_clock.png', 'manual') }}
{{ basic.symbol(id~'man', gad_controlmode, '', icon0~'time_clock.png', 'boost') }}
</a>
{{ popup.hmtctimer(uid(page, id)~'_list_rtr_timer_popup', txt, '', gad_p1_sat, gad__p1_sun, gad_p1_mon, gad_p1_tue, gad_p1_wed, gad_p1_thu, gad_p1_fri, gad_init, gad_save, gad_restore) }}
</div>
</div>
</li>
{% endmacro %}
{% macro window(id, txt, gad_open, gad_duration) %}
{% import "basic.html" as basic %}
{% import 'basic2.html' as basic2 %}
<li data-icon="false">
<div class="nw_table">
<div class="text">{{ txt|e }}</div>
<div class="status">
{{ basic.symbol(id~'auf', gad_open, '', icon1~'fts_window_2w_open.png','open') }}
{{ basic.symbol(id~'zu', gad_open, '', icon0~'fts_window_2w.png','closed') }}
</div>
<div class="buttons">
</div>
<div class="landscape">
{{ basic2.timecounter(id~'duration', gad_duration, 'backend') }}
</div>
</div>
</li>
{% endmacro %}