-
Notifications
You must be signed in to change notification settings - Fork 4
/
intro.html
94 lines (88 loc) · 4.03 KB
/
intro.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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/misc.css">
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css">
<title>NRV Park Search</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>
<div data-role="page" id="page1" style="">
<div class="jumbotron header-bg">
<h1 style="color:white; background-color:black; opacity:0.7;">NRV Park Search</h1>
</div>
<div class="container" id="search">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<p>Based on your location and amenity preferences, this site will return the nearest parks in and around the New River Valley in Virginia.</p>
<p>You can share your location by clicking the checkbox below, or you can type in a nearby address on the next screen.</p>
<form method="get" action="index.html" class="form-horizontal" data-ajax="false">
<div id="locationArea">
<label for="location"><input type="checkbox" id="location" name="location"> Use my location</label>
</div>
<input type="hidden" name="lat" id="lat" />
<input type="hidden" name="lon" id="lon" />
<p id="busy" style="display:none;">Getting your location...please wait</p>
<div id="thanksContainer"><input class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" id="thanks" type="submit" value="Dismiss and Begin Searching" /></div>
</form>
</div>
</div>
</div>
</div>
<!-- jquery: 1.12.4 -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script src="js/misc.js"></script>
<script type="text/javascript">
$("#thanks").click(function() {
setCookie("ack",1,30);
});
$('#page1').on('pagecreate', function() {
uncheck();
});
$("#location").click(function() {
if (!$(this).prop("checked"))
{
$("#lat").val("");
$("#lon").val("");
return;
}
busy(true);
geoLocation.getLocation().then(function(position) {
$("#lat").val(position.coords.latitude);
$("#lon").val(position.coords.longitude);
busy(false);
}).fail(function(err) {
uncheck();
busy(false);
showError(err);
});
});
function uncheck() {
$("#location").prop('checked', false);
$("#location").removeAttr('checked').checkboxradio("refresh");
}
function busy(isBusy) {
if(isBusy) {
$.mobile.loading( "show" );
$("#thanksContainer").hide();
$("#busy").show();
} else {
$.mobile.loading( "hide" );
$("#thanksContainer").show();
$("#busy").hide();
}
}
</script>
</body>
</html>