-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.html
311 lines (310 loc) · 16.2 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Navigator</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="static/css/jquery.mobile-1.3.1.min.css" />
<link rel="stylesheet" href="static/css/jqm-icon-pack-2.0-original.css" />
<link rel="stylesheet" href="static/css/leaflet.css" />
<link type="text/css" rel="stylesheet" href="static/css/leaflet.label.css" />
<link rel="stylesheet" href="static/css/main.css" />
<link rel="stylesheet" href="static/css/leaflet.awesome-markers.css" />
<style>
/* Hide all the app pages until jQuery Mobile inits to
avoid the Flash of Unstyled Content */
[data-role=page] { display: none; }
.splashscreen {
width: 100%;
height: 100%;
border: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index:1001;
background: lightgrey;
text-shadow: none;
color: black;
}
</style>
</head>
<body>
<noscript>Error: No Javascript available in your browser.</noscript>
<div id="splashscreen" class="splashscreen" style="display: none"></div>
<script>
// Show the splash screen with a loading message
// Handler to hide the message when the loading stops
window.onload = function() {
document.getElementById("splashscreen").style.display = 'none';
};
document.getElementById("splashscreen").innerHTML = 'Loading...';
document.getElementById("splashscreen").style.display = 'block';
</script>
<div id="map" style="width: 100%; height: 100%; border: 0;"></div>
<!-- data-role="page" and other data-roles are jQuery mobile specific widget attributes -->
<!-- The jQuery mobile will link to pages with data-role="page" based on the id attribute.
There are several pages in this index.html document. -->
<!-- Front page -->
<div id="front-page" data-role="page">
<div data-role="header" data-theme="b">
<h1>Navigator</h1>
<!-- Settings button.
data-icon="gear" and class="ui-btn-right" are jQuery mobile specific -->
<a href="#front-page-menu" data-icon="menu" class="ui-btn-right" data-rel="popup" data-iconpos="notext" data-transition="slidedown">Menu</a>
</div>
<div data-role="content">
<!-- "Search box" with the list of results for the location that the user wants to go to. -->
<ul id="navigate-to-input" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="Where do you want to go?"></ul>
</div>
<div data-role="content" style="height: 63px; text-align: right">
</div>
<div data-role="content" style="position: absolute; width: 100%; bottom: 0; text-align: center; padding-left: 0; padding-right: 0">
<fieldset data-role="controlgroup" data-type="horizontal" data-shadow="true" style="display: inline-block">
<label><input type="checkbox" name="usetransit" checked="checked"><img src="static/images/bus_stop.svg" style="height: 20px;" /></input></label>
</fieldset>
<fieldset id="vehiclesettings" data-role="controlgroup" data-type="horizontal" data-shadow="true" style="display: inline-block">
<label><input type="radio" name="vehiclesettings" value="WALK" checked="checked"><img src="static/images/walking.svg" style="height: 20px;"/></input></label>
<label><input type="radio" name="vehiclesettings" value="BICYCLE"><img src="static/images/bicycle.svg" style="height: 20px;"/></input></label>
<label><input type="radio" name="vehiclesettings" value="CAR"><img src="static/images/car.svg" style="height: 20px;"/></input></label>
</fieldset>
</div>
<div id="front-page-menu" data-role="popup">
<ul data-role="listview" data-inset="true">
<li><a href="#settings">
<h3>Settings</h3>
<p>Access the routing settings.</p>
</a></li>
<li><a href="#service-directory?">
<h3>Find nearest services</h3>
<p>Find a service that is nearest to your current location.</p>
</a></li>
<!-- pageshow event for the map-page is handled in the routing.coffee -->
<li><a href="#map-page">
<h3>Browse map</h3>
<p>Calculate routes and browse for points of interest.</p>
</a></li>
<li><a href="#live-page">
<h3>View live map</h3>
<p>Get a real-time overview of vehicle positions.</p>
</a></li>
</ul>
</div>
</div>
<!-- Map page -->
<div id="map-page" data-role="page">
<div data-role="header" data-theme="b">
<a href="" data-rel="back">Back</a>
<h1 style="margin-bottom: 0; margin-top: 0"><a href="#navigation-page" data-icon="play" data-role="button" data-inline="true" style="margin-top: 3px; margin-bottom: 7px">Let's go</a></h1>
<a href="#map-page-menu" data-icon="menu" class="ui-btn-right" data-rel="popup" data-iconpos="notext" data-transition="slidedown" data-shadow="false" data-iconshadow="false">Menu</a>
</div>
<div data-role="footer" data-position="fixed" style="padding: 0; margin: 0; border: 0; overflow: visible;">
<ul id="routes" class="route-list" style="display: block">
<li>
<ul class="route-buttons-0 route-graph" style="display: none">
</ul>
</li>
<li>
<ul class="route-buttons-1 route-graph" style="display: none">
</ul>
</li>
<li>
<ul class="route-buttons-2 route-graph" style="display: none">
</ul>
</li>
</ul>
<form id="comment-box" style="display: none; width: 100%; height: 100%; border: 0;">
<textarea style="width: 100%; height: 100%;"></textarea>
<fieldset class="ui-grid-a">
<div class="ui-block-a"><button type="button" class="cancel-button" data-theme="c">Cancel</button></div>
<div class="ui-block-b"><button type="submit" data-theme="b">Submit</button></div>
</fieldset>
</form>
</div>
<div id="error-popup" data-role="popup" data-rel="dialog" data-transition="pop" data-overlay-theme="a">
<div data-role="header">
<h1>Routing failed</h1>
</div>
<div data-role="content">
<p>Error</p>
<a href="#" data-role="button" data-rel="back">Dismiss</a>
</div>
</div>
<div id="map-page-menu" data-role="popup">
<ul data-role="listview" data-inset="true">
<li><a href="#navigation-page" class="journey-preview-link">
<h3>Preview journey</h3>
<p>Start viewing a simulation.</p>
</a></li>
<li><a href="#settings">
<h3>Settings</h3>
<p>Access the routing settings.</p>
</a></li>
</ul>
</div>
</div>
<!-- Navigation page -->
<div id="navigation-page" data-role="page">
<div data-role="header" data-theme="b" style="text-align: center">
<a href="" data-rel="back">Back</a>
<h1 style="margin-bottom: 0; margin-top: 0"><a data-icon="pause" data-role="button" class="pause-navigation-link" data-inline="true" style="margin-top: 3px; margin-bottom: 7px">Pause</a></h1>
<a href="#navigation-page-menu" data-icon="menu" class="ui-btn-right" data-rel="popup" data-iconpos="notext" data-transition="slidedown">Menu</a>
</div>
<div data-role="footer" data-position="fixed" style="padding: 0; margin: 0; border: 0; overflow: visible;">
<ul class="route-list" style="display: block">
<li>
<ul class="route-buttons-0 route-graph" style="display: none">
</ul>
</li>
<li>
<ul class="route-buttons-1 route-graph" style="display: none">
</ul>
</li>
<li>
<ul class="route-buttons-2 route-graph" style="display: none">
</ul>
</li>
</ul>
</div>
<div id="navigation-page-menu" data-role="popup">
<ul data-role="listview" data-inset="true">
<li><a href="#settings">
<h3>Settings</h3>
<p>Access the routing settings.</p>
</a></li>
</ul>
</div>
</div>
<!-- This page is for palvelukartta.coffee but neither is not used anymore as
the geocoder API is used nowadays. -->
<div id="find-nearest" data-role="page">
<div data-role="header">
<a href="" data-rel="back">Back</a>
<h1>Find nearest services</h1>
</div>
<div data-role="content">
</div>
</div>
<!-- "Find nearest services" page -->
<div id="service-directory" data-role="page">
<div data-role="header">
<!-- jQuery mobile back button to go one page back in history -->
<a href="" data-rel="back">Back</a>
<h1>Find nearest services</h1>
</div>
<div data-role="content">
<ul data-role="list-view">
</ul>
</div>
</div>
<!-- "Nearest services" page -->
<div id="service-list" data-role="page">
<div data-role="header">
<a href="" data-rel="back">Back</a>
<h1>Nearest services</h1>
</div>
<div data-role="content">
<ul data-role="list-view">
</ul>
</div>
</div>
<!-- Settings page -->
<div id="settings" data-role="page">
<div data-role="header">
<a href="" data-rel="back">Back</a>
<h1>Settings</h1>
</div>
<div data-role="content">
<ul data-role="listview" style="margin-bottom: 0">
<li>
<fieldset id="modesettings" data-role="controlgroup" data-type="horizontal">
<label><input type="checkbox" name="BUS"><img src="static/images/bus_stop.svg" style="height: 20px;"/></input></label>
<label><input type="checkbox" name="TRAM"><img src="static/images/tram_stop.svg" style="height: 20px;"/></input></label>
<label><input type="checkbox" name="RAIL"><img src="static/images/train_station2.svg" style="height: 20px;"/></input></label>
<label><input type="checkbox" name="SUBWAY"><img src="static/images/subway.svg" style="height: 20px;"/></input></label>
</fieldset>
</li>
<li>
<input type="checkbox" name="wheelchair" id="wheelchair" />
<label for="wheelchair"><img src="static/images/wheelchair.svg" height=20 style="margin-right:16px; margin-left: 16px" />Wheelchair accessible</label>
</li>
<li>
<input type="checkbox" name="prefer-free" id="prefer-free" />
<label for="prefer-free">Prefer free routes</label>
</li>
<li>
<input type="checkbox" name="use-speech" id="use-speech" />
<label for="use-speech">Speak navigation instructions</label>
</li>
</ul>
</div>
</div>
<!-- Live map page -->
<div id="live-page" data-role="page">
<div data-role="header" data-theme="b">
<a href="" data-rel="back">Back</a>
<h1>Live map</h1>
</div>
</div>
<script src="static/js/jquery-1.8.3.min.js"></script>
<script src="static/js/handlebars.min.js"></script>
<script src="static/js/leaflet.js"></script>
<script src="static/js/leaflet.label.js"></script>
<script src="static/js/underscore-min.js"></script>
<script src="static/js/backbone-min.js"></script>
<script src="static/js/moment.min.js"></script>
<script src="static/js/leaflet-osm-notes.js"></script>
<script src="static/js/leaflet.geometryutil.js"></script>
<script src="http://dev.hsl.fi:9002/faye/client.js"></script>
<script>
// Functional testing with TestEm using mocha+chai-framework.
if (window.location.hash === '#testem') {
window.testem_mode = true;
jQuery(document).ready(function($) {
$('#front-page').bind('pageinit', function() {
var loadDependencies, suite = '/tests/test_functional.js';
loadDependencies = function(urls, callback) {
if (urls.length > 0) {
$.getScript(urls.shift(0), function() {
loadDependencies(urls, callback);
});
} else { callback(); }
}
loadDependencies([
'/testem/mocha.js', '/testem/chai.js', '/testem.js'
], function() {
mocha.setup('bdd');
$.getScript(suite, function() { mocha.run(); });
});
});
});
}
</script>
<!-- Initialization related code -->
<script src="static/js/init.js"></script>
<!-- Configure the geographical area where the app is to be used in -->
<script src="static/js/config.js"></script>
<script src="static/js/local_config.js"></script>
<!-- "Colorful iconic & retina-proof markers for Leaflet,
based on the Font Awesome/Twitter Bootstrap icons" -->
<script src="static/js/leaflet-awesome-markers.js"></script>
<!-- Palvelukartta is not currently used. It utilizes
REST API for City of Helsinki Service Map -->
<script src="static/js/palvelukartta.js"></script>
<!-- Handles routing and map drawing -->
<script src="static/js/routing.js"></script>
<!-- Handles autocompletion related tasks for the "Where do you want to go?"
filter at the first page -->
<script src="static/js/autocomplete.js"></script>
<!-- Handles POI related task such as finding nearby services and geocoding -->
<script src="static/js/poi.js"></script>
<!-- Component that handles communication with the navigator-server that
provides real-time info for the public transportation -->
<script src="static/js/realtime.js"></script>
<script src="static/js/reach.js"></script>
<!-- Load jQuery Mobile as last because init.js handles the jQuery Mobile mobileinit message. -->
<script src="static/js/jquery.mobile-1.3.1.min.js"></script>
</body>
</html>