-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
105 lines (90 loc) · 4.26 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
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" ng-app="myApp" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-- <html lang="en" ng-app="myApp" class="no-js"> [endif] -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My To Do List</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="app.css">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" integrity="sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
</head>
<body ng-app="toDo">
<!-- Navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://www.youtube.com/watch?v=ZXsQAXx_ao0" target="_blank">JUST DO IT!</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="main" ng-controller="toDoController">
<!-- Form to fill out -->
<div class="container">
<form ng-submit="saveTask()" class="form-inline todo-form">
<div class="form-group">
<label class="sr-only" for="todoTask">What do you need to do?</label>
<input ng-model="todo.task" type="text" class="form-control" id="todoTask" placeholder="Thing To Be Done">
</div>
<button type="submit" class="btn btn-primary">Add Task</button>
</form>
<!-- Table of added tasks -->
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Done?</th>
<th>Task</th>
<th>Actions</th>
</tr>
</thead>
<!-- List all tasks in tasks, using new Firebase orderBy filtering -->
<tr ng-repeat="t in tasks | orderBy:orderBy" ng-hide="t.done">
<!-- Add functionality for checking off done, sending to Firebase, doing something css fancy -->
<td>
<input type="checkbox" ng-model="t.done" ng-click="saveDone(t)" ng-change="tasks.$save(t)">
<div>{{ t.goodjob }}</div>
</td>
<!-- Adds each task -->
<td>
<div>{{ t.task }}</div>
<div>
<!-- TODO: Add date created. (possibly date to be finished?) -->
<!-- TODO: If date created is more than a day ago, add "Better hurry!" -->
</div>
</td>
<!-- Remove button -->
<td>
<button ng-click="tasks.$remove(t)" type="submit" class="btn btn-danger">Remove</button>
</td>
</tr>
</table>
</div>
</div>
<!-- AngularJS -->
<script src="bower_components/angular/angular.js"></script>
<!-- Firebase -->
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/1.1.3/angularfire.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/toDoController.js"></script>
</body>
</html>