mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
more optimizations with bindonce, replacing ngIf with boIf.
some of this was done with an axe rather than a fine brush, so there may be issues we need to be on the watch for.
This commit is contained in:
parent
0d19c0de21
commit
b431336463
8 changed files with 52 additions and 52 deletions
|
|
@ -5,14 +5,14 @@
|
||||||
li
|
li
|
||||||
a(rel='tooltip', title='Edit Tags', ng-click='saveOrEdit()')
|
a(rel='tooltip', title='Edit Tags', ng-click='saveOrEdit()')
|
||||||
i(ng-class='{"icon-ok": _editing, "icon-pencil": !_editing}')
|
i(ng-class='{"icon-ok": _editing, "icon-pencil": !_editing}')
|
||||||
li(ng-class='{active: user.filters[tag.id]}', ng-repeat='tag in user.tags', style='position: relative;')
|
li(bindonce='user.tags', ng-class='{active: user.filters[tag.id]}', ng-repeat='tag in user.tags', style='position: relative;')
|
||||||
.input-append.option-group.tag-editing(ng-show='_editing')
|
.input-append.option-group.tag-editing(ng-show='_editing')
|
||||||
input.input.input-small.option-content.tag-editing-pill(type='text', ng-model='tag.name')
|
input.input.input-small.option-content.tag-editing-pill(type='text', ng-model='tag.name')
|
||||||
span.add-on.tag-editing-pill
|
span.add-on.tag-editing-pill
|
||||||
a.pull-right(ng-click='delete(tag,$index)')
|
a.pull-right(ng-click='delete(tag,$index)')
|
||||||
i.icon-trash
|
i.icon-trash
|
||||||
a(ng-hide='_editing', ng-click='toggleFilter(tag)')
|
a(ng-hide='_editing', ng-click='toggleFilter(tag)')
|
||||||
i.icon-bullhorn(ng-if="tag.challenge")
|
i.icon-bullhorn(bo-if="tag.challenge")
|
||||||
| {{tag.name}}
|
| {{tag.name}}
|
||||||
li
|
li
|
||||||
form.form-inline(ng-show='_editing', ng-submit='createTag(_newTag)')
|
form.form-inline(ng-show='_editing', ng-submit='createTag(_newTag)')
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@
|
||||||
| Challenges
|
| Challenges
|
||||||
a.pull-right(target='_blank', href='https://trello.com/card/challenges-individual-party-guild-public/50e5d3684fe3a7266b0036d6/58')
|
a.pull-right(target='_blank', href='https://trello.com/card/challenges-individual-party-guild-public/50e5d3684fe3a7266b0036d6/58')
|
||||||
i.icon-question-sign
|
i.icon-question-sign
|
||||||
.modal-body
|
.modal-body(bindonce='group.challenges')
|
||||||
div(ng-if='group.challenges.length > 0')
|
div(bo-if='group.challenges.length > 0')
|
||||||
table.table.table-striped
|
table.table.table-striped
|
||||||
tr(ng-repeat='challenge in group.challenges')
|
tr(ng-repeat='challenge in group.challenges')
|
||||||
td
|
td
|
||||||
a(ui-sref='options.social.challenges.detail({cid:challenge._id})') {{challenge.name}}
|
a(ui-sref='options.social.challenges.detail({cid:challenge._id})') {{challenge.name}}
|
||||||
div(ng-if='group.challenges.length == 0')
|
div(bo-if='group.challenges.length == 0')
|
||||||
p.
|
p.
|
||||||
No challenges yet, visit <a class='label' ui-sref='options.social.challenges'><i class=icon-bullhorn></i> Challenges</a> to create one.
|
No challenges yet, visit <a class='label' ui-sref='options.social.challenges'><i class=icon-bullhorn></i> Challenges</a> to create one.
|
||||||
|
|
@ -18,7 +18,7 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.me
|
||||||
|
|
||||||
script(type='text/ng-template', id='partials/options.social.challenges.detail.html')
|
script(type='text/ng-template', id='partials/options.social.challenges.detail.html')
|
||||||
// Edit button
|
// Edit button
|
||||||
div(ng-if='challenge.leader==user._id')
|
div(bindonce='challenge', bo-if='challenge.leader==user._id')
|
||||||
ul.unstyled
|
ul.unstyled
|
||||||
li(ng-hide='challenge._locked==false')
|
li(ng-hide='challenge._locked==false')
|
||||||
button.btn.btn-small.btn-default(ng-click='challenge._locked = false') Edit
|
button.btn.btn-small.btn-default(ng-click='challenge._locked = false') Edit
|
||||||
|
|
@ -35,12 +35,12 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.ht
|
||||||
textarea.option-content(cols='3', placeholder='Description', ng-model='challenge.description')
|
textarea.option-content(cols='3', placeholder='Description', ng-model='challenge.description')
|
||||||
hr
|
hr
|
||||||
|
|
||||||
.well(ng-if='challenge.description') {{challenge.description}}
|
.well(bindonce='challenge', bo-if='challenge.description') {{challenge.description}}
|
||||||
i.icon-question-sign(popover="These are the challenge's tasks. As users participate, they will change color and gain graphs to show you the overall progress of the group.", popover-trigger='mouseenter', popover-placement='right')
|
i.icon-question-sign(popover="These are the challenge's tasks. As users participate, they will change color and gain graphs to show you the overall progress of the group.", popover-trigger='mouseenter', popover-placement='right')
|
||||||
habitrpg-tasks(obj='challenge', main=false)
|
habitrpg-tasks(obj='challenge', main=false)
|
||||||
|
|
||||||
// Member List
|
// Member List
|
||||||
div(ng-if='challenge.members.length > 0')
|
div(bindonce='challenge', bo-if='challenge.members.length > 0')
|
||||||
h3 How's Everyone Doing?
|
h3 How's Everyone Doing?
|
||||||
menu
|
menu
|
||||||
button.customize-option(ng-repeat='member in challenge.members', ng-click='toggleMember(challenge._id, member._id)') {{member.profile.name}}
|
button.customize-option(ng-repeat='member in challenge.members', ng-click='toggleMember(challenge._id, member._id)') {{member.profile.name}}
|
||||||
|
|
@ -49,11 +49,11 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.ht
|
||||||
// Accordion version if we choose that instead
|
// Accordion version if we choose that instead
|
||||||
//- div(ng-if='challenge.members')
|
//- div(ng-if='challenge.members')
|
||||||
h4 How's Everyone Doing?
|
h4 How's Everyone Doing?
|
||||||
.accordion-group(ng-repeat='member in challenge.members')
|
.accordion-group(bindonce='challenge.members', ng-repeat='member in challenge.members')
|
||||||
.accordion-heading
|
.accordion-heading
|
||||||
a.accordion-toggle(ng-click='toggleMember(challenge._id, member._id)') {{member.profile.name}}
|
a.accordion-toggle(ng-click='toggleMember(challenge._id, member._id)') {{member.profile.name}}
|
||||||
.accordion-body(ng-class='{collapse: $stateParams.uid != member._id}')
|
.accordion-body(ng-class='{collapse: $stateParams.uid != member._id}')
|
||||||
.accordion-inner(ng-if='$stateParams.uid == member._id')
|
.accordion-inner(bo-if='$stateParams.uid == member._id')
|
||||||
div(ui-view)
|
div(ui-view)
|
||||||
|
|
||||||
script(type='text/ng-template', id='partials/options.social.challenges.html')
|
script(type='text/ng-template', id='partials/options.social.challenges.html')
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ a.pull-right.gem-wallet(popover-trigger='mouseenter', popover-title='Guild Bank'
|
||||||
|
|
||||||
// ------ Information -------
|
// ------ Information -------
|
||||||
.modal(style='position: relative;top: auto;left: auto;right: auto;margin: 0 auto 20px;z-index: 1;max-width: 100%;')
|
.modal(style='position: relative;top: auto;left: auto;right: auto;margin: 0 auto 20px;z-index: 1;max-width: 100%;')
|
||||||
.modal-header
|
.modal-header(bindonce='group')
|
||||||
span(ng-if='group.leader == user.id')
|
span(bo-if='group.leader == user.id')
|
||||||
button.btn.btn-primary.pull-right(ng-click='save(group)', ng-show='group._editing') Save
|
button.btn.btn-primary.pull-right(ng-click='save(group)', ng-show='group._editing') Save
|
||||||
button.btn.btn-default.pull-right(ng-click='group._editing = true', ng-hide='group._editing') Edit Group
|
button.btn.btn-default.pull-right(ng-click='group._editing = true', ng-hide='group._editing') Edit Group
|
||||||
h3 {{group.name}}
|
h3 {{group.name}}
|
||||||
|
|
@ -40,7 +40,7 @@ a.pull-right.gem-wallet(popover-trigger='mouseenter', popover-title='Guild Bank'
|
||||||
.modal-header
|
.modal-header
|
||||||
h3 Members
|
h3 Members
|
||||||
.modal-body
|
.modal-body
|
||||||
table.table.table-striped
|
table.table.table-striped(bindonce='group')
|
||||||
tr(ng-repeat='member in group.members')
|
tr(ng-repeat='member in group.members')
|
||||||
td
|
td
|
||||||
// allow leaders to ban members
|
// allow leaders to ban members
|
||||||
|
|
@ -48,9 +48,9 @@ a.pull-right.gem-wallet(popover-trigger='mouseenter', popover-title='Guild Bank'
|
||||||
a(ng-click='removeMember(group, member, true)')
|
a(ng-click='removeMember(group, member, true)')
|
||||||
i.icon-ban-circle(tooltip='Boot Member')
|
i.icon-ban-circle(tooltip='Boot Member')
|
||||||
a
|
a
|
||||||
span(bindonce='group', bo-class='{"badge badge-info": group.leader==member._id}', ng-click='clickMember(member._id, true)')
|
span(bo-class='{"badge badge-info": group.leader==member._id}', ng-click='clickMember(member._id, true)')
|
||||||
| {{member.profile.name}}
|
| {{member.profile.name}}
|
||||||
tr(ng-if='group.memberCount > group.members.length')
|
tr(bo-if='group.memberCount > group.members.length')
|
||||||
td.
|
td.
|
||||||
<span class='badge'>{{group.memberCount - group.members.length}} more members</span>
|
<span class='badge'>{{group.memberCount - group.members.length}} more members</span>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
div(ng-controller='MemberModalCtrl')
|
div(ng-controller='MemberModalCtrl')
|
||||||
#memberModal(modal='modals.member')
|
#memberModal(modal='modals.member')
|
||||||
.modal-header
|
.modal-header(bindonce='profile')
|
||||||
h3
|
h3
|
||||||
span {{profile.profile.name}}
|
span {{profile.profile.name}}
|
||||||
span(ng-if='profile.contributor.level') - {{contribText(profile.contributor, profile.backer)}}
|
span(bo-if='profile.contributor.level') - {{contribText(profile.contributor, profile.backer)}}
|
||||||
.modal-body
|
.modal-body(bindonce='profile')
|
||||||
.row-fluid
|
.row-fluid
|
||||||
.span6
|
.span6
|
||||||
img(ng-show='profile.profile.imageUrl', ng-src='{{profile.profile.imageUrl}}')
|
img(bo-show='profile.profile.imageUrl', bo-src='{{profile.profile.imageUrl}}')
|
||||||
markdown(ng-show='profile.profile.blurb', ng-model='profile.profile.blurb')
|
markdown(bo-show='profile.profile.blurb', ng-model='profile.profile.blurb')
|
||||||
ul.muted.unstyled(ng-if='profile.auth.timestamps', style='margin-top:10px;')
|
ul.muted.unstyled(bo-if='profile.auth.timestamps', style='margin-top:10px;')
|
||||||
li {{profile._id}}
|
li {{profile._id}}
|
||||||
li(ng-show='profile.auth.timestamps.created') - Member since {{timestamp(profile.auth.timestamps.created)}} -
|
li(bo-show='profile.auth.timestamps.created') - Member since {{timestamp(profile.auth.timestamps.created)}} -
|
||||||
li(ng-show='profile.auth.timestamps.loggedin') - Last logged in {{timestamp(profile.auth.timestamps.loggedin)}} -
|
li(bo-show='profile.auth.timestamps.loggedin') - Last logged in {{timestamp(profile.auth.timestamps.loggedin)}} -
|
||||||
h3 Stats
|
h3 Stats
|
||||||
include ../profiles/stats
|
include ../profiles/stats
|
||||||
.span6
|
.span6
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
hr
|
hr
|
||||||
|
|
||||||
div(bo-if='profile.contributor.level || user._id == profile._id')
|
div(bo-if='profile.contributor.level || user._id == profile._id')
|
||||||
.achievement.achievement-firefox(ng-if='profile.contributor.level')
|
.achievement.achievement-firefox(bo-if='profile.contributor.level')
|
||||||
div(ng-class='{muted: !profile.contributor.level}')
|
div(ng-class='{muted: !profile.contributor.level}')
|
||||||
h5
|
h5
|
||||||
span.label(bo-if='profile.contributor.level', class='label-contributor-{{profile.contributor.level}}') {{contribText(profile.contributor, profile.backer)}}
|
span.label(bo-if='profile.contributor.level', class='label-contributor-{{profile.contributor.level}}') {{contribText(profile.contributor, profile.backer)}}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
||||||
.task-column(class='{{list.type}}s')
|
.task-column(class='{{list.type}}s')
|
||||||
|
|
||||||
// Todos export/graph options
|
// Todos export/graph options
|
||||||
span.option-box.pull-right(ng-if='main && list.type=="todo"')
|
span.option-box.pull-right(bo-if='main && list.type=="todo"')
|
||||||
a.option-action(ng-show='obj.history.todos', ng-click='toggleChart("todos")', tooltip='Progress')
|
a.option-action(ng-show='obj.history.todos', ng-click='toggleChart("todos")', tooltip='Progress')
|
||||||
i.icon-signal
|
i.icon-signal
|
||||||
//-a.option-action(ng-href='/v1/users/{{user.id}}/calendar.ics?apiToken={{user.apiToken}}', tooltip='iCal')
|
//-a.option-action(ng-href='/v1/users/{{user.id}}/calendar.ics?apiToken={{user.apiToken}}', tooltip='iCal')
|
||||||
|
|
@ -16,7 +16,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
||||||
// <a href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}" rel=tooltip title="Google Calendar"><i class=icon-calendar></i></a>
|
// <a href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}" rel=tooltip title="Google Calendar"><i class=icon-calendar></i></a>
|
||||||
|
|
||||||
// Gold & Gems
|
// Gold & Gems
|
||||||
span.option-box.pull-right.wallet(ng-if='main && list.type=="reward"')
|
span.option-box.pull-right.wallet(bo-if='main && list.type=="reward"')
|
||||||
.money
|
.money
|
||||||
| {{gold(user.stats.gp)}}
|
| {{gold(user.stats.gp)}}
|
||||||
span.shop_gold(tooltip='Gold')
|
span.shop_gold(tooltip='Gold')
|
||||||
|
|
@ -28,7 +28,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
||||||
h2.task-column_title {{list.header}}
|
h2.task-column_title {{list.header}}
|
||||||
|
|
||||||
// Todo Chart
|
// Todo Chart
|
||||||
.todos-chart(ng-if='list.type == "todo"', ng-show='charts.todos')
|
.todos-chart(bo-if='list.type == "todo"', ng-show='charts.todos')
|
||||||
|
|
||||||
// Add New
|
// Add New
|
||||||
form.addtask-form.form-inline.new-task-form(name='new{{list.type}}form', ng-hide='obj._locked || (list.showCompleted && list.type=="todo")', ng-submit='addTask(obj[list.type+"s"],list)')
|
form.addtask-form.form-inline.new-task-form(name='new{{list.type}}form', ng-hide='obj._locked || (list.showCompleted && list.type=="todo")', ng-submit='addTask(obj[list.type+"s"],list)')
|
||||||
|
|
@ -45,7 +45,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
||||||
include ./task
|
include ./task
|
||||||
|
|
||||||
// Static Rewards
|
// Static Rewards
|
||||||
ul.items(ng-if='main && list.type=="reward" && user.flags.itemsEnabled')
|
ul.items(bo-if='main && list.type=="reward" && user.flags.itemsEnabled')
|
||||||
li.task.reward-item(ng-hide='item.hide', ng-repeat='item in itemStore')
|
li.task.reward-item(ng-hide='item.hide', ng-repeat='item in itemStore')
|
||||||
// right-hand side control buttons
|
// right-hand side control buttons
|
||||||
.task-meta-controls
|
.task-meta-controls
|
||||||
|
|
@ -53,9 +53,9 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
||||||
i.icon-comment
|
i.icon-comment
|
||||||
//left-hand size commands
|
//left-hand size commands
|
||||||
.task-controls
|
.task-controls
|
||||||
a.task-action-btn.btn-reroll(ng-if='item.type=="reroll"', ng-click='modals.reroll = true')
|
a.task-action-btn.btn-reroll(bo-if='item.type=="reroll"', ng-click='modals.reroll = true')
|
||||||
i.icon-repeat
|
i.icon-repeat
|
||||||
a.money.btn-buy.item-btn(ng-if='item.type!="reroll"', ng-click='buy(item.type)')
|
a.money.btn-buy.item-btn(bo-if='item.type!="reroll"', ng-click='buy(item.type)')
|
||||||
span.reward-cost {{item.value}}
|
span.reward-cost {{item.value}}
|
||||||
span.shop_gold
|
span.shop_gold
|
||||||
// main content
|
// main content
|
||||||
|
|
@ -65,7 +65,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
||||||
br
|
br
|
||||||
|
|
||||||
// Ads
|
// Ads
|
||||||
div(ng-if='main && !user.purchased.ads && list.type!="reward"')
|
div(bo-if='main && !user.purchased.ads && list.type!="reward"')
|
||||||
span.pull-right
|
span.pull-right
|
||||||
a(ng-click='modals.buyGems=true', tooltip=env.t('removeAds'))
|
a(ng-click='modals.buyGems=true', tooltip=env.t('removeAds'))
|
||||||
i.icon-remove
|
i.icon-remove
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', data-id='{{task.id}}')
|
li(bindonce='list', ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', data-id='{{task.id}}')
|
||||||
// right-hand side control buttons
|
// right-hand side control buttons
|
||||||
.task-meta-controls
|
.task-meta-controls
|
||||||
|
|
||||||
// Due Date
|
// Due Date
|
||||||
span.task-date(ng-if='task.type=="todo" && task.date')
|
span.task-date(bo-if='task.type=="todo" && task.date')
|
||||||
| {{task.date}}
|
| {{task.date}}
|
||||||
// Streak
|
// Streak
|
||||||
span(ng-show='task.streak') {{task.streak}}
|
span(ng-show='task.streak') {{task.streak}}
|
||||||
|
|
@ -11,7 +11,7 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
i.icon-forward
|
i.icon-forward
|
||||||
|
|
||||||
// Icons only available if you own the tasks (aka, hidden from challenge stats)
|
// Icons only available if you own the tasks (aka, hidden from challenge stats)
|
||||||
span(ng-if='!obj._locked')
|
span(bo-if='!obj._locked')
|
||||||
i.icon-tags(tooltip='{{appliedTags(user.tags, task.tags)}}', ng-hide='noTags(task.tags)')
|
i.icon-tags(tooltip='{{appliedTags(user.tags, task.tags)}}', ng-hide='noTags(task.tags)')
|
||||||
// edit
|
// edit
|
||||||
a(ng-hide='task._editing', ng-click='editTask(task)', tooltip='Edit')
|
a(ng-hide='task._editing', ng-click='editTask(task)', tooltip='Edit')
|
||||||
|
|
@ -23,13 +23,13 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
a(ng-hide='!task._editing', ng-click='editTask(task);saveTask(task)', tooltip='Save')
|
a(ng-hide='!task._editing', ng-click='editTask(task);saveTask(task)', tooltip='Save')
|
||||||
i.icon-ok(ng-hide='!task._editing')
|
i.icon-ok(ng-hide='!task._editing')
|
||||||
//challenges
|
//challenges
|
||||||
span(ng-if='task.challenge.id')
|
span(bo-if='task.challenge.id')
|
||||||
span(ng-if='task.challenge.broken')
|
span(bo-if='task.challenge.broken')
|
||||||
i.icon-bullhorn(style='background-color:red;', ng-click='task._editing = true', tooltip="Broken Challenge Link", tooltip-placement='right')
|
i.icon-bullhorn(style='background-color:red;', ng-click='task._editing = true', tooltip="Broken Challenge Link", tooltip-placement='right')
|
||||||
span(ng-if='!task.challenge.broken')
|
span(bo-if='!task.challenge.broken')
|
||||||
i.icon-bullhorn(tooltip="Challenge")
|
i.icon-bullhorn(tooltip="Challenge")
|
||||||
// delete
|
// delete
|
||||||
a(ng-if='!task.challenge.id', ng-click='removeTask(obj[list.type+"s"], $index)', tooltip='Delete')
|
a(bo-if='!task.challenge.id', ng-click='removeTask(obj[list.type+"s"], $index)', tooltip='Delete')
|
||||||
i.icon-trash
|
i.icon-trash
|
||||||
|
|
||||||
// chart
|
// chart
|
||||||
|
|
@ -43,7 +43,7 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
.task-controls.task-primary
|
.task-controls.task-primary
|
||||||
|
|
||||||
// Habits
|
// Habits
|
||||||
span(ng-if='task.type=="habit"')
|
span(bo-if='task.type=="habit"')
|
||||||
// score() is overridden in challengesCtrl to do nothing
|
// score() is overridden in challengesCtrl to do nothing
|
||||||
a.task-action-btn(ng-if='task.up', ng-click='score(task,"up")') +
|
a.task-action-btn(ng-if='task.up', ng-click='score(task,"up")') +
|
||||||
a.task-action-btn(ng-if='task.down', ng-click='score(task,"down")') -
|
a.task-action-btn(ng-if='task.down', ng-click='score(task,"down")') -
|
||||||
|
|
@ -55,7 +55,7 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
span.shop_gold
|
span.shop_gold
|
||||||
|
|
||||||
// Daily & Todos
|
// Daily & Todos
|
||||||
span.task-checker.action-yesno(ng-if='task.type=="daily" || task.type=="todo"')
|
span.task-checker.action-yesno(bo-if='task.type=="daily" || task.type=="todo"')
|
||||||
input.visuallyhidden.focusable(ng-if='$state.includes("tasks")', id='box-{{obj._id}}_{{task.id}}', type='checkbox', ng-model='task.completed', ng-change='changeCheck(task)')
|
input.visuallyhidden.focusable(ng-if='$state.includes("tasks")', id='box-{{obj._id}}_{{task.id}}', type='checkbox', ng-model='task.completed', ng-change='changeCheck(task)')
|
||||||
input.visuallyhidden.focusable(ng-if='!$state.includes("tasks")', id='box-{{obj._id}}_{{task.id}}', type='checkbox')
|
input.visuallyhidden.focusable(ng-if='!$state.includes("tasks")', id='box-{{obj._id}}_{{task.id}}', type='checkbox')
|
||||||
label(for='box-{{obj._id}}_{{task.id}}')
|
label(for='box-{{obj._id}}_{{task.id}}')
|
||||||
|
|
@ -67,27 +67,27 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
.task-options(ng-show='task._editing')
|
.task-options(ng-show='task._editing')
|
||||||
|
|
||||||
// Broken Challenge
|
// Broken Challenge
|
||||||
.well(ng-if='task.challenge.broken')
|
.well(bo-if='task.challenge.broken')
|
||||||
div(ng-if='task.challenge.broken=="TASK_DELETED"')
|
div(bo-if='task.challenge.broken=="TASK_DELETED"')
|
||||||
p Broken Challenge Link: this task was part of a challenge, but has been removed from it. What would you like to do?
|
p Broken Challenge Link: this task was part of a challenge, but has been removed from it. What would you like to do?
|
||||||
p
|
p
|
||||||
a(ng-click='unlink(task, "keep")') Keep It
|
a(ng-click='unlink(task, "keep")') Keep It
|
||||||
| |
|
| |
|
||||||
a(ng-click="removeTask(obj[list.type+'s'], $index)") Remove It
|
a(ng-click="removeTask(obj[list.type+'s'], $index)") Remove It
|
||||||
div(ng-if='task.challenge.broken=="CHALLENGE_DELETED"')
|
div(bo-if='task.challenge.broken=="CHALLENGE_DELETED"')
|
||||||
p Broken Challenge Link: this task was part of a challenge, but the challenge (or group) has been deleted. What to do with the orphan tasks?
|
p Broken Challenge Link: this task was part of a challenge, but the challenge (or group) has been deleted. What to do with the orphan tasks?
|
||||||
p
|
p
|
||||||
a(ng-click='unlink(task, "keep-all")') Keep Them
|
a(ng-click='unlink(task, "keep-all")') Keep Them
|
||||||
| |
|
| |
|
||||||
a(ng-click='unlink(task, "remove-all")') Remove Them
|
a(ng-click='unlink(task, "remove-all")') Remove Them
|
||||||
div(ng-if='task.challenge.broken=="CHALLENGE_CLOSED"')
|
div(bo-if='task.challenge.broken=="CHALLENGE_CLOSED"')
|
||||||
p.
|
p.
|
||||||
This challenge has been completed, and the winner was <span class='badge'>{{task.challenge.winner}}</span>! What to do with the orphan tasks?
|
This challenge has been completed, and the winner was <span class='badge'>{{task.challenge.winner}}</span>! What to do with the orphan tasks?
|
||||||
p
|
p
|
||||||
a(ng-click='unlink(task, "keep-all")') Keep Them
|
a(ng-click='unlink(task, "keep-all")') Keep Them
|
||||||
| |
|
| |
|
||||||
a(ng-click='unlink(task, "remove-all")') Remove Them
|
a(ng-click='unlink(task, "remove-all")') Remove Them
|
||||||
//-div(ng-if='task.challenge.broken=="UNSUBSCRIBED"')
|
//-div(bo-if='task.challenge.broken=="UNSUBSCRIBED"')
|
||||||
p Broken Challenge Link: this task was part of a challenge, but you have unsubscribed from the challenge. What to do with the orphan tasks?
|
p Broken Challenge Link: this task was part of a challenge, but you have unsubscribed from the challenge. What to do with the orphan tasks?
|
||||||
p
|
p
|
||||||
a(ng-click="unlink(task, 'keep-all')") Keep Them
|
a(ng-click="unlink(task, 'keep-all')") Keep Them
|
||||||
|
|
@ -104,7 +104,7 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
textarea.option-content(rows='3', ng-model='task.notes', ng-disabled='task.challenge.id')
|
textarea.option-content(rows='3', ng-model='task.notes', ng-disabled='task.challenge.id')
|
||||||
|
|
||||||
// if Habit, plus/minus command options
|
// if Habit, plus/minus command options
|
||||||
fieldset.option-group(ng-if='task.type=="habit" && !task.challenge.id')
|
fieldset.option-group(bo-if='task.type=="habit" && !task.challenge.id')
|
||||||
legend.option-title Direction/Actions
|
legend.option-title Direction/Actions
|
||||||
span.task-checker.action-plusminus.select-toggle
|
span.task-checker.action-plusminus.select-toggle
|
||||||
input.visuallyhidden.focusable(id='{{obj._id}}_{{task.id}}-option-plus', type='checkbox', ng-model='task.up')
|
input.visuallyhidden.focusable(id='{{obj._id}}_{{task.id}}-option-plus', type='checkbox', ng-model='task.up')
|
||||||
|
|
@ -114,7 +114,7 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
label(for='{{obj._id}}_{{task.id}}-option-minus')
|
label(for='{{obj._id}}_{{task.id}}-option-minus')
|
||||||
|
|
||||||
// if Daily, calendar
|
// if Daily, calendar
|
||||||
fieldset(ng-if='task.type=="daily"', class="option-group")
|
fieldset(bo-if='task.type=="daily"', class="option-group")
|
||||||
legend.option-title Repeat
|
legend.option-title Repeat
|
||||||
.task-controls.tile-group.repeat-days
|
.task-controls.tile-group.repeat-days
|
||||||
// note, does not use data-toggle="buttons-checkbox" - it would interfere with our own click binding
|
// note, does not use data-toggle="buttons-checkbox" - it would interfere with our own click binding
|
||||||
|
|
@ -127,14 +127,14 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
button.task-action-btn.tile(ng-class='{active: task.repeat.s}', type='button', data-day='s', ng-click='task.challenge.id || (task.repeat.s = !task.repeat.s)') S
|
button.task-action-btn.tile(ng-class='{active: task.repeat.s}', type='button', data-day='s', ng-click='task.challenge.id || (task.repeat.s = !task.repeat.s)') S
|
||||||
|
|
||||||
// if Reward, pricing
|
// if Reward, pricing
|
||||||
fieldset.option-group.option-short(ng-if='task.type=="reward" && !task.challenge.id')
|
fieldset.option-group.option-short(bo-if='task.type=="reward" && !task.challenge.id')
|
||||||
legend.option-title Price
|
legend.option-title Price
|
||||||
input.option-content(type='number', size='16', min='0', step="any", ng-model='task.value')
|
input.option-content(type='number', size='16', min='0', step="any", ng-model='task.value')
|
||||||
.money.input-suffix
|
.money.input-suffix
|
||||||
span.shop_gold
|
span.shop_gold
|
||||||
|
|
||||||
// if Todos, the due date
|
// if Todos, the due date
|
||||||
fieldset.option-group(ng-if='task.type=="todo" && !task.challenge.id')
|
fieldset.option-group(bo-if='task.type=="todo" && !task.challenge.id')
|
||||||
legend.option-title Due Date
|
legend.option-title Due Date
|
||||||
input.option-content.datepicker(type='text', data-date-format='mm/dd/yyyy', ng-model='task.date')
|
input.option-content.datepicker(type='text', data-date-format='mm/dd/yyyy', ng-model='task.date')
|
||||||
|
|
||||||
|
|
@ -145,7 +145,7 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
| {{tag.name}}
|
| {{tag.name}}
|
||||||
|
|
||||||
// Advanced Options
|
// Advanced Options
|
||||||
span(ng-if='task.type!="reward"')
|
span(bo-if='task.type!="reward"')
|
||||||
p.option-title.mega(ng-click='task._advanced = !task._advanced') Advanced Options
|
p.option-title.mega(ng-click='task._advanced = !task._advanced') Advanced Options
|
||||||
fieldset.option-group.advanced-option(ng-class="{visuallyhidden: !task._advanced}")
|
fieldset.option-group.advanced-option(ng-class="{visuallyhidden: !task._advanced}")
|
||||||
legend.option-title
|
legend.option-title
|
||||||
|
|
@ -156,8 +156,8 @@ li(ng-repeat='task in obj[list.type+"s"]', class='task {{taskClasses(task, user.
|
||||||
button.task-action-btn.tile(type='button', ng-class='{active: task.priority=="!" || !task.priority}', ng-click='task.challenge.id || (task.priority="!")') Easy
|
button.task-action-btn.tile(type='button', ng-class='{active: task.priority=="!" || !task.priority}', ng-click='task.challenge.id || (task.priority="!")') Easy
|
||||||
button.task-action-btn.tile(type='button', ng-class='{active: task.priority=="!!"}', ng-click='task.challenge.id || (task.priority="!!")') Medium
|
button.task-action-btn.tile(type='button', ng-class='{active: task.priority=="!!"}', ng-click='task.challenge.id || (task.priority="!!")') Medium
|
||||||
button.task-action-btn.tile(type='button', ng-class='{active: task.priority=="!!!"}', ng-click='task.challenge.id || (task.priority="!!!")') Hard
|
button.task-action-btn.tile(type='button', ng-class='{active: task.priority=="!!!"}', ng-click='task.challenge.id || (task.priority="!!!")') Hard
|
||||||
//-span(ng-if='task.type=="daily" && !task.challenge.id')
|
//-span(bo-if='task.type=="daily" && !task.challenge.id')
|
||||||
span(ng-if='task.type=="daily"')
|
span(bo-if='task.type=="daily"')
|
||||||
legend.option-title Restore Streak
|
legend.option-title Restore Streak
|
||||||
input.option-content(type='number', ng-model='task.streak')
|
input.option-content(type='number', ng-model='task.streak')
|
||||||
button.task-action-btn.tile.spacious(type='submit') Save & Close
|
button.task-action-btn.tile.spacious(type='submit') Save & Close
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue