-
Notifications
You must be signed in to change notification settings - Fork 4k
/
index.jade
47 lines (42 loc) · 2.06 KB
/
index.jade
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
// left-hand side checkbox
.task-controls.task-primary(ng-if='!task._editing')
// Habits
.task-actions(ng-if='::task.type=="habit"')
// score() is overridden in challengesCtrl to do nothing
input.task-input.habit.visuallyhidden(
ng-if='task.up',
type='checkbox',
ui-keypress='{ 13:"score(task, \'up\')" }' )
a(ng-if='task.up', ng-click='applyingAction || score(task,"up")')
span.glyphicon.glyphicon-plus
input.task-input.habit.visuallyhidden(
ng-if='task.down',
type='checkbox',
ui-keypress='{ 13:"score(task, \'down\')" }' )
a(ng-if='task.down', ng-click='applyingAction || score(task,"down")')
span.glyphicon.glyphicon-minus
// Rewards
span(ng-if='::task.type=="reward"')
input.task-input.reward.visuallyhidden(
type='checkbox',
ui-keypress='{ 13:"score(task, \'down\')" }' )
a.money.btn-buy(ng-class='{highValue: task.value >= 1000}', ng-click='score(task, "down")')
span.shop_gold
span.reward-cost {{task.value}}
// Daily & Todos
span.task-checker.action-yesno(ng-if='::task.type=="daily" || task.type=="todo"')
input.task-input.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task._id}}', type='checkbox',
ng-model='task.completed', ng-if='$state.includes("tasks")',
ng-change='changeCheck(task)'
ui-keypress='{13:"task.completed = !task.completed; changeCheck(task)"}' )
input.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task._id}}', type='checkbox',
ng-if='!$state.includes("tasks")')
label(for='box-{{::obj._id}}_{{::task._id}}')
// main content
.task-text(ng-dblclick='task._editing ? saveTask(task) : editTask(task, user)')
markdown(text='task.text',target='_blank')
div(ng-if='task.checklist && !$state.includes("options.social.challenges") && !task.collapseChecklist && !task._editing')
fieldset.option-group.task-checklist
label.checkbox(ng-repeat='item in task.checklist')
input(type='checkbox', ng-model='item.completed', ng-change='saveTask(task,true)')
markdown(text='item.text', target='_blank')