-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUCONN4.10.htm
176 lines (137 loc) · 4.76 KB
/
UCONN4.10.htm
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>
<body>
<div data-role="content">
<div class="ui-grid-a">
<div class="ui-block-a">
<div data-role="fieldcontain" class="ui-field-contain">
</div>
<div class="ui-controlgroup-controls ">
<div class="ui-radio"><label for="date_style_0" class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-first-child ui-radio-off">May 1 2015</label><input type="radio" name="date_style" id="date_style_0" value="0" checked data-cacheval="false">
</div>
</div></fieldset>
</div>
<div class="ui-block-b">
<div data-role="fieldcontain" class="ui-field-contain">
</div>
<div class="ui-controlgroup-controls ">
<div class="ui-radio"><label for="date_style_1" class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-first-child ui-radio-off">1 May 2015</label><input type="radio" name="date_style" id="date_style_1" value="1" data-cacheval="false">
</div>
</div></fieldset>
</div>
</div>
Date Style
<!-- Setup for Saved Date value: -->
<script>
if(localStorage.getItem("savedDateType_UCONN")) {
var DateValue = localStorage.getItem('savedDateType_UCONN');
if (DateValue == 0) {
document.getElementById("date_style_0").checked = 1;
} else { //Must be 1
document.getElementById("date_style_1").checked= 1;
}
} else { //Default to 0
document.getElementById("date_style_0").checked = 1;
}
</script>
<div class="ui-grid-a">
<div class="ui-block-a">
<div data-role="fieldcontain" class="ui-field-contain">
</div>
<div class="ui-controlgroup-controls ">
<div class="ui-radio"><label for="bt_vibe_0" class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-first-child ui-radio-off">Vibrate</label><input type="radio" name="bt_vibe" id="bt_vibe_0" value="0" checked data-cacheval="false">
</div>
</div></fieldset>
</div>
<div class="ui-block-b">
<div data-role="fieldcontain" class="ui-field-contain">
</div>
<div class="ui-controlgroup-controls ">
<div class="ui-radio"><label for="bt_vibe_1" class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-first-child ui-radio-off">No Vibrate</label><input type="radio" name="bt_vibe" id="bt_vibe_1" value="1" data-cacheval="false">
</div>
</div></fieldset>
</div>
</div>
Vibrate on loss of BT
<!-- Setup for Saved BT value: -->
<script>
if(localStorage.getItem("savedBTVibe_UCONN")) {
var BTVibeValue = localStorage.getItem('savedBTVibe_UCONN');
if (BTVibeValue == 0) {
document.getElementById("bt_vibe_0").checked = 1;
} else { //Must be 1
document.getElementById("bt_vibe_1").checked= 1;
}
} else { //Default to 0
document.getElementById("bt_vibe_0").checked = 1;
}
</script>
<HR>
<div class="ui-grid-a">
<div class="ui-block-a">
<button type="submit" data-theme="b" id="b-submit">Submit</button>
</div>
<div class="ui-block-b">
<button type="submit" data-theme="c" id="b-cancel">Cancel</button>
</div>
</div>
<P><P> Version 4.10, Made by WA1OUI
</div>
</div>
<script>
function getQueryParam(variable, default_) {
var query = location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (pair[0] == variable)
return decodeURIComponent(pair[1]);
}
return default_ || false;
}
function saveOptions(){
var date_info = "us";
var BTVibeValue = "0";
if (document.getElementById("date_style_1").checked) {
date_info = "intl";
}
if (document.getElementById("bt_vibe_1").checked) {
BTVibeValue = "1";
}
var options = {
"0" : date_info,
"1" : BTVibeValue,
}
return options;
}
$().ready(function() {
$("#b-cancel").click(function() {
document.location = getQueryParam('return_to', 'pebblejs://close');
});
$("#b-submit").click(function() {
if (document.getElementById("date_style_0").checked == 1) {
var savedDate = 0;
} else {
var savedDate = 1;
}
localStorage.setItem('savedDateType_UCONN', savedDate);
if (document.getElementById("bt_vibe_0").checked == 1) {
var savedBTVibe = 0;
} else {
var savedBTVibe = 1;
}
localStorage.setItem('savedBTVibe_UCONN', savedBTVibe);
var return_to = getQueryParam('return_to', 'pebblejs://close#');
document.location = return_to + encodeURIComponent(JSON.stringify(saveOptions()));
});
});
</script>
</body>
</html>