improved easylist: now toggling task state between pending and open

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-02-02 23:12:23 +01:00
parent 1942f377b8
commit 3b6e84d1af

View File

@@ -88,8 +88,8 @@
function onclick(evt) { function onclick(evt) {
ignore(evt); ignore(evt);
let task = getTask(evt); let task = getTask(evt);
if (task.status <= 20) { // open if (task.status == 20) { // open
update(task,60); update(task,10);
} else update(task,20); } else update(task,20);
return false; return false;
} }
@@ -153,7 +153,7 @@
<legend>{t('state_complete')}</legend> <legend>{t('state_complete')}</legend>
{#if sorted} {#if sorted}
{#each sorted as task} {#each sorted as task}
{#if task.status > 20 && match(task)} {#if task.status < 20 && match(task)}
<div href={`/task/${task.id}/view`} title={task.description.source} task_id={task.id} {onclick} {oncontextmenu} {ontouchstart} {ontouchend} onmousedown={ontouchstart} onmouseup={ontouchend} > <div href={`/task/${task.id}/view`} title={task.description.source} task_id={task.id} {onclick} {oncontextmenu} {ontouchstart} {ontouchend} onmousedown={ontouchstart} onmouseup={ontouchend} >
{task.name} {task.name}
</div> </div>