forked from PDXostc/rvi_hvac_mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
218 lines (203 loc) · 8.18 KB
/
index.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
<!DOCTYPE html>
<!--
* Copyright (c) 2015, Intel Corporation, Jaguar Land Rover
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*
-->
<html id="hvac-app">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>DNA_HVAC</title>
<link rel="stylesheet" href="./css/common.css" />
<link rel="stylesheet" href="./css/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="./css/HVAC.css" />
<link rel="stylesheet" href="./css/nouislider.HVAC-768.css" />
<script type="text/javascript" src="./js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="./js/jquery.nouislider.js"></script>
<script type="text/javascript" src="./js/hvacController.js"></script>
<script type="text/javascript" src="./js/rvi.js"></script>
<script type="text/javascript" src="./js/main.js"></script>
<script type="text/javascript">
if ((navigator.userAgent.match(/iPad/i))) {
document.write("<link type=\"text\/css\" rel=\"stylesheet\" media=\"screen\" href=\"css/HVAC_ipad.css\" charset=\"utf-8\" \/>");
document.write("<meta name=\"viewport\" content=width=768px, height=1024px, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0 \/>");
} else if (navigator.userAgent.match(/iPhone/i)) {
document.write("<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" \/>");
document.write("<link type=\"text\/css\" rel=\"stylesheet\" media=\"screen\" href=\"css/HVAC_iphone.css\" charset=\"utf-8\" \/>");
document.write("<link type=\"text\/css\" rel=\"stylesheet\" media=\"screen\" href=\"css/nouislider.HVAC-720.css\" charset=\"utf-8\" \/>");
document.write("<meta name=\"viewport\" content=\'width=device-width, user-scalable=0\' \/>");
} else if (navigator.userAgent.match(/Android/i)) {
document.write("<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" \/>");
document.write("<link type=\"text\/css\" rel=\"stylesheet\" media=\"screen\" href=\"css/HVAC_iphone.css\" charset=\"utf-8\" \/>");
document.write("<link type=\"text\/css\" rel=\"stylesheet\" media=\"screen\" href=\"css/nouislider.HVAC-720.css\" charset=\"utf-8\" \/>");
document.write("<meta name=\"viewport\" content=\'width=720, height=1080, user-scalable=0\' \/>");
} else {
document.write("<link type=\"text\/css\" rel=\"stylesheet\" media=\"screen\" href=\"css/HVAC.css\" \/>");
document.write("<meta name=\"viewport\" content=\'width=768, height=1024, user-scalable=no\' \/>");
}
</script>
<script>
$(document).ready(function() {
$(".fa").click(function(ev) {
showPhoneSetting();
});
$("#setPhone").click(function(ev) {
var phone = $("#phone").val();
setVin($("#rviVinInput").val());
hidePhoneSetting();
});
$('#setVinAndPassword').click(function(ev) {
var setVinResult = setVin();
});
$("form").submit(function() {
return false;
});
$("#qr-code").click(function() {
console.log("clicked the qr-code camera button");
if ($("#reader-container").hasClass("fadeout")) {
$("#reader-container").removeClass("fadeout").addClass("fadein");
} else {
$("#reader-container").removeClass("fadein").addClass("fadeout");
}
});
if(localStorage['rviVin'] != undefined){
subscribeToVin();
}
});
function hideMessageModal() {
$("#resultMessage").addClass('hidden');
console.log("hideMessageModal");
}
function hideSettingsModal() {
$("#settings").addClass('hidden');
console.log("hideSettingsModal");
}
function showPhoneSetting() {
$("#settings").removeClass('hidden');
$("#phone_input").show();
$("#rviVinInput").val(localStorage["rviVin"]);
$("#password_input").hide();
}
function hidePhoneSetting() {
$("#settings").addClass('hidden');
$("#phone_input").hide();
}
</script>
</head>
<body>
<div id="base">
<div id="app">
<div class="flex-item">
<div class="fa fa-gear fa-2x"> </div>
<div id="settings" class="modal hidden">
<div class="modal-bkgrnd">
<span onclick="hideSettingsModal()" class="close-button" type="reset"></span>
<form id="phone_input">
<label for="">
<h2>Enter ID</h2></label>
<input id="rviVinInput" class="text-input" size="45" placeholder="Nickname, ID or VIN number">
<div class="input-group">
<button id="qr-code" class="qrcode-button"></button>
<button id="setPhone" class="button-blue">submit</button>
</div>
<div id="reader-container" class="flex-center fadeout">
<div id="reader" class="reader center flex-center"></div>
</div>
</form>
</div>
</div>
<div class="static_parts_bg"></div>
<div id="hazard_btn" class="hazard_btn"></div>
<div class="climate_labels">
<h6 class="label_borders"><strong>L CLIMATE</strong></h6>
<h6 class="label_borders"><strong>R CLIMATE</strong></h6>
</div>
<div id="left_seat_btn" class="left_seat_btn">
<div class="left_heat_seat_off"></div>
<div id="left_seat_btn_stage" class="left_heat_seat_on stage1"></div>
</div>
<div id="right_seat_btn" class="right_seat_btn">
<div class="right_heat_seat_off"></div>
<div id="right_seat_btn_stage" class="right_heat_seat_on stage1"></div>
</div>
<div class="left_num_bg">
<div id="viewport" class="scrollable left">
<ul class="temperature">
<li>LO</li>
<li>16°</li>
<li>17°</li>
<li>18°</li>
<li>19°</li>
<li>20°</li>
<li>21°</li>
<li>22°</li>
<li>23°</li>
<li>24°</li>
<li>25°</li>
<li>26°</li>
<li>27°</li>
<li>28°</li>
<li>HI</li>
<li></li>
</ul>
</div>
</div>
<div class="left_num_cover"></div>
<div class="right_heat_seat"></div>
<div class="right_num_bg">
<div id="viewport" class="scrollable right">
<ul class="temperature">
<li>LO</li>
<li>16°</li>
<li>17°</li>
<li>18°</li>
<li>19°</li>
<li>20°</li>
<li>21°</li>
<li>22°</li>
<li>23°</li>
<li>24°</li>
<li>25°</li>
<li>26°</li>
<li>27°</li>
<li>28°</li>
<li>HI</li>
<li></li>
</ul>
</div>
</div>
<div class="right_num_cover"></div>
<div id="noUiSliderLeft" class="noUiSliderLeft"></div>
<div id="noUiSliderRight" class="noUiSliderRight"></div>
<div class="fanSpeedOn"></div>
<div id="fanSpeedSlider" class="noUiSliderFan"></div>
<!-- buttons bottom-->
<div id="fan_dir_down_btn" class="fan_dir_down_btn"></div>
<div id="fan_dir_right_btn" class="fan_dir_right_btn"></div>
<div id="fan_dir_up_btn" class="fan_dir_up_btn"></div>
<div id="fan_control_ac" class="fan_control_ac"></div>
<div id="fan_control_auto" class="fan_control_auto"></div>
<div id="fan_control_circ" class="fan_control_circ"></div>
<div id="defrost_max_btn" class="defrost_max_btn"></div>
<div id="defrost_rear_btn" class="defrost_rear_btn"></div>
<div id="defrost_front_btn" class="defrost_front_btn"></div>
<div id="bottomBarLogoImg">
<div class="bottomBarLogo"></div>
</div>
<div id="resultMessage" class="modal hidden">
<div class="modal-bkgrnd">
<span onclick="hideMessageModal()" class="close-button" type="reset"></span>
<h3>Success!</h3>
<p>You have saved or updated information on this device.</p>
</div>
</div>
</div>
<!--end of flex-item -->
<!-- END HTML ELEMENTS -->
</div>
</div>
</body>
</html>