mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
36 lines
1.6 KiB
Text
36 lines
1.6 KiB
Text
|
|
// 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
|
||
|
|
a(ng-if='task.up', ng-click='applyingAction || score(task,"up")')
|
||
|
|
span.glyphicon.glyphicon-plus
|
||
|
|
a(ng-if='task.down', ng-click='applyingAction || score(task,"down")')
|
||
|
|
span.glyphicon.glyphicon-minus
|
||
|
|
|
||
|
|
// Rewards
|
||
|
|
span(ng-if='::task.type=="reward"')
|
||
|
|
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.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task.id}}', type='checkbox',
|
||
|
|
ng-model='task.completed', ng-if='$state.includes("tasks")',
|
||
|
|
ng-change='task.type=="todo" && pushTask(task,$index,"bottom"); 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)')
|
||
|
|
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')
|