Skip to content

Commit

Permalink
fix when change status of todo
Browse files Browse the repository at this point in the history
  • Loading branch information
tranchausky committed Dec 29, 2024
1 parent b39ba58 commit 7de35b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion links/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,19 @@ $(document).ready(function () {
updateTodo({status:'completed',task:allTaskNew[key]['task']}, key);
viewTypeTodoNew();
//set remove select
$('#todo-group-sort button.asc').trigger('click');
triggerOldClick();
}
})
function triggerOldClick(){
$('#todo-group-sort button.asc').trigger('click').trigger('click');
}
$(document.body).on('click', '.list-todo-completed input[type="checkbox"]', function (event) {
var isCheck = $(this).is(":checked");
if (isCheck == true) {
var key = $(this).closest('.at-task').attr('data-key')
//updateTodo(allTaskComplete[key]['task'], 'new', key)
updateTodo({status:'new',task:allTaskComplete[key]['task']}, key)
triggerOldClick();
}
})

Expand Down

0 comments on commit 7de35b3

Please sign in to comment.