forked from alephmelo/todo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
75 lines (74 loc) · 3.09 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Todo App</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<link href="lib/css/ionic.min.css" rel="stylesheet">
<script src="lib/js/ionic.bundle.min.js"></script>
<script src="todo.js"></script>
<script src="todo-services.js"></script>
</head>
<body>
<div id="wrapper" ng-app="todo">
<div id="wrapperCont" ng-controller="TodoCtrl">
<ion-header-bar class="bar-positive">
<button class="button button-icon icon ion-ios7-minus-outline"
ng-click="data.showDelete = !data.showDelete; data.showReorder = false"></button>
<h1 class="title">Tarefas a fazer</h1>
<button class="button button-icon ion-arrow-move"
ng-click="data.showDelete = false; data.showReorder = !data.showReorder"></button>
</ion-header-bar>
<ion-content start-y="55" ng-controller="searchCtrl">
<div class="bar bar-header item-input-inset">
<div class="item-input-wrapper">
<i class="icon ion-ios7-search placeholder-icon"></i>
<input type="search" placeholder="Pesquisar" class="form-control" ng-model="searchText">
<i ng-click="clearSearch()" ng-show="searchText.length" class="ion-ios7-close-outline pull-right"></i>
</div>
</div>
<ion-list show-delete="data.showDelete" show-reorder="data.showReorder">
<ion-item ng-show="!tasks.length">
<p>Nenhuma tarefa <3 </p>
</ion-item>
<ion-item ng-show="tasks.length" ng-repeat="task in tasks |filter:searchText" item="task">
<p>{{task.task_name}}</p>
<ion-delete-button class="ion-minus-circled" ng-click="onItemDelete(task.task_id)"></ion-delete-button>
<ion-option-button class="button-assertive" ng-click="onItemEdit(task.task_id)">Editar</ion-option-button>
<ion-reorder-button class="ion-navicon" on-reoder="moveItem(task.task_id, fromIndex, toIndex)"></ion-reorder-button>
</ion-item>
</ion-list>
</ion-content>
<script id="new-task.html" type="text/ng-template">
<div class="modal">
<ion-header-bar class="bar-stable">
<h1 class="title">Nova Tarefa</h1>
<button class="button button-clear button-positive" ng-click="closeNewTask()">Cancelar</button>
</ion-header-bar>
<ion-content>
<form ng-submit="createTask(task)">
<div class="list">
<label class="item item-input">
<input type="text" autofocus="true" placeholder="O que você precisa fazer?" ng-model="task.title">
</label>
</div>
<div class="padding">
<button type="submit" class="button button-block button-positive">Criar Tarefa</button>
</div>
</form>
</ion-content>
</div>
</script>
<ion-footer-bar class="bar-positive">
<button class="button button-icon pull-left " ng-click="newTask()">
<i class="icon ion-ios7-plus-outline"></i>
</button>
<button class="button icon pull-right" ng-click="about()">
<i class="ion-social-twitter"></i>
<i class="ion-social-github"></i>
</button>
</ion-footer-bar>
</div>
</div>
</body>
</html>