mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
Tasks: add double-click to edit, and date-picker-popup for
due-dates. Show red dates when overdue (basic)
This commit is contained in:
parent
74c905f1e1
commit
1ace999cb7
2 changed files with 10 additions and 3 deletions
|
|
@ -68,6 +68,13 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
|||
});
|
||||
};
|
||||
|
||||
/*
|
||||
------------------------
|
||||
To-Dos
|
||||
------------------------
|
||||
*/
|
||||
$scope._today = moment().add('days',1);
|
||||
|
||||
/*
|
||||
------------------------
|
||||
Checklists
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
li(bindonce='list', bo-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 && castEnd(task, "task", $event)', ng-class='{"cast-target":spell}', popover-trigger='mouseenter', popover-placement='top', popover='{{task.notes}}')
|
||||
li(bindonce='list', bo-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 && castEnd(task, "task", $event)', ng-class='{"cast-target":spell}', popover-trigger='mouseenter', popover-placement='top', popover='{{task.notes}}', ng-dblclick='editTask(task)')
|
||||
// right-hand side control buttons
|
||||
.task-meta-controls
|
||||
|
||||
// Due Date
|
||||
span.task-date(ng-if='task.type=="todo" && task.date')
|
||||
| {{task.date}}
|
||||
span(ng-class='{"label label-important":moment(task.date).isBefore(_today)}') {{moment(task.date).format('MM/DD')}}
|
||||
// Streak
|
||||
span(ng-show='task.streak') {{task.streak}}
|
||||
span(tooltip='Streak Counter')
|
||||
|
|
@ -155,7 +155,7 @@ li(bindonce='list', bo-id='"task-"+task.id', ng-repeat='task in obj[list.type+"s
|
|||
// if Todos, the due date
|
||||
fieldset.option-group(ng-if='task.type=="todo" && !task.challenge.id')
|
||||
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', datepicker-popup='MM/dd/yyyy', ng-model='task.date')
|
||||
|
||||
fieldset.option-group(ng-if='!$state.includes("options.social.challenges")')
|
||||
legend.option-title Tags
|
||||
|
|
|
|||
Loading…
Reference in a new issue