todo-main.jade
1.35 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
form#form-task.form-inline(class='todos')
.form
.main
input(type='text', id='content', name='content', placeholder='해야할 일이 무엇인가요?')
.sub
.form-group
select.form-control(name='category')
option(value='개인', selected) 개인
option(value='가족') 가족
option(value='업무') 업무
option(value='기타') 기타
.form-group
select.form-control(name='priority')
option(value='3') 중요
option(value='2', selected) 보통
option(value='1') 사소
.actions
button#post-task.btn.btn-primary.btn-lg.btn-block(type='button') 저장
ul.tasks
.no-task
.alert.alert-info Task가 없습니다.
script#task-template(type='text/template').
<li class='task <%= doneStr %>' data-id='<%= id %>'>
<span class='check'>
<i class='fa fa-check fa-lg'></i>
</span>
<span class='content'><%=content %></span>
<% if (category) { %>
<span class='label label-default category'>
<%= category %>
</span>
<% } %>
<span class='priority p<%= priority %>'>
<%= (priority === 3) ? "중요" : ((priority === 1) ? "사소": "보통") %>
</span>
<a href='#' class='remove'><i class='fa fa-trash-o'></i></a>
</li>
script.
$(function() {
var todo = new TaskController();
});