-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
67 lines (58 loc) · 2.96 KB
/
Copy pathindex.html
File metadata and controls
67 lines (58 loc) · 2.96 KB
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
<html>
<head>
<title>Cellwx</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<link rel="stylesheet" href="cellwxstyle.css">
<script src="http://momentjs.com/downloads/moment.min.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="gmaps.js"></script>
<script src="/MapsRender.js"></script>
<script>
$('.list').ajaxComplete(function () {
$('#sortedList').listview('refresh');
});
$(document).on("pagecreate", "#index", function () {
$(document).on("swipeleft swiperight", "#index", function (e) {
// We check if there is no open panel on the page because otherwise
// a swipe to close the left panel would also open the right panel (and v.v.).
// We do this by checking the data that the framework stores on the page element (panel: open).
if ($(".ui-page-active").jqmData("panel") !== "open") {
if (e.type === "swipeleft") {
} else if (e.type === "swiperight") {
$("#leftpanel").panel("open");
}
}
});
$.getJSON("/getStations.php", function (data) {
for (var i = 0; i < data.length; i++) {
$('.list').append("<li><a href='http://www.cellwx.org/graphs.html?imei=" + data[i][0] + "' data-ajax='false' class='ui-btn ui-btn-icon-right ui-icon-carat-r'>" + data[i][6] + "</a></li>");
}
});
$('.list').listview('refresh');
$('#leftpanel').html($('#listdiv').html());
});
</script>
</head>
<body>
<div data-url="index" data-role="page" id="index" data-ajax="true">
<div data-role="panel" id="leftpanel" data-position="left" data-display="overlay">
</div>
<div data-role="header" data-theme="b">
<h1>CellWX</h1>
<a href="#leftpanel" id="panelbutton" data-icon="carat-r" data-iconshadow="false">More Stations</a>
</div>
<div data-role="content">
<div id="listdiv">
<ul data-role="listview" id="sortedList" class="list" style="width: 272px">
<li data-role="list-divider">Stations</li>
</ul>
</div>
<div id="map"></div>
</div>
</div>
</body>
</html>