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
|
<div>
<form method="post" action="?do=locationinfo" id="configForm">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="updateConfig">
<input type="hidden" name="id" value="{{id}}">
<div style="float: left;">
<Label>{{lang_server}}</Label><br>
<select name="serverid">
{{#serverlist}}
<option id="serverOption-{{sid}}" value="{{sid}}">{{sname}}</option>
{{/serverlist}}
</select>
</div>
<div style="float: left; margin-left: 15px;">
<Label>{{lang_serverRoomId}}</Label><br>
<input name="serverroomid" id="serverroomid" value="{{serverroomid}}" style="width: 50px; text-align: center;"></input>
</div>
<br><br><br><br>
<div style="float: left;">
<Label>{{lang_language}}</Label><br>
<select name="language">
<option value="en" id="en">{{lang_languageEn}}</option>
<option value="de" id="de">{{lang_languageDe}}</option>
<option value="pt" id="pt">{{lang_languagePt}}</option>
</select>
</div>
<div style="float: left; margin-left: 15px;">
<Label>{{lang_mode}}</Label><br>
<select name="mode" onchange=vertical_cb(this.value);>
<option value="1" id="mode1">{{lang_mode1}}</option>
<option value="2" id="mode2">{{lang_mode2}}</option>
<option value="3" id="mode3">{{lang_mode3}}</option>
<option value="4" id="mode4">{{lang_mode4}}</option>
</select>
</div>
<div style="float: left; margin-left: 15px;">
<input name="vertical" id="cb_vertical" type="checkbox"/> {{lang_vertical}}<br>
<input name="eco" id="cb_eco" type="checkbox"/> {{lang_ecoMode}}<br>
<input name="autoscale" id="cb_autoScale" type="checkbox"/> {{lang_autoScale}}
</div>
<div style="float: left; margin-left: 15px;">
<Label data-toggle="tooltip" title="{{lang_daysToShowTooltip}}">{{lang_daysToShow}}</Label><br>
<select name="daystoshow">
<option value="1" id="day1">1</option>
<option value="2" id="day2">2</option>
<option value="3" id="day3">3</option>
<option value="4" id="day4">4</option>
<option value="5" id="day5">5</option>
<option value="6" id="day6">6</option>
<option value="7" id="day7">7</option>
</select>
</div>
<div style="float: left; margin-left: 15px;">
<Label>{{lang_rotation}}</Label><br>
<select name="rotation">
<option value="0" id="rotation0">{{lang_rotation0}}</option>
<option value="3" id="rotation3">{{lang_rotation3}}</option>
<option value="2" id="rotation2">{{lang_rotation2}}</option>
<option value="1" id="rotation1">{{lang_rotation1}}</option>
</select>
</div>
<br><br><br><br>
<Label data-toggle="tooltip" title="{{lang_scaleTooltip}}">{{lang_scale}}</Label><br>
<span id="scale">50 %</span><input name="scale" id="sl_scale" type="range" step="1" min="10" max="90" value="50" style="width: 300px;" oninput="showScaleValue(this.value)"/>
<br><br>
<Label data-toggle="tooltip" title="{{lang_switchTimeTooltip}}">{{lang_switchTime}}</Label><br>
<span id="switch">20 {{lang_sec}}</span><input name="switchtime" id="sl_switch" type="range" step="1" min="1" max="120" value="20" style="width: 300px;" oninput="showSwitchValue(this.value)"/>
<br><br>
<div>
<div style="float: left;">
<Label data-toggle="tooltip" title="{{lang_calupdateTooltip}}">{{lang_calupdate}}</Label><br>
<input id="updateCalendar" name="calupdate" type="number" style="width: 50px; text-align: center;" min="0" max="1440"/> {{lang_min}}
</div>
<div style="float: left; margin-left: 15px;">
<Label data-toggle="tooltip" title="{{lang_roomupdateTooltip}}">{{lang_roomupdate}}</Label><br>
<input id="updateRoom" name="roomupdate" type="number" style="width: 50px; text-align: center;" min="0" max="86400"/> {{lang_sec}}
</div>
<div style="float: left; margin-left: 15px;">
<Label data-toggle="tooltip" title="{{lang_configupdateTooltip}}">{{lang_configupdate}}</Label><br>
<input id="updateConfig" name="configupdate" type="number" style="width: 50px; text-align: center;" min="0" max="1440"/> {{lang_min}}
</div>
</div>
<br><br><br><br>
<button type="submit" class="btn btn-primary">{{lang_save}}</button>
</form>
</div>
<script type="text/javascript">
loadValues();
function loadValues() {
$("#{{language}}").attr("selected","selected");
$('#serverOption-{{serverid}}').attr("selected", "selected");
var mode = $("#{{mode}}");
if (!mode.length) {
mode = $("#mode1");
}
mode.attr("selected","selected");
vertical_cb(mode.val());
if('{{vertical}}' == true){
$("#cb_vertical").prop("checked", true);
}
if('{{eco}}' == true){
$("#cb_eco").prop("checked", true);
}
if('{{scaledaysauto}}' == true){
$("#cb_autoScale").prop("checked", true);
}
var day = $("#{{daystoshow}}");
if (!day.length) {
day = $("#day7");
}
day.attr("selected","selected");
var rotation = $("#{{rotation}}");
if (!rotation.length) {
rotation = $("#rotation0");
}
rotation.attr("selected","selected");
var scaleVal = '{{scale}}';
if (scaleVal == '') {
scaleVal = 50;
}
$('#sl_scale').attr('value', '{{scale}}');
showScaleValue(scaleVal);
var switchVal = '{{switchtime}}';
if (switchVal == '') {
switchVal = 20;
}
$("#sl_switch").attr('value', switchVal);
showSwitchValue(switchVal);
var calupdate = '{{calupdate}}';
if (!calupdate.length) {
calupdate = 30;
}
$("#updateCalendar").attr("value", calupdate);
var roomupdate = '{{roomupdate}}';
if (!roomupdate.length) {
roomupdate = 30;
}
$("#updateRoom").attr("value", roomupdate);
var configupdate = '{{configupdate}}';
if (!configupdate.length) {
configupdate = 180;
}
$("#updateConfig").attr("value", configupdate);
}
function showScaleValue(newValue) {
$("#scale").text(newValue + " %");
}
function showSwitchValue(newValue) {
$("#switch").text(newValue + " " + '{{lang_sec}}');
}
function vertical_cb(value) {
var cb = $("#cb_vertical");
if (value == 1) {
cb.prop("disabled", false);
} else {
cb.prop("disabled", true);
cb.prop("checked", false);
}
}
</script>
|