-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
141 lines (74 loc) · 3.32 KB
/
index.html
File metadata and controls
141 lines (74 loc) · 3.32 KB
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>UF Directory App</title>
</head>
<body ng-app="directoryApp">
<div class="container" ng-controller="ListingsController">
<h1>UF Directory App</h1>
<div class="col-md-6">
<div class="input-group" id="searchBar">
<div class="row">
<!-- allows search to act dynamically with input -->
<input type="text" class="form-control" placeholder="Search" ng-model="searchKeyword">
</div>
<div class="tableWrapper">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Code</th>
<th>Building Name</th>
<th></th>
<th></th>
</tr>
<tbody>
<tr>
<td><input class="form-control" ng-model="listing.code"></td>
<td><input class="form-control" ng-model="listing.name"></td>
<td><button class="btn btn-primary" ng-click="addListing()">Add Listing</button></td>
<td><button class="btn btn-info" ng-click="deselect()">Clear</button></td>
<td></td>
</tr>
<tr ng-repeat="listing in listings | filter: searchKeyword">
<td> {{ listing.code }} </td>
<td> {{ listing.name }} </td>
<td><button class="btn btn-danger" ng-click="remove(index)">Remove</button></td>
<td><button class="btn btn-info" ng-click="showDetails(listing)">Details</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-6">
<div class="jumbotron">
<h2>Detailed Information</h2>
<table class="table">
<thead>
<tr>
<th>Coordinates</th>
<th>Address</th>
<th> </th>
</tr>
</thead>
<tbody>
<!-- showing the details for a single listing -->
<tr ng-repeat="listing in listings" ng-show="listing.index == 1" ng-hide="listing.index != 1">
<td>{{listing.coordinates}}</td>
<td>{{listing.address}}</td>
</tr>
</tbody>
<table>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
<script src="https://code.angularjs.org/1.4.3/angular.js"></script>
<script src="app.js"></script>
<script src="listingController.js"></script>
<script src="listingFactory.js"></script>
</body>
</html>