forked from madhuni/to-do-list-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
75 lines (72 loc) · 5.16 KB
/
index.html
File metadata and controls
75 lines (72 loc) · 5.16 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
<!DOCTYPE html>
<html ng-app="toDoList">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>TO-DO-LIST</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="css/to_do_list_min.css">
</head>
<body>
<header>
<h1 class="text-center">My To-Do-List</h1>
</header>
<div ng-controller="mainController" class="container flex-box" id="wrapper">
<form id="input-container" ng-submit="createItemObject()">
<span class="arrow-container" ng-show="itemContainer.length > 0"><i class="fa fa-angle-down"></i></span>
<input type="text" required placeholder="What needs to be done?" ng-model="item.value">
</form>
<div id="list-control-button-container">
<a href="#all-items" class="control-btn btn btn-primary ng-cloak" ng-class="{active: showAllStatus}" ng-click="showAll()">Total Items <span class="badge">{{ itemContainer.length }}</span></a>
<a href="#pending-items" class="control-btn btn btn-warning ng-cloak" ng-class="{active: showPendingStatus}" ng-click="showPending()">Pending <span class="badge">{{ checkPendingItem() }}</span></a>
<a href="#completed-items" class="control-btn btn btn-success ng-cloak" ng-class="{active: showCompletedStatus}" ng-click="showCompleted()">Completed <span class="badge">{{ itemContainer.length - checkPendingItem() }}</span></a>
</div>
<div id="list-container">
<ul class="list-group text-center ng-cloak" ng-show="showAllStatus">
<li class="list-item list-group-item list-group-item-action text-left ng-cloak" ng-repeat="sub in itemContainer track by $index" ng-class="{'line-through': changeClass(sub), 'hide-background': sub.editing}">
<span class="check-box-list">
<i class="fa" ng-class="{'fa-circle-o': !sub.isComplete, 'fa-check-circle-o': sub.isComplete}" ng-click="addItemCheckedClass(sub)"></i>
</span>
<span class="item-value ng-cloak" ng-hide="sub.editing" ng-dblclick="editItem(sub)">{{ sub.value }}</span>
<input type="text" class="edit-input" ng-model="sub.value" ng-show="sub.editing" ng-blur="doneEdit(sub)" autofocus>
<label class="label pull-right" ng-click="removeItem(sub)">
<i class="fa fa-trash-o"></i>
</label>
</li>
</ul>
<ul class="list-group text-center ng-cloak" ng-show="showPendingStatus">
<li class="list-item list-group-item list-group-item-action text-left ng-cloak" ng-repeat="sub in itemContainer track by $index" ng-class="{'line-through': changeClass(sub), 'hide-background': sub.editing}" ng-show="!sub.isComplete">
<span class="check-box-list">
<i class="fa" ng-class="{'fa-circle-o': !sub.isComplete, 'fa-check-circle-o': sub.isComplete}" ng-click="addItemCheckedClass(sub)"></i>
</span>
<span class="item-value ng-cloak" ng-hide="sub.editing" ng-dblclick="editItem(sub)">{{ sub.value }}</span>
<input type="text" class="edit-input" ng-model="sub.value" ng-show="sub.editing" ng-blur="doneEdit(sub)" autofocus>
<label class="label pull-right" ng-click="removeItem(sub)">
<i class="fa fa-trash-o"></i>
</label>
</li>
</ul>
<ul class="list-group text-center ng-cloak" ng-show="showCompletedStatus">
<li class="list-item list-group-item list-group-item-action text-left ng-cloak" ng-repeat="sub in itemContainer track by $index" ng-class="{'line-through': changeClass(sub), 'hide-background': sub.editing}" ng-show="sub.isComplete">
<span class="check-box-list">
<i class="fa" ng-class="{'fa-circle-o': !sub.isComplete, 'fa-check-circle-o': sub.isComplete}" ng-click="addItemCheckedClass(sub)"></i>
</span>
<span class="item-value ng-cloak" ng-hide="sub.editing" ng-dblclick="editItem(sub)">{{ sub.value }}</span>
<input type="text" class="edit-input" ng-model="sub.value" ng-show="sub.editing" ng-blur="doneEdit(sub)" autofocus>
<label class="label pull-right" ng-click="removeItem(sub)">
<i class="fa fa-trash-o"></i>
</label>
</li>
</ul>
</div><!-- End of 'list-container' -->
</div>
<footer class="text-center">
<p>Double-Click to edit a To-Do</p>
<p>Made by Kanishka Mohan Madhuni</p>
</footer>
<script src="//code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
<script src="//code.angularjs.org/latest/angular.min.js"></script>
<script src="js/to_do_list_min.js"></script>
</body>
</html>