Only convert date if there's one
This commit is contained in:
@@ -284,8 +284,10 @@ function task_save(task_id, task_url) {
|
||||
// NOTE: this is tightly linked to the HTML of the task list in for_project.jade.
|
||||
$('.task-name-' + saved_task._id).text(saved_task.name).flashOnce();
|
||||
$task.find('span.name').text(saved_task.name);
|
||||
$task.find('span.due_date').text(moment().to(saved_task.properties.due_date));
|
||||
$task.find('span.status').text(saved_task.properties.status.replace('_', ' '));
|
||||
if (saved_task.properties.due_date){
|
||||
$task.find('span.due_date').text(moment().to(saved_task.properties.due_date));
|
||||
}
|
||||
|
||||
$task
|
||||
.removeClassPrefix('status-')
|
||||
|
Reference in New Issue
Block a user