-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
248 lines (197 loc) · 9.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://developers.google.com/fusiontables/docs/samples/style/default.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./css/mapapp.css">
<link rel="stylesheet" type="text/css" href="./css/searchbox.css">
<link rel="stylesheet" style="text/css" href="ext/jsonform/deps/opt/bootstrap.css" />
<link rel="stylesheet" style="text/css" href="ext/jsonform/deps/opt/bootstrap-theme.css" />
<!-- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> -->
<link rel="stylesheet" style="text/css" href="ext/jsonform/custom/custom.css" />
<link rel="stylesheet" style="text/css" href="ext/sidr/stylesheets/jquery.sidr.light.css" />
<!-- wysiwyg -->
<link rel="stylesheet" style="text/css" href="ext/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" style="text/css" href="ext/jsonform/deps/opt/wysiwyg/bootstrap3-wysihtml5.css" />
<link rel="stylesheet" style="text/css" href="ext/jsonform/deps/opt/wysiwyg/wysiwyg-color.css" />
<!-- JScrollPane -->
<link rel="stylesheet" style="text/css" href="ext/jscrollpane/css/jquery.jscrollpane.css" />
<link rel="stylesheet" style="text/css" href="ext/jscrollpane/css/custom.css" />
<!-- fileupload -->
<link rel="stylesheet" href="ext/fileupload/css/style.css">
<link rel="stylesheet" href="ext/fileupload/css/jquery.fileupload.css">
<script src="ext/jquery/jquery-3.1.0.js"></script>
<script src="ext/jquery/plugins/jquery.redirect.js"></script>
<script src="ext/jquery/plugins/jquery.hotkeys.js"></script>
<script src="js/util.js"></script>
<script src="js/mapdata.js"></script>
<script src="js/initmap.js"></script>
<script src="js/initform.js"></script>
<script src="js/filterform.js"></script>
<script src="js/externalitem.js"></script>
<!-- fileupload -->
<script src="ext/fileupload/js/vendor/jquery.ui.widget.js"></script>
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
<script src="//blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
<script src="//blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="ext/fileupload/js/jquery.iframe-transport.js"></script>
<!-- The basic File Upload plugin -->
<script src="ext/fileupload/js/jquery.fileupload.js"></script>
<!-- The File Upload processing plugin -->
<script src="ext/fileupload/js/jquery.fileupload-process.js"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="ext/fileupload/js/jquery.fileupload-image.js"></script>
<!-- The File Upload audio preview plugin -->
<script src="ext/fileupload/js/jquery.fileupload-audio.js"></script>
<!-- The File Upload video preview plugin -->
<script src="ext/fileupload/js/jquery.fileupload-video.js"></script>
<!-- The File Upload validation plugin -->
<script src="ext/fileupload/js/jquery.fileupload-validate.js"></script>
<script type="text/javascript" src="ext/jsonform/deps/underscore.js"></script>
<script type="text/javascript" src="ext/jsonform/deps/opt/jsv.js"></script>
<script type="text/javascript" src="ext/jsonform/lib/fileupload.js"></script>
<script type="text/javascript" src="ext/jsonform/lib/jsonform.js"></script>
<script type="text/javascript" src="ext/sidr/jquery.sidr.js"></script>
<!-- wysiwyg -->
<script type="text/javascript" src="ext/jsonform/deps/opt/wysiwyg/wysihtml5x-toolbar.js"></script>
<script type="text/javascript" src="ext/jsonform/deps/opt/wysiwyg/handlebars.js"></script>
<script type="text/javascript" src="ext/jsonform/deps/opt/wysiwyg/bootstrap3-wysihtml5.min.js"></script>
<script type="text/javascript" src="ext/jsonform/deps/opt/wysiwyg/wysihtml5x.js"></script>
<!-- JScrollPane -->
<script type="text/javascript" src="ext/jscrollpane/js/jquery.jscrollpane.js"></script>
<script type="text/javascript" src="ext/jscrollpane/js/jquery.mousewheel.js"></script>
<title>Google Map App</title>
<script>
$( document ).ready(function() {
$('.item-scroll-pane').jScrollPane({
showArrows: true,
autoReinitialise: true,
contentWidth: '0px'
});
$( document ).bind('keydown', 'ctrl+f', function(e) {
e.preventDefault();
return false;
});
$( document ).bind('keydown', 'ctrl+f', showFilterForm);
$( document ).bind('keydown', 'ctrl+x', function(e) {
e.preventDefault();
return false;
});
$( document ).bind('keydown', 'ctrl+x', externalItemForm);
// if ($('#state').val() == 'init') {
// initLoginForm();
// }
});
function loginButtonPanel() {
return $('<div/>', {
'class': 'form-actions'
}).append('::before')
.append(loginButton())
.append('::after');
}
function loginButton() {
return $('<button />', {
id: 'login',
'class': 'btn btn-primary',
value: 'Login'
}).click(function() {
$('#loginForm').submit();
});
}
</script>
</head>
<body>
<div id="gmap"></div>
<div style="display: none;">
<div id="menu"></div>
</div>
<div style="display: none;">
<div class="menu" id="sidr">
<ul>
<li><div onclick="setItemMarkerOnClick({ latLng: map.getCenter() });" ><a href="#"><b>Add Item:</b> click on map</a></div></li>
<li><div onclick="externalItemForm();" ><a href="#"><b>External Item</b> (Ctrl-X)</a></div></li>
<li><div onclick="showFilterForm();" ><a href="#"><b>Filter Items</b> (Ctrl-F)</a></div></li>
</ul>
<div class='licence'>Powered by <a href='https://github.com/artberri/sidr' target='_blank'>SIDR</a> side menu</div>
</div>
</div>
<input type='hidden' id='state' value='{{ state }}'>
<input type='hidden' id='error' value='{{ error }}'>
{% if user %}
<input type='hidden' id='user_id' value='{{ user.id }}'>
<input type='hidden' id='user_name' value='{{ user.name }}'>
<input type='hidden' id='user_avatar' value='{{ user.avatar }}'>
{% else %}
<input type='hidden' id='user_id' value=''>
<input type='hidden' id='user_name' value=''>
<input type='hidden' id='user_avatar' value=''>
{% endif %}
<input type='hidden' id='user_types' value='{{ types }}'>
<div style="display: none;">
<form id='loginForm' method='POST'>
<input type='hidden' id='center_lat' name='center_lat' value='{{ center_lat }}'>
<input type='hidden' id='center_lng' name='center_lng' value='{{ center_lng }}'>
<input type='hidden' id='zoom' name='zoom' value='{{ zoom }}'>
<input type='hidden' id='mapTypeId' name='mapTypeId' value='{{ mapTypeId }}'>
<input type='hidden' id='item_lat' name='item_lat' value='{{ item_lat }}'>
<input type='hidden' id='item_lng' name='item_lng' value='{{ item_lng }}'>
<input type='hidden' id='action' name='action' value='{{ action }}'>
</form>
</div>
<!--
<table>
<tr><td>
-->
<div id='container' class="container">
<input id="pac-input" class="controls searchbox" type="text" placeholder="Search Box">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyByn9Vgz7NismQookdlaSpVAl4nPuk8a94&libraries=places&callback=initMap" async defer></script>
</div>
<!--
</td></tr>
<tr><td>
-->
<div id='itemMapForm' class="mapform" style="display: none;">
<h1 id='itemHeader'></h1>
<div id='itemComment'></div>
<div class='item-scroll-pane'>
<form id='itemForm' role='form'></form>
</div>
<br/>
<div class='licence'>Powered by
<ul>
<li><a href='https://github.com/joshfire/jsonform' target='_blank'>JSON Form</a></li>
<li><a href='https://github.com/blueimp/jQuery-File-Upload' target='_blank'>jQuery File Upload</a></li>
<li><a href='https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg' target='_blank'>Bootstrap3 Wysiwyg</a></li>
</ul>
</div>
</div>
<div id='externalItemMapForm' class="mapform" style="display: none;">
<h1 id='externalItemHeader'>External Item</h1>
<form id='externalItemForm' role='form'></form>
<br/>
<div class='licence'>Powered by <a href='https://github.com/joshfire/jsonform' target='_blank'>JSON Form</a></div>
</div>
<div id='loginMapForm' class="mapform" style="display: none;">
<h1 id='loginHeader'>Login</h1>
<div id='loginComment'>To add items you have to log in.</div>
<form id='loginItemForm' role='form'></form>
<br/>
<div class='licence'>Powered by <a href='https://github.com/joshfire/jsonform' target='_blank'>JSON Form</a></div>
</div>
<div id='filterMapForm' class="mapform" style="display: none;">
<h1 id='filterHeader'>Filter Items</h1>
<div id='filterComment'></div>
<form id='filterForm' role='form'></form>
<br/>
<div class='licence'>Powered by <a href='https://github.com/joshfire/jsonform' target='_blank'>JSON Form</a></div>
</div>
<!--
</td></tr>
</table>
-->
</body>
</html>