30954fe7c5
* Added support for grouping tasks by chllenge * Fixed tests and updated default challenge model name * Fixed broken member test * Updated setting string * Changed to shortName * Began abstracting task grouping * Added initial task directive code * Added new directives to help with grouping of tasks * Removed random console.log
50 lines
2.2 KiB
Plaintext
50 lines
2.2 KiB
Plaintext
// 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"', ng-class='{"group-yesno": !!obj.leader}')
|
|
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='doubleClickTask(obj, task)')
|
|
markdown(text='task._editing ? task._edit.text : task.text',target='_blank')
|
|
|
|
div(class='{{obj._id}}{{task.id}}-chart', ng-show='charts[obj._id+task.id]')
|
|
|
|
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='completeChecklistItem(task)')
|
|
markdown(text='item.text', target='_blank')
|