-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathadmin.html
491 lines (424 loc) · 24.3 KB
/
admin.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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
<!DOCTYPE HTML>
<!-- admin.html is homepage view. Will allow user to create/manage class -->
<html>
<head>
<meta charset="UTF-8">
<title>MathNet 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="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/admin.css"/>
<link rel="stylesheet" type="text/css" href="js/jquery-ui/jquery-ui.min.css">
</head>
<body id="body">
<div class="container" hidden>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#admin" aria-controls="design" role="tab" data-toggle="tab" id="admin_tab">Admin</a></li>
<li role="presentation"><a href="#settings" aria-controls="design" role="tab" data-toggle="tab" id="settings_tab" style="display:none">Settings</a></li>
<li role="presentation"><a href="#design" aria-controls="design" role="tab" data-toggle="tab" id="design_tab" style="display:none">Design</a></li>
<li role="presentation"><a href="#view" aria-controls="design" role="tab" data-toggle="tab" id="view_tab" style="display:none">View</a></li>
<li role="presentation"><a href="#filtered_merged_view" aria-controls="design" role="tab" data-toggle="tab" id="filtered_merged_view_tab" style="display:none">Filtered Merged View</a></li>
<li role="presentation"><a href="#overlayed_image_view" aria-controls="design" role="tab" data-toggle="tab" id="overlayed_image_view_tab" style="display:none">Overlayed Image View</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="admin">
<div class="col-md-12 col-sm-12">
<h3 id="error_frame"></h3>
</div>
<div class="col-md-12 col-sm-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 col-md-offset-4 col-sm-offset-4">
<h2 style="text-align: center"> Admin Login </h2>
</div>
</div>
<!-- Text Fields and Login Button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<input type="text" class="form-control username" name="user_id" required="" placeholder="User ID"/>
<p class = "error error_username" hidden> User ID does not exist </p> <br/>
<input type="password" class="form-control password" name="password" required="" placeholder="Password"/>
<p class = "error error_password" hidden> Wrong Password Try Again </p> <br/>
</div>
</div>
<!-- New To Math Net -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<input class="btn btn-lg btn-primary btn-block login_button" type="submit" value="Login"/><br/>
<p style="text-align: center"> New to Math Net? </p>
</div>
</div>
<!-- New user button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4" style="text-align: center">
<input class="btn btn-default new_user" type="button" value="Click Here" /><br/><br/>
</div>
</div>
</div>
<!-- Main View Ends-->
<!-- Username View Begins -->
<div class="create_user_view" hidden>
<!-- Title -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<h2 style="text-align: center"> New Admin </h2>
</div>
</div>
<!-- Text Fields and Create Admin Button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<input type="text" class="form-control new_username" id="new_username" name="new_username" required="" placeholder="New Username"/>
<p class = "error error_new_username" hidden> Username Already Exists </p> <br/>
<input type="password" class="form-control new_password" id="new_password" name="new_password" required="" placeholder="Password"/><br/>
<input type="password" class="form-control re_new_password" id="re_new_password" name="re_new_password" required="" placeholder="Re-Type Password"/>
<p class = "error error_re_new_password" hidden> Both Passwords Do Not Match </p> <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>
<input class="btn btn-default create_admin_back" type="submit" value="Back"/><br/><br/>
</div>
<!-- Username View Ends -->
<h5 class = "ping"> Ping : 0 </h5>
<!-- This div appears when an admin leaves a class or has not made on yet -->
<div class="create_view" style="display:none">
<!-- Heading for classes view -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<h2 style="text-align: center"> Click To Join A Class </h2></div>
</div>
<!-- All classes -->
<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>
<!-- Line Break -->
<table width="100%">
<td><hr/></td>
<td style="width:1px; padding: 0 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 col-md-offset-4 col-sm-offset-4">
<h3 style="text-align: center"> Create New Class</h3>
</div>
</div>
<!-- New Class -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-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/>
<p class = "error empty_class_input" hidden> Class Name Can't Be Empty </p> <br/>
<input type="number" class="form-control group_input" id="group_input" name="group_input" required="" placeholder="Number Of Groups"/><br/>
</div>
</div>
<!-- The buttons -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4" style="text-align: center">
<input class="btn btn-primary btn-block create_button" type="button" value="Create Class" /><br/><br/>
<input id = "logout_class_button" class="btn btn-default btn-danger logout_class_button" type="button" value="Logout">
</div>
</div>
<!-- End Of Buttons -->
</div>
<!-- This div appears once an admin has created a class -->
<div class="class_view" style="display:none">
<!-- Title -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4">
<input class="btn btn-default btn-danger leave_button" type="button" style="margin-right:1em;" value="Leave Class">
<input id = "delete_class_button" class="btn btn-danger delete_class_button" type="button" value="Delete Class">
</div>
<div class="col-md-4 col-sm-4">
<h1 class = "class_name" style = "text-align: center; margin-top:-5px;"></h1>
<a id="student_class_id_link" target="_blank"><h3 class = "class_id" style = "text-align: center; margin-top:-5px;"></h3></a>
</div>
<div class="col-md-4 col-sm-4">
<input class="btn btn-primary add_button" type="button" style="float:right;" value="Add Group">
<input class="btn btn-primary delete_button" type="button" style="float:right; margin-right: 1em;" value="Delete Group">  
<br/><br/>
</div>
</div>
<!-- The place to store the lists -->
<div class="manage_view" hidden>
<ul class="groups" ></ul>
</div>
<!-- Line Break -->
<table width="100%">
<td><hr/></td>
<td style="width:1px; padding: 0 10px; white-space: nowrap;">GROUPS AND STUDENTS</td>
<td><hr /></td>
</table> <br/>
<div class="col-md-12 lists"></div>
</div>
</div>
</div> <!-- End of admin tab -->
<!-- Settings tab -->
<div role="tabpanel" class="tab-pane" id="settings">
<div class="col-md-12 col-sm-12">
<h3> Settings </h3>
<h4> Change Password </h4>
<p class="error error_password_mismatch" hidden> Passwords do not match <br/> </p>
<p class="error error_password_incorrect" hidden> Incorrect password <br/> </p>
<input type="password" class="form-control" id="current_password" name="password" required="" placeholder="Current password"/>
<input type="password" class="form-control" id="changed_password" name="password" required="" placeholder="New password"/>
<input type="password" class="form-control" id="retyped_changed_password" name="password" required="" placeholder="Retype new password"/>
<input class="btn btn-md btn-primary btn-block" type="submit" value="Submit" id="change_password_button"/>
</div>
</div> <!-- End of settings tab -->
<div role="tabpanel" class="tab-pane" id="design">
<div class="col-md-12 col-sm-12">
<h3> Designer</h3>
<h5 class = "ping"> Ping : 0 </h5>
<button class="accordion">CREATE</button>
<div class="panel panel-accordion col-md-12 col-sm-12"> <br/>
<div class="construction_stuff">
<p id = "hello"> Select Construction </p>
<div class="">
<select id="construction_select" style="display:block;width:30%;clear:both;height:100px;" size="1000"></select>
<div>
<button class="btn btn-primary btn-useconstruction">Use Construction</button>
<button class="btn btn-primary btn-saveconstruction">Save Construction</button>
<button class="btn btn-primary btn-deleteconstruction">Delete Construction</button>
</div>
</div>
<div class=""> Select Group to Send View to <br/>
<select multiple="true" style="display:block;width:30%;clear:both;height:100px;" class="construction_groups"></select>
<button class="btn btn-primary btn-sendconstruction">Send View</button>
<button class="btn btn-primary btn-sendconstructionall">Send View to All</button>   
<label>
<input type="checkbox" id="toggle-menu-bar" value="1" checked> Show menu bar </input> 
</label>
<label>
<input type="checkbox" id="send-toolbar-checkbox" value="1" checked> Send Toolbar </input>
</label>
</div>
</div>
<button class="btn btn-primary btn-resetview">Reset View</button>
<div class="javascriptapplet">
<div class="geogebrawebapplet applet-activity-designer" id="appletContainer" style="width:100%;height:650px;display: block;"></div>
</div>
<br/><br/><br/>
</div>
<button class="btn btn-primary accordion">CUSTOMIZE</button>
<div class="panel panel-accordion">
<div>
<div class="toolbox col-md-8 col-sm-12"></div>
<div class="col-md-4 col-sm-12">
<div class="checkbox">
<div>
<p id = "hello"> Select Default ToolBar </p>
<select id="toolbar_select" size="1000"></select>
<div>
<button class="btn btn-primary btn-usetoolbar">Use Toolbar</button>
<button class="btn btn-primary btn-deletetoolbar">Delete Toolbar</button>
</div>
</div>
</div>
</div>
</div>
<div class="ggbtoolbar row">
<div class="col-md-8 col-sm-12">
<div id = "toolbar-target-0" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-1" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-2" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-3" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-4" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-5" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-6" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-7" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-8" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-9" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-10" class="col-md-1 col-sm-1 toolbar-target"></div>
<div id = "toolbar-target-11" class="col-md-1 col-sm-1 toolbar-target"></div>
<button class="btn btn-primary btn-savetoolbar" style="margin: 0 0 0 .5em" title="Save toolbar"><span class="glyphicon glyphicon-save" aria-hidden="true" style= "font-size:1.5em;margin-right:-2px"></span></button>
<button id="trash" class ="btn-trash btn btn-default" type="button" style="margin:0 .5em" title="Clear toolbar">
<span class="glyphicon glyphicon-trash" aria-hidden="true" style= "font-size:1.5em;margin-left:-2px"></span>
</button>
</div>
<div class="col-md-4 col-sm-12">
<input type="checkbox" id="axisToggle" checked> Axis Display</input>
<input type="checkbox" id="gridToggle" checked> Grid Display</input><br/>
Perspective
<select id="perspectiveSelect">
<option value="AG" selected>AlgebraGraphics</option>
<option value="A">Algebra</option>
<option value="G">Graphics</option>
<option value="S">Spreadsheet</option>
<option value="AS">AlgebraSpreadsheet</option>
<option value="GS">GraphicsSpreadsheet</option>
</select><br/>
<input type="checkbox" id="boxToggle">Manual Perspective Input</input><br/>
<div id="perspectiveBox">
<input type="text" id="perspective"></input> 
<span class="glyphicon glyphicon-question-sign" data-toggle="tooltip" data-html="true" offset="0 50px" id="pHelp" title="<table><tr><th>Letter</th> <th> View</th></tr><tr><td>A</td> <td>Algebra</td></tr><tr><td>B</td> <td>Probability Calculator</td></tr><tr><td>C</td> <td>CAS</td></tr><tr><td>D</td> <td>Graphics 2</td></tr><tr><td>G</td> <td>Graphics</td></tr><tr><td>L</td> <td>Construction Protocol</td></tr><tr><td>P</td> <td>Properties</td></tr><tr><td>S</td> <td>Spreadsheet</td></tr><tr><td>T</td> <td>3D Graphics</td></tr></table>
Example values: A, AG, A/G, A/(GS), with AG split vertically, A/G horizontally, and A/(GS) horizontally then vertically."></span>
<br/>
</div><br/>
<div id="coord-axis">
Window Dimensions <br/>
<span style="margin-left:105px;">Y Max</span> <br/>
<input type="text" id="coord_y_max" style="margin-left:100px;"></input><br/>
X Min <input type="text" id="coord_x_min"></input>  
<input type="text" id="coord_x_max" style="margin-left:50px;"></input> X Max <br/>
<input type="text" id="coord_y_min" style="margin-left:100px;"></input> <br/>
<span style="margin-left:105px;">Y Min</span> <br/>
Axis Steps <br/>
X-axis <input type="text" id="axis_step_x"></input>  
Y-axis <input type="text" id="axis_step_y"></input>  
Z-axis <input type="text" id="axis_step_z"></input> <br/>
<!-- Code for Graphics 2 -->
<br/>
<input type="checkbox" id="g2Toggle" checked> Use the Above Settings for Graphics 2</input>
<div id = 'g2Box'>
<h4> Graphics 2 </h4>
<input type="checkbox" id="g2axisToggle" checked> Axis Display</input>
<input type="checkbox" id="g2gridToggle" checked> Grid Display</input><br/>
<br/>
<div id="g2coord-axis">
Window Dimensions <br/>
<span style="margin-left:105px;">Y Max</span> <br/>
<input type="text" id="g2coord_y_max" style="margin-left:100px;"></input><br/>
X Min <input type="text" id="g2coord_x_min"></input>  
<input type="text" id="g2coord_x_max" style="margin-left:50px;"></input> X Max <br/>
<input type="text" id="g2coord_y_min" style="margin-left:100px;"></input> <br/>
<span style="margin-left:105px;">Y Min</span> <br/>
Axis Steps <br/>
X-axis <input type="text" id="g2axis_step_x"></input>  
Y-axis <input type="text" id="g2axis_step_y"></input>  
Z-axis <input type="text" id="g2axis_step_z"></input> <br/>
</div>
</div>
<!-- End of Code for Graphics 2 -->
</div>
<div class = "shifted">
<h1 style=" font-size: 1.2em; margin:0 0 .5em 0;">Class users</h1>
<select multiple="true" style="display:block;width:60%;clear:both;height:150px" class="toolbar_users"></select>
<button class="btn btn-primary btn-sendtoolbar" title="Send toolbar to users">Send Changes</button>
<!-- add the check boxes for settings, use same selection method as send tools. -->
</div>
</div>
</div>
<br/><br/><br/>
</div>
</div>
</div> <!-- End of design tab -->
<div role="tabpanel" class="tab-pane" id="view">
<div class="col-md-12">
<h3>Class View</h3>
<h5 class = "ping"> Ping : 0 </h5>
<div id="views_checkboxes" class="panel panel-default"></div>
<div id="clear_buttons">
<input class="btn btn-danger clear_class_button" type="button" value="Clear Class">
<input class="btn btn-primary clear_group_button" type="button" value="Clear Group"></br>
<form class="choices"></form>
</div>
<div class="javascriptapplet" id="views_jsapp"></div>
</div>
</div> <!-- End of view tab -->
<!-- Filtered Merged View Tab -->
<div role="tabpanel" class="tab-pane" id="filtered_merged_view">
<div class="col-md-12">
<h3>Individual Group Views</h3>
<h5 class = "ping"> Ping : 0 </h5>
<div id="group_select_checkboxes" class="panel panel-default"></div>
<div id="filter_merge_items" class="panel panel-default"></div>
<div class="javascriptapplet" id="individual_groups_view_jsapps"></div>
<div class="javascriptapplet" id="filtered_merge"></div>
</div>
</div> <!-- End of filtered merged view tab -->
<!-- Overlayed Image View Tab -->
<div role="tabpanel" class="tab-pane" id="overlayed_image_view">
<div class="col-md-12">
<h3>Individual Group Views</h3>
<h5 class = "ping"> Ping : 0 </h5>
<div id="overlayed_image_views_checkboxes" class="panel panel-default"></div>
<div class="javascriptapplet" id="overlayed_image_views_jsapps"></div>
<br>
<div id="overlayed_image_div" class="panel panel-default"></div>
</div>
</div> <!-- End of overlayed image view tab -->
</div> <!-- End of table-content -->
</div> <!-- End of container -->
<!-- Redirect Modal -->
<div id="redirect_modal" class="modal fad" tabindex="-1" role="dialog" aria-labelledby="modal_redirect_label">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="modal_redirect_label"> Enter a Username </h4>
</div> <!-- modal-header -->
<div class="modal-body">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="error col-md-4" id="redirect_username_error_admin" hidden>
<p> Username <strong>admin</strong> not allowed. </p>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="error col-md-4" id="redirect_username_error" hidden>
<p> Username must be less than or equal to 8 characters long and must start with an alphabetic character. </p>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<input type="text" class="form-control" id="redirect_username" name="user_id" required="" placeholder="Username"/>
</div>
</div>
<br/><br/>
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4">
<input class="btn btn-md btn-primary btn-block" type="submit" value="Login" id="redirect_login"/><br/>
</div>
</div>
<br/><br/>
</div> <!-- modal-body -->
</div> <!-- modal-content -->
</div> <!-- modal-dialog -->
</div> <!-- Redirect Modal -->
<footer>
<script src="js/jquery-2.2.3.min.js"></script>
<script src="js/socket.io-2.2.0.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/lodash.min.js"></script>
<script src="js/host.js"></script>
<script src="js/admin_vars.js"></script>
<script src="js/admin_sockets.js"></script>
<script src="js/admin_functions.js"></script>
<script src="js/admin.js"></script>
<script type="text/javascript" src="js/deployggb.js"></script>
<script src="js/ggbapplet_functions.js"></script>
<script src="js/Queue.js"></script>
<script>
var admin_xml_update_queue = new Queue();
$(document).ready(function() {
$('#body').show();
});
var socket = Admin.Socket(io(host));
var acc = document.getElementsByClassName("accordion");
for (var i = 0; i < acc.length; i++) {
acc[i].onclick = function() {
this.classList.toggle("active");
this.nextElementSibling.classList.toggle("show");
}
}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-87061901-2', 'auto');
ga('send', 'pageview');
</script>
</footer>
</body>
</html>