-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpecRunner.html
178 lines (168 loc) · 6.84 KB
/
SpecRunner.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner v2.1.3</title>
<link rel="shortcut icon" type="image/png" href="js/libs/jasmine-2.1.3/jasmine_favicon.png">
<link rel="stylesheet" href="js/libs/jasmine-2.1.3/jasmine.css">
<link rel="stylesheet" href="css/libs/bootstrap.min.css">
<link rel="stylesheet" href="css/geolocation.css">
</head>
<body class="container">
<!-- Content -->
<div class="hidden">
<h1 id="title">GeoLocation Test</h1>
<hr/>
<div id="messageCenter"></div>
<section id="content" class="container">
<div class="dashboard row">
<div class="col-lg-6 col-sm-12">
<div class="row">
<h4>Locate yourself</h4>
<button id="btnGetMyLocation" class="btn btn-default btn-success">Locate me</button>
<hr/>
</div>
<div class="row">
<div class="col-xs-12">
<h4>Locate a website</h4>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<form id="formGeoLocation">
<div class="row">
<div class="col-xs-8">
<div class="input-group">
<span class="input-group-addon" id="basic-addon3">http://</span>
<input id="txtWebsite" type="text" class="form-control" required name="website" autocomplete="off" />
</div>
</div>
<div class="col-xs-4">
<input class="btn btn-success" type="submit" value="Locate website" />
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div id="messageCenter"></div>
</div>
</div>
</form>
</div>
</div>
<hr/>
<div class="row">
<div class="col-xs-4">
<h4>Reset</h4>
<button id="btnResetLocation" class="btn btn-default">Reset location</button>
</div>
<div class="col-xs-6">
<h4>History</h4>
<button id="historyBtn" class="btn btn-default">View History</button>
</div>
</div>
</div>
<div id="location" class="col-lg-6 col-sm-12 text-center">
</div>
</div>
<hr/>
<div class="row">
<div class="col-xs-12">
<div id="historyCenter"></div>
</div>
</div>
<div class="row">
<hr/>
<div id="googleMap" class="col-lg-12 col-sm-12"></div>
</div>
</section>
</div>
<!-- Templates -->
<script id="locationTemplate" type="text/x-handlebars">
<h4>Estimated location</h4>
<table id="locationTable" align="center" class="table table-striped empty">
<tbody>
<tr>
<td class="field-name">IP</td>
<td id="query" class="location-value">{{query}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
<tr>
<td class="field-name">Country</td>
<td class="location-value">{{country}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
<tr>
<td class="field-name">Region</td>
<td class="location-value">{{regionName}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
<tr>
<td class="field-name">City</td>
<td class="location-value">{{city}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
<tr>
<td class="field-name">Time Zone</td>
<td class="location-value">{{timezone}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
<tr>
<td class="field-name">Latitude</td>
<td class="location-value">{{lat}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
<tr>
<td class="field-name">Longitude</td>
<td class="location-value">{{lon}}</td>
<td><button class="help btn btn-xs btn-info">?</button></td>
</tr>
</tbody>
</table>
</script>
<script id="messageTemplate" type="text/x-handlebars">
<div class="fade-out">
<!-- alert alert-danger alert-dismissible role="alert"-->
<!--button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button-->
{{message}}
</div>
</script>
<script id="historyTemplate" type="text/x-handlebars">
<div class="row">
<div class="col-xs-12">
<table class="table" id="displayHistory">
<tr>
<th>IP</th>
<th>Website URl</th>
<th>Country</th>
<th>Latitude</th>
<th>Longitude</th>
</tr>
<tbody id="historyTbody">
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<button id="closeHistory" onclick="closeHistoryTab()" class="btn btn-default">close</button>
<button id="clearHistory" onclick="clearHistory()" class="btn btn-warning">Clear History</button>
</div>
</div>
</script>
<!-- JS -->
<script src="js/libs/jasmine-2.1.3/jasmine.js"></script>
<script src="js/libs/jasmine-2.1.3/jasmine-html.js"></script>
<script src="js/libs/jasmine-2.1.3/boot.js"></script>
<script src="js/libs/jasmine-2.1.3/mock-ajax.js"></script>
<script src="js/libs/jasmine-precondition.js"></script>
<!-- include source files here... -->
<script src="js/libs/jquery-1.11.2.min.js"></script>
<script src="js/libs/handlebars-v2.0.0.min.js"></script>
<script src="js/libs/bootstrap.min.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="js/libs/gmaps.min.js"></script>
<script src="js/geolocation.js"></script>
<!-- include spec files here... -->
<script src="test/TestSpec.js"></script>
</body>
</html>