Merge pull request #4980 from gisikw/sort-dated-todos

Sorted dated todos by date.
This commit is contained in:
Alys 2015-04-06 18:22:51 +10:00
commit 32a71bfc74
3 changed files with 2 additions and 3 deletions

View file

@ -44,7 +44,6 @@
"remaining": "Active",
"complete": "Done",
"dated": "Dated",
"datedNotSorted": "Dated To-Dos are NOT sorted by date. Sorting will probably be implemented in future.",
"due": "Due",
"grey": "Grey",
"score": "Score",

View file

@ -66,7 +66,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
ul.task-filter
li(ng-class='{active: list.view == "remaining"}')
a(ng-click='list.view = "remaining"')=env.t('remaining')
li(ng-class='{active: list.view == "dated"}', tooltip=env.t('datedNotSorted'))
li(ng-class='{active: list.view == "dated"}')
a(ng-click='list.view = "dated"')=env.t('dated')
li(ng-class='{active: list.view == "complete"}')
a(ng-click='list.view = "complete"')=env.t('complete')

View file

@ -1,4 +1,4 @@
li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s"]', class='task {{Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', ng-click='spell && (list.type != "reward") && castEnd(task, "task", $event)', ng-class='{"cast-target":spell && (list.type != "reward"), "locked-task":obj._locked === true}', popover-trigger='mouseenter', data-popover-html="{{task.notes | markdown}}", popover-placement="top", popover-append-to-body='{{::modal ? "false":"true"}}', ng-show='shouldShow(task, list, user.preferences)')
li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s"] | orderBy:(list.view == "dated" ? "date" : null)', class='task {{Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', ng-click='spell && (list.type != "reward") && castEnd(task, "task", $event)', ng-class='{"cast-target":spell && (list.type != "reward"), "locked-task":obj._locked === true}', popover-trigger='mouseenter', data-popover-html="{{task.notes | markdown}}", popover-placement="top", popover-append-to-body='{{::modal ? "false":"true"}}', ng-show='shouldShow(task, list, user.preferences)')
// right-hand side control buttons
.task-meta-controls