-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
176 lines (173 loc) · 7.83 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en" ng-app="easyToDo" class="ng-scope">
<head>
<meta charset="UTF-8">
<title>easyToDo</title>
<link rel="stylesheet" href="/node_modules/angular-material/angular-material.min.css">
<link rel="stylesheet" href="/public/css/angular-material-calendar.css">
<link rel="stylesheet" href="/public/css/easyToDo.css">
</head>
<body layout="column" md-theme="default" ng-controller="easyToDoCtrl">
<header>
easyToDo
</header>
<div layout="row" id="main-panel" flex="1">
<div flex="16" class="all-categories">
<div>
<div class="todo" ng-click="show=true">
<md-subheader class="md-no-sticky">所有任务</md-subheader>
<md-button class="md-fab md-mini" aria-label="Eat cake" ng-click="cateEditShow=true;" ng-init="show=false">
<md-tooltip md-direction="left">新增分类</md-tooltip>
<span class="glyphicon glyphicon-plus"></span>
</md-button>
</div>
<div id="new-categories" ng-show="cateEditShow" ng-init="show=false">
<md-input-container >
<span class="glyphicon glyphicon-folder-close"></span>
<input ng-model="user.newCate" type="text" placeholder="新分类" ng-required="true" focus-me="show">
</md-input-container>
<div>
<span class="glyphicon glyphicon-ok" ng-click="addNewCate()"></span>
<span class="glyphicon glyphicon-remove" ng-click="cancelAdd()"></span>
</div>
</div>
</div>
<md-divider></md-divider>
<md-content>
<ul>
<li ng-repeat="cate in categories" ng-mouseover="show = true" ng-mouseleave="show=false" ng-init="show=false"
>
<div ng-show="$index!=editIndex">
<md-button href="" ng-click="cateChange($index)" ng-class="{true:'active',false:'test'}[$index == cateItem]">
<span class="glyphicon glyphicon-folder-close"></span>
<span>{{cate.content}}</span>
<span></span>
<div class="categories-edit" ng-show="show"
ng-click="isFocus=true">
<span class="glyphicon glyphicon-pencil" ng-click="editCate($index,$event);"></span>
<span class="glyphicon glyphicon-remove" ng-click="showCustomToast($index)"></span>
</div>
</md-button>
</div>
<div class="changeCate" ng-show="$index==editIndex">
<md-input-container >
<span class="glyphicon glyphicon-folder-close"></span>
<input ng-model="categories[editIndex].content" type="text" placeholder="新分类" ng-required="true">
</md-input-container>
<div>
<span class="glyphicon glyphicon-ok" ng-click="confirmEdit()"></span>
<span class="glyphicon glyphicon-remove" ng-click="cancelEdit()"></span>
</div>
</div>
</li>
</ul>
</md-content>
</div>
<div flex="30" class="all-tasks" ng-controller="allTasksCtrl">
<md-content>
<div class="new-task" ng-init="show=false" ng-click="show=true">
<md-subheader class="md-no-sticky">添加新任务</md-subheader>
<md-button class="md-fab md-mini" aria-label="Eat cake" ng-click="newTaskEdit=true">
<md-tooltip md-direction="left">新增任务</md-tooltip>
<span class="glyphicon glyphicon-plus"></span>
</md-button>
<div ng-show="newTaskEdit">
<md-input-container >
<input ng-model="user.title" type="text" placeholder="任务标题" ng-required="true" focus-me="show">
</md-input-container>
<div class="new-task-title">
<span class="glyphicon glyphicon-ok" ng-click="addNewTask()"></span>
<span class="glyphicon glyphicon-remove" ng-click="newTaskEdit=false"></span>
</div>
</div>
</div>
<md-divider></md-divider>
<!-- 任务标题 -->
<md-tabs md-dynamic-height md-border-bottom>
<md-tab label="all">
<md-content class="md-padding">
<md-list-item ng-repeat="task in allTasks" ng-class="{true:'task-finished',false:'test'}[task.selected]" ng-mouseenter="show = true" ng-mouseleave="show=false" ng-init="show=false" ng-click="taskChange($index)">
<md-checkbox ng-model="task.selected">
{{ task.title }}
</md-checkbox>
<div class="task-remove" ng-show="show">
<!-- <span class="glyphicon glyphicon-pencil" ng-hide="task.selected"></span> -->
<span class="glyphicon glyphicon-remove" ng-click="showCustomToast($index)"></span>
</div>
</md-list-item>
</md-content>
</md-tab>
<md-tab label="TODO">
<md-content class="md-padding">
<md-list-item ng-repeat="task in allTasks" ng-mouseover="show = true" ng-mouseleave="show=false" ng-init="show=false" ng-show="!task.selected" ng-click="taskChange($index)">
<md-checkbox ng-model="task.selected">
{{ task.title }}
</md-checkbox>
<div class="task-edit" ng-show="show">
<!-- <span class="glyphicon glyphicon-pencil"></span> -->
<span class="glyphicon glyphicon-remove"></span>
</div>
</md-list-item>
</md-content>
</md-tab>
<md-tab label="DONE">
<md-content class="md-padding">
<md-list-item ng-repeat="task in allTasks" class="task-finished" ng-mouseover="show = true" ng-mouseleave="show=false" ng-init="show=false"
ng-show="task.selected" ng-click="taskChange($index)">
<md-checkbox class="md-secondary" ng-model="task.selected">
{{ task.title }}
</md-checkbox>
<div class="task-remove" ng-show="show">
<span class="glyphicon glyphicon-remove"></span>
</div>
</md-list-item>
</md-content>
</md-tab>
</md-tabs>
</md-content>
</div>
<div flex="50" class="task-details" ng-controller="taskDetailCtrl">
<md-subheader class="md-no-sticky">
{{details.title | title}}
</md-subheader>
<div class="task-edit-button" ng-init="isFocus=false" ng-click="isFocus=true" ng-show="!isEdit">
<span class="glyphicon glyphicon-pencil" ng-click="isEdit=true"></span>
</div>
<div ng-show="isEdit" class="task-title">
<md-input-container >
<input ng-model="details.title" type="text" placeholder="任务标题" ng-required="true" focus-me="isFocus">
</md-input-container>
</div>
<div class="task-edit-button" ng-show="isEdit">
<md-button class="md-raised md-warn" ng-click="saveDetails()">保存</md-button>
<md-button class="md-raised" ng-click="cancelEdit()">取消</md-button>
</div>
<md-divider></md-divider>
<div class="task-date">
<span>开始日期:</span>
<span>2015-04-06</span>
<span>截止日期:</span>
<span>{{details.deadline | date: 'yyyy-MM-dd'}}</span>
<div ng-click="calendarShow=!calendarShow" ng-class="{glyphiconactive: calendarShow}">
<span id="chevron" class="glyphicon glyphicon-chevron-left" ></span>
</div>
</div>
<md-divider></md-divider>
<md-calendar data-day-format="d" ng-show="calendarShow" ng-click-date="changeDate"></md-calendar>
<div class="task-content" contenteditable="true">
测试
</div>
</div>
</div>
<footer></footer>
<!---->
<script src="/node_modules/angular/angular.min.js"></script>
<script src="/node_modules/angular-animate/angular-animate.min.js"></script>
<script src="/node_modules/angular-aria/angular-aria.min.js"></script>
<script src="/node_modules/angular-material/angular-material.min.js"></script>
<script src="/public/js/lib/angular-material-calendar.js"></script>
<script src="/public/js/services/easy.model.js"></script>
<script src="/public/js/utils/util.js"></script>
<script src="/public/js/controllers/app.js"></script>
</body>
</html>