-
Notifications
You must be signed in to change notification settings - Fork 0
/
planner2.html
133 lines (122 loc) · 4.8 KB
/
planner2.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>WNWN :: Meal Planner</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style/bootstrap.min.css">
<!--<link href="style/style.css" rel="stylesheet" media="screen">-->
<link href="style/planner_style.css" rel="stylesheet" media="screen">
<script src="bootstrap/jquery-2.1.3.min.js" type="text/javascript"></script>
<script src="bootstrap/bootstrap.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
var bmeal = document.getElementById('Bmeal');
var lmeal = document.getElementById("Lmeal");
var dmeal = document.getElementById("Dmeal");
function loadMeal() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("Bmeal").innerHTML = this.responseText;
}
};
xhttp.open("GET", "recipe.txt", true);
xhttp.send();
}
function disableHidden() {
var message = document.getElementById("message");
var dishName = document.getElementById("dishName");
var select = document.getElementById("bmealSelect");
dishName.innerHTML="Hello World";
select.style.visibility = "visible";
message.innerHTML = "<div class='alert alert-info'><strong>Info!</strong> Please tell us how much you have eaten for your meal!!</div>"
}
var date = new Date();
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
var today = year + "-" + month + "-" + day;
document.getElementById("MealDate").value = today;
</script>
<!--<link href="style/bootstrap.min.css" rel="stylesheet" media="screen">-->
<title>Meal Planner</title>
</head>
<body>
<nav class="navbar navbar-inverse" style="background: #b998f2">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.html">Waste Not Want Not</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="home.html">Home</a></li>
<li><a href="profile.html"><span class="glyphicon glyphicon-user"></span>Profile</a></li>
<li><a href="planner.html"><span class="glyphicon glyphicon-calendar"></span>Meal Planner</a></li>
<li><a href="achievement.html"><span class="glyphicon glyphicon-queen"></span>Achievements</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="logout.html"><span class="glyphicon glyphicon-log-out"></span> Sign Out</a></li>
</ul>
</div>
</div>
</nav>
<div class="well">
<label for="MealDate">Meal Plan Date</label>
<input type="date" name="mealPD" id="MealDate">
</div>
<div class="container">
<div class="panel panel-default" >
<div class="panel-heading" onclick="disableHidden()" >Breakfast</div>
<div class="panel-body" name="recipe" id="Bmeal">
<div id="dishName">
<a href="addMeal.html">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</div>
<div id="bmealSelect" class="completeEaten">
<br/>
<select class="select" id="bmealeatpercent">
<option value="100">All</option>
<option value="75">Most</option>
<option value="50">Some</option>
<option value="25">A Little</option>
<option value="0">None</option>
</select>
</div>
<br/>
<div id="message"></div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Lunch</div>
<div class="panel-body" name="recipe" id="Lmeal">
<a href="addMeal.html">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Dinner</div>
<div class="panel-body" name="recipe" id="Dmeal">
<a href="addMeal.html">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</div>
</div>
<div>
<ul class="pager">
<li><a href="#">Previous Day</a></li>
<li><a href="#">Next Day</a></li>
</ul>
</div>
</div>
</body>
</html>