-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
220 lines (204 loc) · 10.4 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
<!DOCTYPE html>
<html lang="en" data-ng-app="myApp">
<head>
<meta charset="UTF-8">
<title>ESD Search</title>
<link rel="stylesheet" href="css/app.css" /> <!--my custom css-->
<link rel="stylesheet" href="css/foundation.css" /> <!--foundation css-->
<link rel="stylesheet" href="css/jquery.modal.css" /> <!--modal plugin css-->
<link rel="stylesheet" href="css/easy-tabs.css" /> <!--jquery tabs css-->
<link rel="stylesheet" href="css/jquery.auto-complete.css" /> <!--jquery auto-complete plugin-->
</head>
<!--init controller-->
<body ng-controller="ResponseController as resp">
<div class="top-bar">
<div class="top-bar-left">
<ul class="dropdown menu" data-dropdown-menu>
<li class="menu-text">Emergency Services Directory Search</li>
</ul>
</div>
</div>
<section >
<div class="row" >
<div class="medium-3 columns" id="searcher">
<form id="searchForm">
<!--displays list of states-->
<label id="state_label">State:
<select name="state" id="state" ng-model="resp.stateSelect" ng-change="resp.getCities(resp.stateSelect)">
<option value="" selected="selected">NY</option>
<option ng-repeat="state in resp.states" value="{{state}}">{{state}}</option>
</select>
</label>
<!--displays all of the cities for specified state-->
<label>City:
<select name="town" id="town" ng-model="citySelect" >
<option value="">--Please Select A City--</option>
<option ng-repeat="city in resp.cities" value="{{city}}">{{city}}</option>
</select>
</label>
</form>
<!--buttons control search for either phsyicians or organizations-->
<a ng-model="phySearch" id="phySearch" ng-click="resp.getOrgs(true)" class="secondary button" href="#">Search For Physicians</a>
<a ng-model="orgSearch" id="orgSearch" ng-click="resp.getOrgs(false)" class="secondary button" href="#">Search For Organizations</a>
</div>
<div class="medium-3 columns end" id="filter">
<form id="adv_search">
<h5>Filter Results:</h5>
<input type="text" name="name" id="name" ng-model="nameQuery" placeholder="Filter by Organization Name"/>
<input type="text" ng-model="countyQuery" id="county" placeholder="Filter by County"/>
<input type="text" ng-model="zipQuery" id="zip" placeholder="Filter by Zip"/>
<!--dynamically generated list of organization types-->
<select ng-model="orgQuery" class="color_white">
<option value="">--Filter by Organization Type--</option>
<option ng-repeat="type in resp.orgTypes" value="{{type.type}}">{{type.type}}</option>
</select>
</form>
</div>
</div>
<!-- div for displaying results-->
<div id="results_disp" class="row">
<table class="hover">
<thead>
<tr>
<!--tables headers, clicking sorts table by that column-->
<th><em class="sortable" ng-click="sortBy = 'type'; sortRev = !sortRev;">Type</em></th>
<th><em class="sortable" ng-click="sortBy = 'name'; sortRev = !sortRev;">Name</em></th>
<th>City</th>
<th>State</th>
<th><em class="sortable" ng-click="sortBy = 'zip'; sortRev = !sortRev;">Zip</em></th>
<th><em class="sortable" ng-click="sortBy = 'county'; sortRev = !sortRev;">County</em></th>
</tr>
</thead>
<tbody>
<!--displays sortable list of orgs that match query and filter results-->
<tr ng-repeat="org in resp.orgsList | filter:{name:nameQuery, city:citySelect, county:countyQuery, zip:zipQuery, type:orgQuery} | orderBy: sortBy:sortRev"
id="{{org.orgId}}" ng-click="resp.getTabs(org.orgId)" class="orgRow">
<td>{{org.type}}</td>
<td>{{org.name}}</td>
<td>{{org.city}}</td>
<td>{{org.state}}</td>
<td>{{org.zip}}</td>
<td>{{org.county}}</td>
</tr>
</tbody>
</table>
</div>
<!--modal used to display tabular info for orgs
display is determined by the tab that is clicked on-->
<div id="tabs_modal" class="tab-container" >
<ul class="etabs">
<li ng-repeat="tab in resp.tabs" class="tab tb1"><a href="#tabs-1" ng-click="resp.getTabInfo(tab); resp.makeTabActive()">{{tab}}</a></li>
</ul>
<div id="tabs-1">
<!-- General tab-->
<div ng-show="resp.tab == 'General'">
<table>
<tbody>
<tr ng-repeat="(key, val) in resp.tabInfo"><td><strong>{{key}}: </strong></td><td>{{val}}</td></tr>
</tbody>
</table>
</div>
<!-- Locations Tab-->
<div ng-show="resp.tab == 'Locations'">
<div id="loc-left">
<select ng-model="locQuery" ng-change="resp.setMap(0,0,locQuery)">
<option value="">--Select Location--</option>
<option ng-repeat="loc in resp.locInfo" value="{{loc.site}}">{{loc.type}}</option>
</select>
<input ng-repeat-start="loc in resp.locInfo" type="hidden" id="hidLat" ng-model="lat" value="{{loc.lat}}" />
<input type="hidden" ng-model="lon" value="{{loc.long}}" id="hidLon"/>
<table ng-repeat-end ng-hide="loc.site != locQuery">
<tbody>
<tr ng-repeat="(key, val) in loc" ng-hide="val == null || val == 'null' || val == '' || val == 'NaN'"><td><strong>{{key}}</strong></td><td>{{val}}</td></tr>
</tbody>
</table>
</div>
<div id="map"></div>
</div>
<!-- Treatments Tab-->
<div ng-show="resp.tab == 'Treatments'">
<table ng-show="resp.count != 0">
<thead>
<tr><th>Type</th><th>Abbreviation</th></tr>
</thead>
<tbody>
<tr ng-repeat="treat in resp.tInfo"><td>{{treat.type}}</td><td>{{treat.abb}}</td></tr>
</tbody>
</table>
<p ng-show="resp.count == 0">There are no treatments available</p>
</div>
<div ng-show="resp.tab == 'Training'">
<table ng-show="resp.count != 0">
<thead>
<tr><th>Type</th><th>Abbreviation</th></tr>
</thead>
<tbody>
<tr ng-repeat="treat in resp.tInfo"><td>{{treat.type}}</td><td>{{treat.abb}}</td></tr>
</tbody>
</table>
<p ng-show="resp.count == 0">There is no training available</p>
</div>
<!-- Facilities Tab-->
<div ng-show="resp.tab == 'Facilities'">
<table ng-show="resp.count != 0">
<thead>
<tr><th>Type</th><th>Quantity</th><th>Description</th></tr>
</thead>
<tbody>
<tr ng-repeat="fac in resp.facInfo"><td>{{fac.type}}</td><td>{{fac.qty}}</td><td>{{fac.desc}}</td></tr>
</tbody>
</table>
<p ng-show="resp.count == 0">There are no facilities available</p>
</div>
<!--Physicians Tab-->
<div ng-show="resp.tab == 'Physicians'">
<table ng-show="resp.count != 0">
<thead>
<tr><th>Physician</th><th>License Num.</th><th>Contact Phone</th></tr>
</thead>
<tbody>
<tr ng-repeat="phy in resp.phyInfo"><td>{{phy.name}}</td><td>{{phy.license}}</td><td>{{phy.phone}}</td></tr>
</tbody>
</table>
<p ng-show="resp.count == 0">There physicians</p>
</div>
<!--People Tab-->
<div ng-show="resp.tab == 'People'">
<select ng-model="location">
<option value="">--Select Location--</option>
<option ng-repeat="loc in resp.locals" value="{{loc.id}}">{{loc.type}} -- {{loc.add}}</option>
</select>
<table >
<thead>
<tr><th>Name</th><th>Role</th></tr>
</thead>
<tbody ng-repeat="people in resp.pInfo">
<tr ng-repeat="person in people" ng-hide="person.loc != location"><td>{{person.name}}</td><td>{{person.role}}</td></tr>
</tbody>
</table>
</div>
<!--Equipment Tab-->
<div ng-show="resp.tab == 'Equipment'">
<table ng-show="resp.count != 0">
<thead>
<tr><th>Type</th><th>Quantity</th><th>Description</th></tr>
</thead>
<tbody>
<tr ng-repeat="eq in resp.equip"><td>{{eq.type}}</td><td>{{eq.qty}}</td><td>{{eq.desc}}</td></tr>
</tbody>
</table>
<p ng-show="resp.count == 0">There is no equipment available</p>
</div>
</div>
</div>
</section>
<script src="js/vendor/jquery.min.js"></script>
<script src="js/vendor/jquery.modal.min.js"></script> <!--jquery modal plugin-->
<script src="js/vendor/jquery.easytabs.min.js"></script> <!--jquery tabs plugin-->
<script src="js/vendor/jquery.auto-complete.min.js"></script> <!--jquery auto complete plugin-->
<script src="js/jquery-alex-plugin.js"></script> <!--custom plugin-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <!--angular-->
<script src="js/app.js"></script><!--my angular app-->
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBWBj2dhI0OPE1jTgK_7vCC1sNDL_F7GIA&"></script> <!--google maps-->
</body>
</html>