forked from joc167/COGS120Restaurant
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathp4.html
More file actions
145 lines (124 loc) · 4.93 KB
/
Copy pathp4.html
File metadata and controls
145 lines (124 loc) · 4.93 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
<!DOCTYPE html>
<html>
<head>
<title> projected time </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/theme.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Libraries CSS Files -->
<link href="lib/animate/animate.min.css" rel="stylesheet">
<link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="lib/ionicons/css/ionicons.min.css" rel="stylesheet">
<link href="lib/magnific-popup/magnific-popup.css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css?family=Montserrat');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
</style>
</head>
<body>
<button class="homebtn" onclick="javascript:window.location.href='home.html';"><i class="fa fa-home"></i></button>
<header id="header">
<div id="logo" class="pull-left">
<h1><a href="home.html" class="scrollto">WaitLess</a></h1>
</div>
</header><!-- #header -->
<section id="intro">
<div class="intro-text">
<h2 align="center">Estimated Wait Times <br> @ <span id="selectedT"></span></h2>
</div>
</section>
<script>
document.getElementById("selectedT").innerHTML = localStorage.getItem("selectedT");
</script>
<div class="container ewtTable" id="ewtTime">
<button align="center" onclick="window.location.href='current.html'" class="current-btn" type="submit" ><i class="fa fa-clock-o"></i> Current</button>
<div class="dropdown">
<button align="center" onclick="myFunction()" class="dropbtn" ><i class="fa fa-chevron-circle-down"></i> Time......</button>
<script id="dropdown-template" type="text/x-handlebars-template">
<a onclick="javascript:localStorage.setItem('selectedT',
dropdownTable[{{index}}].time); window.location.href='p4.html'">{{time}}
</a>
</script>
<div id="myDropdown" class="dropdown-content">
<!---------->
</div>
</div>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
window.onload = function(event) {
for(var i = 1; i <= complexData.length; i++){
if(localStorage.getItem(i)==null){localStorage.setItem(i,'#1ec8cd')}
document.getElementById(i).style.color = localStorage.getItem(i);}
}
</script>
<!---------------------------------------------------------------------->
<div style="text-align: left;" class="current">
<!-- remember to put Handlebars templates within script tags so that the
webpage doesn't attempt to load them as HTML -->
<script id="entry-template" type="text/x-handlebars-template">
<tr>
<td>
<span onclick="javascript:localStorage.setItem('rstrName', '{{title}}');
window.location.href='p3.html';">
<span id="time">  {{ranking}}.  {{title}}</span>
<span id="wt">{{waitTime}} min(s)</span>
</span>
<span onload="javascript:this.style.color=localStorage.getItem({{index}});"
onclick="if(!localStorage.getItem('{{title}}'))
{
localStorage.setItem('{{title}}',
JSON.stringify(complexData[{{ranking}}-1]));
localStorage.setItem({{index}},
'#ff6868');
this.style.color='#ff6868';
}
else{
localStorage.removeItem('{{title}}');
localStorage.removeItem({{index}});
this.style.color='#1dc8cd';
}"
id="{{index}}" class="fa buttonfav"></span>
</td>
</tr>
</script>
<div class="list" id="ewtDiv">
<table id="templatedProjects" >
<!-- we will inject templated project HTML code into here -->
</table>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/handlebars-v4.0.12.js"></script>
<script src="js/lab4.js"></script>
<script src="js/TimeDropdown.js"></script>
<!-- JavaScript Libraries -->
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/jquery/jquery-migrate.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="lib/easing/easing.min.js"></script>
<script src="lib/wow/wow.min.js"></script>
<script src="lib/superfish/hoverIntent.js"></script>
<script src="lib/superfish/superfish.min.js"></script>
<script src="lib/magnific-popup/magnific-popup.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>