-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
238 lines (211 loc) · 9.75 KB
/
admin.html
File metadata and controls
238 lines (211 loc) · 9.75 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
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
<!DOCTYPE HTML>
<!-- admin.html is homepage view. Will allow user to create/manage class -->
<html>
<head>
<meta charset="UTF-8">
<title>Admin View</title>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="stylesheets/bootstrap.min.css"/>
<link rel="stylesheet" href="stylesheets/style.css"/>
<link rel="stylesheet" href="stylesheets/admin.css"/>
<script type="text/javascript" src="js/d3.min.js" charset="utf-8"></script>
</head>
<body hidden>
<div class="container">
<div class="col-md-4">
<h3 id="error_frame"></h3>
</div>
<br/>
<div class="col-md-12">
<!-- Main View Begins-->
<div class="username_password_view" hidden>
<!-- Title -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4">
<h2 class="section_title"> Admin Login </h2>
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
<!-- Text Fields and Login Button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4">
<input type="text" class="form-control username" id="user_id" name="user_id" required="" placeholder="User ID"/><br/>
<input type="password" class="form-control password" id="password" name="password" required="" placeholder="Password"/><br/>
<input class="btn btn-lg btn-primary btn-block login_button" type="submit" value="Login" id="login"/><br/>
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
<!-- New user button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4" id="newuser_div">
<p class="section_title"> New User? </p>
<input class="btn btn-default new_user" type="button" value="Click Here" /><br/><br/>
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
</div>
<!-- Create User View -->
<div class="create_user_view" hidden>
<!-- Title -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4">
<h2 class="section_title"> New Admin </h2>
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
<!-- Text Fields and Create Admin Button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4">
<input type="text" class="form-control new_username" id="user_id" name="user_id" required="" placeholder="New Username"/><br/>
<input type="password" class="form-control new_password" id="password" name="password" required="" placeholder="Password"/><br/>
<input type="password" class="form-control re_new_password" id="password" name="password" required="" placeholder="Re-Type Password"/><br/>
<input type="password" class="form-control Secret" id="password" name="password" required="" placeholder="Secret Code"/><br/>
<input class="btn btn-lg btn-primary btn-block create_admin_button" type="submit" value="Create Admin"/><br/>
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
<input class="btn btn-default create_admin_back" type="submit" value="Back"/><br/><br/>
</div>
<!-- This div appears when an admin leaves a class or has not made on yet -->
<div class="create_view" hidden>
<!-- Heading for classes view -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4" id="joinclass_div">
<h2 class="section_title"> Click To Join A Class </h2></div>
<div class="col-md-4 col-sm-4"></div>
</div>
<div>
<h3 id="get-classes-head"></h3>
<div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" id="get-classes"></div>
</div>
<div></div>
<!-- Line Break -->
<table width="100%">
<td><hr/></td>
<td style="width:1px; padding: 0px 10px; white-space: nowrap;">OR</td>
<td><hr /></td>
</table>
<!-- New Class heading -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4">
<h3 class="section_title"> Create New Class</h3></div>
<div class="col-md-4 col-sm-4"></div>
</div>
<!-- New Class -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4">
<input type="text" class="form-control class_input" id="class_input" name="class_input" required="" placeholder="Class Name"/>
<p class = "error error_class_input" hidden> Class Name Already Exists </p> <br/>
<input type="number" class="form-control group_input" id="group_input" name="group_input" min="0" required="" placeholder="Number Of Groups"/><br/>
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
<!-- The buttons -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4"></div>
<div class="col-md-4 col-sm-4" id="logout_div">
<input class="btn btn-primary btn-block create_button" type="button" value="Create Class" /><br/>
<input id = "logout_class_button" class="btn btn-danger logout_class_button" type="button" value="Logout">
</div>
<div class="col-md-4 col-sm-4"></div>
</div>
<!-- End Of Buttons -->
</div>
<!-- This div appears once an admin has created a class -->
<div class="manage_view" hidden>
<header>
<h3 class="class_name"></h3>
</header>
<input class="btn btn-default settings_button" type="button" value="Settings" data-toggle="modal" data-target="#settings_modal">
<input class="btn btn-default add_button" type="button" value="Add Group">
<input class="btn btn-default delete_button" type="button" value="Delete Group">
<input class="btn btn-default leave_button" type="button" value="Leave Class">
<ul class="groups"></ul>
</div>
<!-- Settings Modal -->
<div class="settings_view">
<div class="modal fade" id="settings_modal" tabindex="-1" role="dialog" aria-labelledby="modal_settings_label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="modal_settings_label"> Settings </h4>
</div>
<div class="modal-body row">
<div class="col-md-12 col-sm-12">
<!-- Left Column -->
<div class="col-md-6 col-sm-6">
<div class="row">
<div class="col-md-2 col-sm-2">
<div class="onoffswitch">
<input type="checkbox" name="Hide Options" class="onoffswitch-checkbox setting" id="hide_options">
<label class="onoffswitch-label" for="hide_options"></label>
</div>
</div>
<div class="col-md-10 col-sm-10">
<span class="checkboxtext">Hide Options</span>
</div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2">
<div class="onoffswitch">
<input type="checkbox" name="Test2" class="onoffswitch-checkbox setting" id="test2">
<label class="onoffswitch-label" for="test2"></label>
</div>
</div>
<div class="col-md-10 col-sm-10">
<span class="checkboxtext">Test 2</span>
</div>
</div>
<div class="row">
<div class="col-md-2 col-sm-2">
<div class="onoffswitch">
<input type="checkbox" name="Test3" class="onoffswitch-checkbox setting" id="test3">
<label class="onoffswitch-label" for="test3"></label>
</div>
</div>
<div class="col-md-10 col-sm-10">
<span class="checkboxtext">Test 3</span>
</div>
</div>
</div>
<!-- Right Column -->
<div class="col-md-6 col-sm-6">
</div>
</div>
</div>
<div class="modal-footer">
<input class="btn btn-default save_button" type="button" value="Save Settings">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<script src="js/jquery.min.js"></script>
<script src="js/socket.io-1.3.5.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/host.js"></script>
<script src="js/admin_functions.js"></script>
<script src="js/admin.js"></script>
<script src="js/admin_fields5.js"></script>
<script src="js/admin_sockets.js"></script>
<script>
var socket = Admin.Socket(io(host));
</script>
</footer>
</body>
</html>