From 0a7136b8fc2ef06093631e537aece42c1f9b17ed Mon Sep 17 00:00:00 2001 From: hitoshihrm <59504957+HitoshiHRM@users.noreply.github.com> Date: Thu, 12 Mar 2020 17:23:07 +0900 Subject: [PATCH] 3 tiny changes for "All Done" button. (#136) 1."onAllDone" callback fixation. Because the callback deletes all tasks instead of making them done, fixed. 2.Retouching checkbox and label property. Because a checkbox didn't work and label did'nt affect the checkbox, I set the callback on checkbox, and rename label's "for" property. 3.Adding Global var "doneswitch" for convinience. I guess the button should be able to make "All Done" and "All Undone" because the checkbox is not a button. So make it done, undone button interfaced with the checkbox's display. --- examples/todoapp/todoapp.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/todoapp/todoapp.nim b/examples/todoapp/todoapp.nim index b944de5..e3720fd 100644 --- a/examples/todoapp/todoapp.nim +++ b/examples/todoapp/todoapp.nim @@ -9,7 +9,7 @@ var selectedEntry = -1 filter: Filter entriesLen: int - + doneswitch = true const contentSuffix = cstring"content" completedSuffix = cstring"completed" @@ -62,9 +62,9 @@ proc toggleEntry(ev: Event; n: VNode) = markAsCompleted(id, not isCompleted(id)) proc onAllDone(ev: Event; n: VNode) = - clear() - selectedEntry = -1 - + for i in 0..