diff --git a/src/ajax.js b/src/ajax.js index 017b981..fdb6c8e 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -288,6 +288,9 @@ function editTask(id) for(var i=0; ispan').text(item.date); + if(item.compl) $('#taskedit-date .date-completed').show().find('span').text(item.dateCompleted); + else $('#taskedit-date .date-completed').hide(); showEditForm(); return false; } @@ -299,11 +302,11 @@ function showEditForm(isAdd) if(document.selection && document.selection.empty) document.selection.empty(); else if(window.getSelection) window.getSelection().removeAllRanges(); if(isAdd) { - showhide($('#page_taskedit>h3.mtt-inadd'), $('#page_taskedit>h3.mtt-inedit')); + $('#page_taskedit').removeClass('mtt-inedit').addClass('mtt-inadd'); document.edittask.isadd.value = 1; } else { - showhide( $('#page_taskedit>h3.mtt-inedit'), $('#page_taskedit>h3.mtt-inadd')); + $('#page_taskedit').removeClass('mtt-inadd').addClass('mtt-inedit'); document.edittask.isadd.value = 0; } var w = $('#page_taskedit'); diff --git a/src/ajax.php b/src/ajax.php index 7f404b8..9994133 100644 --- a/src/ajax.php +++ b/src/ajax.php @@ -439,6 +439,7 @@ function prepareTaskRow($r, $tz) 'title' => htmlarray($r['title']), 'date' => htmlarray($dCreated), 'dateInline' => htmlarray(sprintf($lang->get('taskdate_inline'), $dCreated)), + 'dateCompleted' => htmlarray(timestampToDatetime($r['d_completed'], $tz)), 'compl' => (int)$r['compl'], 'prio' => $r['prio'], 'note' => nl2br(htmlarray($r['note'])), diff --git a/src/index.php b/src/index.php index 457d67d..abb9a3b 100644 --- a/src/index.php +++ b/src/index.php @@ -141,6 +141,11 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );