-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
370 lines (359 loc) · 11.4 KB
/
index.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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - BBA Final Project</title>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/bigfishtv-turret/5.2.1/turretcss.min.css'>
</head>
<body>
<!-- partial:index.partial.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="all.js" type="text/javascript"></script>
</head>
<body>
<!-- page 1 -->
<div class="container" id="page1">
<div class="row text-center">
<div class="col">
<h1>What's our friend's name?</h1>
</div>
</div>
<div class="row text-center">
<div class="col">
<input type="text" class="form-control" id="name" placeholder="Enter a name (e.g. John)">
</div>
<div class="col-2">
<button type="button" class="btn btn-primary" onclick="page1submit()">
Submit
</button>
</div>
</div>
</div>
<!-- page 2 -->
<div class="container d-none" id="page2">
<div class="row text-center" >
<div class="col" id="page2title"></div>
</div>
<div class="row">
<div class="col text-left" id="page2morning"></div>
<div class="col-2 text-left">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#actionadder" onclick="settime(1)">
+
</button>
</div>
</div>
<div class="row">
<div class="col text-left" id="time1"></div>
</div>
<div class="row">
<div class="col text-left" id="page2noon"></div>
<div class="col-2 text-left">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#actionadder" onclick="settime(2)">
+
</button>
</div>
</div>
<div class="row">
<div class="col text-left" id="time2"></div>
</div>
<div class="row">
<div class="col text-left" id="page2after"></div>
<div class="col-2 text-left">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#actionadder" onclick="settime(3)">
+
</button>
</div>
</div>
<div class="row">
<div class="col text-left" id="time3"></div>
</div>
<div class="row">
<div class="col text-left" id="page2night"></div>
<div class="col-2 text-left">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#actionadder" onclick="settime(4)">
+
</button>
</div>
</div>
<div class="row">
<div class="col text-left" id="time4"></div>
</div>
<div class="row">
<div class="col text-right">
<button type="button" class="btn btn-primary" onclick="resetpage2()">Reset All</button>
</div>
<div class="col text-left">
<button type="button" class="btn btn-primary" onclick="page2submit()">Submit</button>
</div>
</div>
</div>
<!-- action adder modal -->
<div class="modal fade" id="actionadder" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Please select an activity or activities</h5>
</div>
<div class="modal-body">
<select class="form-control" id="actioninput" onchange="updateselect()">
<option value="1">Daily routine</option>
<option value="2">Entertainment</option>
<option value="3">Exercise</option>
<option value="4">Learning</option>
</select>
<select class="form-control" id="actioninput2">
<option value="1">Breakfast</option>
<option value="2">Lunch</option>
<option value="3">Dinner</option>
<option value="4">Shower</option>
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="addaction()">Add</button>
</div>
</div>
</div>
</div>
<!-- page 3 -->
<div class="container d-none" id="page3">
<div class="row">
<div class="col text-center">
<h1>Does this look right?</h1>
</div>
</div>
<div class="row">
<table class="table text-center">
<thead class="thead-light">
<tr>
<th>ACTIVITIES</th>
</tr>
</thead>
<tbody id="actionsdisplay">
</tbody>
</table>
</div>
<div class="row">
<div class="col text-right">
<button type="button" class="btn btn-secondary" onclick="back2page2()">No</button>
</div>
<div class="col text-left">
<button type="button" class="btn btn-success" onclick="page3submit()">Yes</button>
</div>
</div>
</div>
<!-- page 4 -->
<div class="container d-none" id="page4">
<div class="row">
<div class="col text-center">
<h1>Time & Location for:</h1>
</div>
</div>
<div class="row">
<table class="table text-center">
<thead class="thead-light">
<tr>
<th>ACTIVITIES</th>
<th>LOCATION</th>
<th>TIME (min)</th>
</tr>
</thead>
<tbody id="timelocation">
</tbody>
</table>
</div>
<div class="row">
<div class="col text-center">
<h1>Transition Time (min)</h1>
</div>
</div>
<div class="row">
<div class="col-4 text-right">
Home ← → Gym
</div>
<div class="col-4">
<input type="text" class="form-control" id="ttt0" placeholder="Enter a number (integer)">
</div>
</div>
<div class="row">
<div class="col-4 text-right">
Home ← → School
</div>
<div class="col-4">
<input type="text" class="form-control" id="ttt1" placeholder="Enter a number (integer)">
</div>
</div>
<div class="row">
<div class="col-4 text-right">
Home ← → Friend's place
</div>
<div class="col-4">
<input type="text" class="form-control" id="ttt2" placeholder="Enter a number (integer)">
</div>
</div>
<div class="row">
<div class="col-4 text-right">
Gym ← → School
</div>
<div class="col-4">
<input type="text" class="form-control" id="ttt3" placeholder="Enter a number (integer)">
</div>
</div>
<div class="row">
<div class="col-4 text-right">
Gym ← → Friend's place
</div>
<div class="col-4">
<input type="text" class="form-control" id="ttt4" placeholder="Enter a number (integer)">
</div>
</div>
<div class="row">
<div class="col-4 text-right">
School ← → Friend's place
</div>
<div class="col-4">
<input type="text" class="form-control" id="ttt5" placeholder="Enter a number (integer)">
</div>
</div>
<div class="row">
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="page4submit()">Submit</button>
</div>
</div>
</div>
<!-- page 5 -->
<div class="container d-none" id="page5">
<div class="row">
<div class="col text-center" id="page5title"></div>
</div>
<div class="row">
<table class="table text-center">
<thead class="thead-light">
<tr>
<th style="width: 5%">#</th>
<th>ACTIVITIES INFO</th>
<th style="width: 5%"></th>
<th style="width: 5%"></th>
</tr>
</thead>
<tbody id="activityorder">
</tbody>
</table>
</div>
<div class="row">
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="back2page4()">Back</button>
</div>
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="page5submit()">Submit</button>
</div>
</div>
</div>
<!-- page 6 -->
<div class="container d-none" id="page6">
<div class="row">
<div class="col text-center" id="page6title"></div>
</div>
<div class="row">
<table class="table text-center">
<thead class="thead-light">
<tr>
<th>ACTION</th>
<th style="width: 5%"></th>
<th>LOCATION</th>
<th style="width: 5%"></th>
<th>TIME</th>
</tr>
</thead>
<tbody id="calendar">
</tbody>
</table>
</div>
<div class="row">
<div class="col text-center" id="page6time"></div>
</div>
<div class="row">
<div class="col">
WARNING: You can go back to the beginning by clicking the "Restart" button.<br>
Or, go back to the time & location & arrangement setting by clicking the "Retry" button.<br>
If you want to see the optimal solution, click the "Solution" button.
</div>
</div>
<div class="row">
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="page6to1()">Restart</button>
</div>
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="page6to4()">Retry</button>
</div>
<div class="col text-center">
<button type="button" class="btn btn-primary" onclick="checksolution()">Solution</button>
</div>
</div>
</div>
<!-- solution page -->
<div class="container d-none" id="page7">
<div class="row">
<div class="col text-center">
<h1>This is one of the optimal solutions:</h1>
</div>
</div>
<div class="row">
<table class="table text-center">
<thead class="thead-light">
<tr>
<th>ACTION</th>
<th style="width: 5%"></th>
<th>LOCATION</th>
<th style="width: 5%"></th>
<th>TIME</th>
</tr>
</thead>
<tbody id="calendaroptimal">
</tbody>
</table>
</div>
<div class="row">
<div class="col text-center" id="page7time"></div>
</div>
<div class="row">
<div class="col">
<div class="card">
<h5 class="card-header">Conclusion</h5>
<div class="card-body">
<h5 class="card-title">About the solution</h5>
<p class="card-text">The solution is one of the optimal solutions. Can you find other optimal solutions?</p>
<h5 class="card-title">I hope you can learn from it:</h5>
<p class="card-text">What just happened was a glimpse into Combinatorial Opimization. The daily life scenario you envisioned was so easy to describe yet so difficult to solve (especially if you did more than Netflix everyday :D) Similarly, you might've heard the famous Traveling Salesman Problem.</p>
<h5 class="card-title">More questions to you:</h5>
<p class="card-text">What if some activities can only be done at a specific time and place?</p>
<p class="card-text">What if you don't need to go to the next place directly?</p>
<p class="card-text">What if we add the efficiency value to an activity at each place?</p>
<p class="card-text">...</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col text-center">
<button type="button" class="btn btn-secondary" onclick="page7to6()">Back</button>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
<!-- partial -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js'></script><script src="./script.js"></script>
</body>
</html>