-
Notifications
You must be signed in to change notification settings - Fork 0
/
roomselection.html
224 lines (186 loc) · 7.73 KB
/
roomselection.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
<html>
<head>
<title>Floor Plans</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="roomselection.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script>
var QueryString = function () {
// This function is anonymous, is executed immediately and
// the return value is assigned to QueryString!
var query_string = {};
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
// If first entry with this name
if (typeof query_string[pair[0]] === "undefined") {
query_string[pair[0]] = pair[1];
// If second entry with this name
} else if (typeof query_string[pair[0]] === "string") {
var arr = [ query_string[pair[0]], pair[1] ];
query_string[pair[0]] = arr;
// If third or later entry with this name
} else {
query_string[pair[0]].push(pair[1]);
}
}
return query_string;
} ();
function updateRoom()
{
var floorth = document.getElementById("myList").value;
var listElement = ""
$.getJSON('json/dorms.json', function(data) {
//var floorth = document.getElementById("myList");
$.each(data.locations[QueryString.a].halls[QueryString.b][floorth], function(i, f) {
if(f == "true")
listElement += "<li><a href=\"buildingselection.html\" class=\"confirm\">" + i + "</a></li>"
else
listElement += "<li><FONT COLOR=\"#FF0000\">" + i + "</FONT></li>"
//$(listElement).appendTo(".Rooms ul");
$(".Rooms ul").html(listElement);
});
});
//var imager = "<img src=\"" + "Pictures/Floor Plans/FraternityQuad/DeltaKappaEpsilon1.png" + "\">"
var imager = "<img src=\"Pictures/Floor Plans/" + QueryString.a + "/" + QueryString.b + floorth + ".png\">"
$(".Viewer").html(imager);
//$(".Viewer").text(imager);
}
$(function() {
$.getJSON('json/dorms.json', function(data) {
$.each(data.locations[QueryString.a].halls[QueryString.b], function(i, f) {
var listElement = "<option>" + i + "</option>"
$(listElement).appendTo("#myList");
});
});
});
$(function() {
var listElement = ""
$.getJSON('json/dorms.json', function(data) {
$.each(data.locations[QueryString.a].halls[QueryString.b][1], function(i, f) {
//var listElement = "<li>" + i + "</li>"
if(f == "true")
listElement = "<li><a href=\"javascript:AlertIt()\" class=\"confirm\">" + i + "</a></li>"
else
listElement = "<li><FONT COLOR=\"#FF0000\">" + i + "</FONT></li>"
$(listElement).appendTo(".Rooms ul");
});
});
var imager = "<img src=\"Pictures/Floor Plans/" + QueryString.a + "/" + QueryString.b + "1.png\">"
$(".Viewer").html(imager);
//$(".Viewer").text(imager);
});
function AlertIt() {
if(confirm("Are you SURE....?")){
window.location="confirmation.html";
} else {
event.preventDefault();
return false;
}
}
</script>
</head>
<body>
<div class="Navbar">
<div class="navbarer navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<ul class="nav navbar-nav">
<li><a href="Home.html">Home</a></li>
<li><a href="roommatepage.html">Group Registration</a></li>
<li><a href="buildingselection.html">Pick Rooms</a></li>
<li><a href="aboutbuildings.html">Housing Info</a></li>
<li><a href="support.html">Support</a></li>
</ul>
</div>
</div>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Fraternity Quad<span class="caret"></span></button>
<ul class="dropdown-menu">
<!-- <li><a href="?a=FraternityQuad&b=AlphaDeltaPhi">Alpha Delta Phi</a></li> -->
<!-- <li><a href="?a=FraternityQuad&b=DeltaKappaEpsilon">Delta Kappa Epsilon</a></li> -->
<!-- <li><a href="?a=FraternityQuad&b=DouglassLeadershipHouse">Douglass Leadership House</a></li> -->
<li><a href="?a=FraternityQuad&b=PsiUpsilon">Psi Upsilon</a></li>
<!-- <li><a href="?a=FraternityQuad&b=SigmaAlphaMu">Sigma Alpha Mu</a></li> -->
<!-- <li><a href="?a=FraternityQuad&b=SigmaChi">Sigma Chi</a></li> -->
<!-- <li><a href="?a=FraternityQuad&b=SigmaPhiEpsilon">Sigma Phi Epsilon</a></li> -->
<!-- <li><a href="?a=FraternityQuad&b=ThetaChi">Theta Chi</a></li> -->
</ul>
</div>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Hill Court<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="?a=HillCourt&b=Chambers">Chambers</a></li>
<li><a href="?a=HillCourt&b=Fairchild">Fairchild</a></li>
<li><a href="?a=HillCourt&b=Gale">Gale</a></li>
<li><a href="?a=HillCourt&b=Kendrick">Kendrick</a></li>
<li><a href="?a=HillCourt&b=Munro">Munro</a></li>
<li><a href="?a=HillCourt&b=Slater">Slater</a></li>
</ul>
</div>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Jackson Court<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="?a=JacksonCourt&b=Anderson">Anderson</a></li>
<li><a href="?a=JacksonCourt&b=Wilder">Wilder</a></li>
<li><a href="?a=JacksonCourt&b=O-Brien">O-Brien</a></li>
</ul>
</div>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Res Quad<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="?a=ResQuad&b=Burton">Burton</a></li>
<li><a href="?a=ResQuad&b=Crosby">Crosby</a></li>
<li><a href="?a=ResQuad&b=Gilbert">Gilbert</a></li>
<li><a href="?a=ResQuad&b=Hoeing">Hoeing</a></li>
<li><a href="?a=ResQuad&b=Lovejoy">Lovejoy</a></li>
<li><a href="?a=ResQuad&b=Tiernan">Tiernan</a></li>
</ul>
</div>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Riverview<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="?a=Riverview&b=A">Building A</a></li>
<li><a href="?a=Riverview&b=B">Building B</a></li>
<li><a href="?a=Riverview&b=C">Building C</a></li>
<li><a href="?a=Riverview&b=D">Building D</a></li>
<li><a href="?a=Riverview&b=E">Building E</a></li>
</ul>
</div>
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Southside<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="?a=Southside&b=deKiewiet">deKiewiet</a></li>
<li><a href="?a=Southside&b=Maisonettes">Maisonettes</a></li>
<li><a href="?a=Southside&b=Valentine">Valentine</a></li>
</ul>
</div>
</div>
<p>
<span id="floorPlan">Floor plan </span>
<div class="Viewer">
</div>
</p>
<p>
<span id="floor">Floor Number</span>
<div class="Floor">
<p>
<form>
<select id="myList" onchange="updateRoom()">
</select>
</form>
</p>
</div>
</p>
<p>
<span id="roomNumber"> Room numbers </span>
<div class="Rooms">
<br/>
<ul>
</ul>
</div>
</p>
</body>
</html>