-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.template.ejs
61 lines (57 loc) · 2.59 KB
/
index.template.ejs
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>To Do List App</title>
</head>
<body ng-app="todoApp" ng-controller="todoController">
<main>
<header class="header">
<form ng-submit="addNew()">
<label class="label-for-checkbox">
<input type="checkbox" class="check-all" ng-submit="allchecked" ng-click="toggleAll(allchecked)"/>
<span class="pseudo-checkbox"><i class="fa fa-check"></i></span>
</label>
<input type="text" class="input-text" ng-model="tempInput" autofocus autocomplete="off"
placeholder="What needs to be done?"/>
<button class="add-button"><i class="fa fa-plus"></i></button>
</form>
</header>
<ul class="main">
<li class="view" ng-repeat="task in tasksArray | filter: showFn">
<label class="label-for-check">
<input type="checkbox" class="check" ng-model="task.checked">
<span class="pseudo-checkbox"><i class="fa fa-check"></i></span>
</label>
<div class="to-do-cont"><span class="to-do-span" ng-hide="task.edit" ng-bind="task.value"
ng-class="{strike: task.checked}"></span></div>
<input ng-model="task.value" ng-show="task.edit" type="text" class="internal-element"/>
<div class="tool-bar">
<button class="edit" title="Click to save edition" ng-hide="task.edit" ng-click="editTask(task)"><i
class="fa fa-pencil-square-o"></i></button>
<button class="edit" title="Click to edit todo" ng-show="task.edit" ng-click="editTask(task)"><i
class="fa fa-check-circle-o"></i></button>
<button class="delete" title="Click to delete todo" ng-click="deleteTask(task)"><i
class="fa fa-trash"></i></button>
</div>
</li>
</ul>
<footer class="footer">
<ul>
<li>
<button ng-class="{'active' : show == 'All' }" ng-click="show='All'">All</button>
</li>
<li>
<button ng-class="{'active' : show == 'Active' }" ng-click="show='Active'">Active</button>
</li>
<li>
<button ng-class="{'active' : show == 'Completed' }" ng-click="show='Completed'">Completed</button>
</li>
<li>
<button ng-class="{'' : show == 'All' }" ng-click="clearCompleted()">Clear completed</button>
</li>
</ul>
</footer>
</main>
</body>
</html>