-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (45 loc) · 2.33 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
<html ng-app="menuMaker">
<head>
<title>Menu Maker</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/jquery-ui.min.css"/>
</head>
<body>
<div class="container" ng-controller="menuController as menu"><br>
<!-- Might want a small toolbar up here. Not sure what would go here though. Maybe the stats that they wanted. -->
<!-- button ng-click="menu.addSection()">Add Section!</button -->
<div class="sectionHeader" ng-repeat="section in menu.sections">
<h2><strong>{{section.sectionName}}<strong></h2>
<p class="sectionDescription">{{section.description}}</p>
<hr>
<ul id="sortable" class="list-unstyled">
<li class="dishTile" ng-repeat="item in section.items">
<h3>
{{item.name}} <em class="pull-right">{{item.price | currency}} </em>
</h3>
</li>
</ul>
<hr>
<form novalidate class="simple-form" id="dishForm" name="sectionCtrl.dishForm" ng-controller="sectionController as sectionCtrl" ng-submit="sectionCtrl.addNewItem(section)">
Name: <input class="form-control" type="text" name="dishName" ng-model="sectionCtrl.newItem.name" placeholder="Sandwhich" required/>
Price: <input class="form-control" type="text" name="dishPrice" ng-model="sectionCtrl.newItem.price" placeholder="0.00" required/><br>
<button ng-disabled="sectionCtrl.dishForm.$invalid" type="submit" class="btn btn-default">Add Dish</button>
</form>
</div>
<div>
<h3>Add Section</h3>
</div>
<form novalidate class="form-group" id="sectionForm" name="menu.sectionForm" ng-submit="menu.addSection()">
<input class="form-control" type="text" ng-model="menu.newSection.sectionName" required/><br>
<textarea class="form-control" ng-model="menu.newSection.description"></textarea><br>
<button ng-disabled="menu.sectionForm.$invalid" type="submit" class="btn btn-default">Add Section</button>
</form>
</div>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>