mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- incorrect date of completion on complete task
This commit is contained in:
parent
c7039ee175
commit
5b7440680a
2 changed files with 6 additions and 6 deletions
|
|
@ -206,7 +206,8 @@ elseif(isset($_GET['completeTask']))
|
|||
array($dateCompleted, time()) );
|
||||
$t = array();
|
||||
$t['total'] = 1;
|
||||
$t['list'][] = array('id'=>$id, 'compl'=>$compl, 'ow'=>$ow, 'dateCompleted'=>$dateCompleted?htmlarray(timestampToDatetime($dateCompleted)):'');
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}todolist WHERE id=$id");
|
||||
$t['list'][] = prepareTaskRow($r);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1149,9 +1149,7 @@ function completeTask(id, ch)
|
|||
var item = json.list[0];
|
||||
if(item.compl) $('#taskrow_'+id).addClass('task-completed');
|
||||
else $('#taskrow_'+id).removeClass('task-completed');
|
||||
taskList[id].ow = item.ow;
|
||||
taskList[id].compl = item.compl;
|
||||
taskList[id].dateCompleted = item.dateCompleted;
|
||||
taskList[id] = item;
|
||||
changeTaskCnt(taskList[id], 0);
|
||||
if(item.compl && !curList.showCompl) {
|
||||
delete taskList[id];
|
||||
|
|
@ -1159,8 +1157,9 @@ function completeTask(id, ch)
|
|||
$('#taskrow_'+id).fadeOut('normal', function(){ $(this).remove() });
|
||||
}
|
||||
else if(curList.showCompl) {
|
||||
$('#taskrow_'+id).fadeOut('fast', function(){
|
||||
changeTaskOrder(id);
|
||||
$('#taskrow_'+item.id).replaceWith(prepareTaskStr(taskList[id]));
|
||||
$('#taskrow_'+id).fadeOut('fast', function(){
|
||||
changeTaskOrder(id);
|
||||
$(this).effect("highlight", {color:_mtt.theme.editTaskFlashColor}, 'normal', function(){$(this).css('display','')});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue