-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforum.html
More file actions
363 lines (308 loc) · 13 KB
/
forum.html
File metadata and controls
363 lines (308 loc) · 13 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://code.jquery.com/jquery-3.4.1.min.js" i ntegrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/forum.css">
<script type="text/javascript" src="./js/discussion.js">
</script>
<script type="text/javascript" src=js/main.js>
</script>
<title>forum</title>
<!-- Navbar -->
<div class="w3-top">
<div class="w3-bar w3-white w3-card w3-left-align w3-large">
<a class="w3-bar-item w3-button w3-hide-medium w3-hide-large w3-right w3-padding-large w3-hover-purple w3-large w3-purple" href="javascript:void(0);" onclick="myFunction()" title="Toggle Navigation Menu"><i
class="fa fa-bars"></i></a>
<a href="cal.html" class="w3-bar-item w3-button w3-hide-small w3-padding-large">Calendar</a>
<a href="availability.html" class="w3-bar-item w3-button w3-hide-small w3-padding-large">Availability</a>
<a href="coverShift.html" class="w3-bar-item w3-button w3-hide-small w3-padding-large">Cover Shift</a>
<a href="#" class="w3-bar-item w3-button w3-hide-small w3-padding-large">Forum</a>
</div>
</div>
</head>
<body>
<iframe class="frame" src="http://www.piazza.com/" onload='javascript:(function(o){o.style.height=o.contentWindow.document.body.scrollHeight+"px";}(this));' style="height:600px;width:100%;border:none;overflow:hidden;margin-top:50px;"></iframe>
<!-- Start of forum layout -->
<!-- <div class="container">
<div class="classWrapper">
<div>
<h1 id="className">No class selected</h1>
</div>
<div class="box">
<select id="classes" onchange="getSelectedValue()">
<option value="" selected disabled hidden>Choose A Class</option>
<option value="CS 101">CS 101</option>
<option value="CS 149">CS 149</option>
<option value="CS 159">CS 159</option>
<option value="CS 240">CS 240</option>
<option value="CS 227">CS 227</option>
<option value="CS 261">CS 261</option>
</select>
</div>
</div>
<!-- <div id="category1" class="row categoryModule">
<div class="col-lg-12 columnPad">
<div class="categoryWrapper">
<button class="discussionTitle" onclick="toggleDiscussion()">Help with PA1</button>
</div>
</div>
<div id="dropdown1" class="row forumPad">
<a href="#" id="questionButton" class="btn btn-primary themeButton" onclick="toggleQuestion()">Ask a Question</a>
<table id="forumTable" class="forumTable">
<thead>
<th>
Question
</th>
<th>
Author
</th>
<th class="pullRight">
Replies
</th>
</thead>
<tr class="forumModule">
<td>
<a href="#">Question summary Here</a>
</td>
<td>
ehrlicjd
</td>
<td class="pullRight">
3
</td>
</tr>
<tr class="forumModule">
<td>
<a href="#">Question summary Here</a>
</td>
<td>
mattewtd
</td>
<td class>
3
</td>
</tr>
</table>
</div>
</div> -->
<div id="newTopic">
<a href="#" id="discussionButton" class="btn btn-primary themeButton" onclick="toggleDiscussion()">Add a new discussion</a>
</div>
<div class="modalWrapper">
<div id="modalDiscussionPresent" class="modal">
<form id="discussionForm" class="modal-content animate">
<div class="container">
<label for="Topic Summary"><b>Topic Summary</b></label>
<input type="text" placeholder="Please enter a brief description of your topic..." id="categoryDescription" name="topicDescription" required><br>
<div class="modalFormButtons">
<button type="button" id="cancel" onclick="toggleDiscussion()" class="cancelbtn">Cancel</button>
<button id="discussionFormSubmit" class="submitbutton" type="submit">Submit</button>
</div>
</div>
</form>
</div>
</div>
<div class="modalWrapper">
<div id="modalQuestionPresent" class="modal">
<form class="modal-content animate" action="/action_page.php" method="post">
<div class="container">
<label for="Question Summary"><b>Question Description</b></label>
<input type="text" id="questionDescription" placeholder="Please enter a brief discription of your question" name="questionDescription" required><br>
<div id="details">
<label id="detailsLabel" for="details"><b>Details</b></label>
<textarea id="detailsTextArea" name="questionDetails" rows="8" cols="80" form="modal-content"></textarea> <br>
</div>
<div class="modalFormButtons">
<button type="button" id="cancel" onclick="toggleQuestion()" class="cancelbtn">Cancel</button>
<button id="questionSubmitButton" type="submit">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<style>
body {
margin: 0;
min-width: 250px;
}
/* Include the padding and border in an element's total width and height */
* {
box-sizing: border-box;
}
/* Remove margins and padding from the list */
ul {
margin: 0;
padding: 0;
}
/* Style the list items */
ul li {
cursor: pointer;
position: relative;
padding: 12px 8px 12px 40px;
list-style-type: none;
background: #eee;
font-size: 18px;
transition: 0.2s;
/* make the list items unselectable */
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Set all odd list items to a different color (zebra-stripes) */
ul li:nth-child(odd) {
background: #f9f9f9;
}
/* Darker background-color on hover */
ul li:hover {
background: #ddd;
}
/* When clicked on, add a background color and strike out text */
ul li.checked {
background: #888;
color: #fff;
text-decoration: line-through;
}
/* Add a "checked" mark when clicked on */
ul li.checked::before {
content: '';
position: absolute;
border-color: #fff;
border-style: solid;
border-width: 0 2px 2px 0;
top: 10px;
left: 16px;
transform: rotate(45deg);
height: 15px;
width: 7px;
}
/* Style the close button */
.close {
position: absolute;
right: 0;
top: 0;
padding: 12px 16px 12px 16px;
}
.close:hover {
background-color: #450084;
color: white;
}
/* Style the header */
.header {
background-color: #450084;
padding: 30px 40px;
color: white;
text-align: center;
}
/* Clear floats after the header */
.header:after {
content: "";
display: table;
clear: both;
}
/* Style the input */
input {
margin: 0;
border: none;
border-radius: 0;
width: 75%;
padding: 10px;
float: left;
font-size: 16px;
}
/* Style the "Add" button */
.addBtn {
padding: 13px;
width: 25%;
background: #d9d9d9;
color: #555;
float: left;
text-align: center;
font-size: 16px;
cursor: pointer;
transition: 0.3s;
border-radius: 0;
}
input#myInput.nameinput {
width: 75%;
margin: 0;
}
.addBtn:hover {
background-color: #bbb;
}
</style>
</head>
<body>
<div id="myDIV" class="header">
<h2 style="margin:15px">Queue</h2>
<input class="nameinput" type="text" id="myInput" placeholder="Title...">
<span onclick="newElement()" class="addBtn">Add</span>
</div>
<ul id="myUL">
</ul>
<script>
// Create a "close" button and append it to each list item
var myNodelist = document.getElementsByTagName("LI");
var i;
for (i = 0; i < myNodelist.length; i++) {
var span = document.createElement("SPAN");
var txt = document.createTextNode("\u00D7");
span.className = "close";
span.appendChild(txt);
myNodelist[i].appendChild(span);
}
// Click on a close button to hide the current list item
var close = document.getElementsByClassName("close");
var i;
for (i = 0; i < close.length; i++) {
close[i].onclick = function() {
var div = this.parentElement;
div.style.display = "none";
}
}
// Add a "checked" symbol when clicking on a list item
var list = document.querySelector('ul');
list.addEventListener('click', function(ev) {
if (ev.target.tagName === 'LI') {
ev.target.classList.toggle('checked');
}
}, false);
// Create a new list item when clicking on the "Add" button
function newElement() {
var li = document.createElement("li");
var inputValue = document.getElementById("myInput").value;
var t = document.createTextNode(inputValue);
li.appendChild(t);
if (inputValue === '') {
alert("You must write something!");
} else {
document.getElementById("myUL").appendChild(li);
}
document.getElementById("myInput").value = "";
var span = document.createElement("SPAN");
var txt = document.createTextNode("\u00D7");
span.className = "close";
span.appendChild(txt);
li.appendChild(span);
for (i = 0; i < close.length; i++) {
close[i].onclick = function() {
var div = this.parentElement;
div.style.display = "none";
}
}
}
</script> -->
</body>
</html>