-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdetail.html
332 lines (286 loc) · 10.5 KB
/
detail.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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!DOCTYPE html>
<html lang="en">
<head>
<title>Community KC</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- Bootstrap core CSS -->
<link href="index_files/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="index_files/navbar-static-top.css" rel="stylesheet">
<!-- Site-specific Navigation -->
<link rel="stylesheet" type="text/css" href="css/application.css">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]>
<script src="../../assets/js/ie8-responsive-file-warning.js"></script>
<![endif]-->
<script src="index_files/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
dt,
dd {
float: left
}
dt {
clear: both
}
.filter-1 {
background-color: hsl(87, 64%, 42%);
}
</style>
</head>
<body>
<!-- Static navbar -->
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><span id="header-community">Community</span><span id="header-kc">KC</span>
<small id="header-tag-line">connecting projects, people, and resources</small>
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="http://goo.gl/forms/hMJYaqfv2o">Add Project</a>
</li>
<li><a href="/faq.html">FAQ</a>
</li>
<li><a href="/about.html">About</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
<div class="container-fluid">
<div class="row our-menu">
<div class="col-md-12">
<ul id='project-type-filter-buttons' class="nav nav-pills" role="tablist">
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-xs-12 ">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
</div>
</div>
<div class="col-sm-9 col-xs-12 ">
<div id="map-canvas">
</div>
</div>
</div>
</div>
<!-- /container -->
<!--
<footer class="footer">
<div class="container">
This is the footer.
</div>
</footer>
-->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script src="index_files/jquery.js"></script>
<script src="index_files/bootstrap.js"></script>
<script src="js/tkmap.4.0.0.js"></script>
<script src="js/projects.js"></script>
<script src="js/event.js"></script>
<script src="js/tabletop.js"></script>
<script src="js/infobox.js"></script>
<script type="text/javascript">
google.maps = google.maps || {};
project_type_info = [];
project_type_info["All"] = {
id: "all",
color: "e5e5e5",
pin_url: "",
count: 0
};
project_type_info["Capacity Building"] = {
id: "capacity-building",
color: "#6F4682",
pin_url: "img/6F4682.png",
count: 0
};
project_type_info["Economic Development and Housing"] = {
id: "housing",
color: "#CA7FEC",
pin_url: "img/CA7FEC.png",
count: 0
};
project_type_info["Environment and Energy"] = {
id: "environmental",
color: "#4951FF",
pin_url: "img/4951FF.png",
count: 0
};
project_type_info["Public Health and Safety"] = {
id: "public-safety",
color: "#37BCE8",
pin_url: "img/37BCE8.png",
count: 0
};
project_type_info["Education, Arts, and Culture"] = {
id: "education",
color: "#EC9A7A",
pin_url: "img/EC9A7A.png",
count: 0
};
project_type_info["Other"] = {
id: "other",
color: "#4E9F79",
pin_url: "img/4E9F79.png",
count: 0
};
(function ($, TkMap, Projects) {
/**
* @classDescription - Default settings for this application
* @class - Default
*/
var Default = {
// City
city: 'Kansas City',
// DOM ID of where the Google Map is to be rendered
domid: 'map-canvas',
// Google maps API key
googlemapsapikey: 'AIzaSyDQNzkJUiUJBqI_pex-Xe9_1JD4sf2KZS8',
// Spread Sheet key
spread_sheet_key: '11HmkFMesjwdeY2gLpV-U84GIwqvxjvTGU_Jk8rnslJU',
infoboxoptions: {
disableAutoPan: false,
maxWidth: 0,
pixelOffset: new google.maps.Size(-121, 0),
zIndex: null,
boxStyle: {
background: "url('img/tipbox.gif') no-repeat",
opacity: 0.92,
width: "370px",
height: "370px"
},
closeBoxMargin: "11px 4px 4px 4px",
closeBoxURL: "img/close-button.png",
infoBoxClearance: new google.maps.Size(25, 60),
visible: false,
pane: "floatPane",
enableEventPropagation: false
},
// Start center latutude of the Google map
lat: 39.0997,
// Start center longitude of the Google map
lng: -94.5783,
// State
state: 'Missouri',
// Defined style types passed to TkMap
styles: 'grey minlabels',
// Initial zoom level for the Google map
zoom: 12,
// Zoom for finding address
zoomaddress: 14
};
/*
* jQuery's 'on document ready' function
* Run this after the DOM is fully loaded.
*/
$(function () {
var Map = new TkMap({
domid: Default.domid,
init: true,
lat: Default.lat,
lng: Default.lng,
styles: Default.styles,
zoom: Default.zoom
}); // END Map object constructor
$(window)
.resize(function () { // RESIZE Map div when window size changes
var h = $(window)
.height(), // Solves the 100% height turning to 0px
offsetTop = 200; // Calculate the top offset // https://github.com/twbs/bootstrap/issues/2475
$('#map-canvas')
.css('height', (h - offsetTop));
})
.resize();
/**
* The Project application object
*/
var Proj = new Projects(Default.infoboxoptions);
/**
* Put a legend up for the pins in on the right bottom of the screen
*/
// var LegendDiv = document.createElement('div');
// Proj.setMapLegend(LegendDiv,Map,Proj,Default);
// LegendDiv.index = 1;
// Map.Map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(LegendDiv);
/**
* Put the Find Me button up on the upper right hand of the screen
*/
if (Proj.geolocate) {
var FindMeDiv = document.createElement('div');
Proj.setFindMeControl(FindMeDiv, Map, Proj, Default);
FindMeDiv.index = 1;
Map.Map.controls[google.maps.ControlPosition.TOP_RIGHT].push(FindMeDiv);
}
/**
* Load the projects data
*/
Tabletop.init({
key: Default.spread_sheet_key,
callback: function (data, tabletop) {
for (i in data) {
if (data[i]['DisplayOnMap'].toLowerCase() == 'no') {
data.splice(i, 1);
}
}
Proj.displayProjectTypeFilters();
Proj.getEvents(data, Map, Default);
Proj.displayProjectTypeCounts();
$('.proj-type')
.on('click', function () {
var clicked_id = this.id;
// Change buttons
$('.proj-type')
.removeClass('active');
$('#' + clicked_id)
.addClass('active');
// Selected today's events
Proj.setMarkersByProjectType(clicked_id);
});
},
orderby: '3. Project type',
simpleSheet: true
});
}); // END jQuery on document ready
})(jQuery, TkMap, Projects);
// The following code is from http://stackoverflow.com/questions/979975/how-to-get-the-value-from-the-url-parameter
function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {}, tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
return params;
}
var query = getQueryParams(document.location.search);
alert(decodeURIComponent(query.foo));
</script>
</body>
</html>