How to? Automatically refreshing daily checklist

32 views
Skip to first unread message

Dave Gifford - http://www.giffmex.org/

unread,
Apr 25, 2008, 9:21:44 PM4/25/08
to TiddlyWiki
I'm tinkering again, and just wondering if anyone has an idea how this
might be accomplished:

A tiddler with a daily checklist of items that have to be done every
day. As you check the box next to the item it turns it gray and struck-
through, or at least distinct from the non-checked items anyway. That
part's not so important.

But when you open it the next day, all the items are now unchecked and
restored to be checked off for the new day.

Is there a way to do this in TiddlyWiki? Where there's a wiki there's
a way, right?

Dave

Dave Gifford - http://www.giffmex.org/

unread,
Apr 25, 2008, 10:47:46 PM4/25/08
to TiddlyWiki
Or, another easier option that would please me just as well would be
to tell me how to create a 'toggle all' box like at the top of Import
Tiddlers. I could check things, then toggle all to uncheck them at the
beginning of the next day.

Dave

Eric Shulman

unread,
Apr 26, 2008, 12:04:12 AM4/26/08
to TiddlyWiki
http://www.TiddlyTools.com/#ChecklistScript

does exactly this.

enjoy,
-e

Eric Shulman

unread,
Apr 26, 2008, 12:14:33 AM4/26/08
to TiddlyWiki
> > to tell me how to create a 'toggle all' box like at the top of Import
well, not "exactly"... it doesn't use a 'checkbox at the top' to
toggle the other checkboxes... it uses a pushbutton. But the concept
is the same.

-e

Dave Gifford - http://www.giffmex.org/

unread,
Apr 26, 2008, 9:48:28 AM4/26/08
to TiddlyWiki
Worked like a charm! Thanks!

Actually it left a big space above it, so I put the script in another
tiddler and accessed it in my to-do list with the PartTiddlerPlugin.

Dave

Eric Shulman

unread,
Apr 27, 2008, 11:58:56 AM4/27/08
to TiddlyWiki
> Actually it left a big space above it, so I put the script in another
> tiddler and accessed it in my to-do list with the PartTiddlerPlugin.

http://www.TiddlyTools.com/#ChecklistScript

has been re-written to eliminate the dependency on CheckboxPlugin
(though it does still require InlineJavascriptPlugin to initialize the
checkboxes).

[[ChecklistScript]] now uses direct HTML to render checkboxes that
toggle tags. It also uses an interesting technique to define the HTML
in a hidden tiddler slice that can be easily re-used to embed a
'toggletag' checkbox into any tiddler, like this:

/% HTML/script code for rendering a 'toggle tag' checkbox:
|toggletag|<html><form style="display:inline"><input type="checkbox"
name='c' onclick="var
tid=story.findContainingTiddler(this).getAttribute('tiddler');
store.setTiddlerTag(tid,this.checked,'$1');"></form></html><script>var
t=store.getTiddler(story.findContainingTiddler(place).getAttribute('tiddler'));
place.lastChild.getElementsByTagName('form')
[0].c.checked=t.isTagged('$1');</script>|
%/

<<tiddler [[ChecklistScript::toggletag]] with: questions>> Ask
questions
<<tiddler [[ChecklistScript::toggletag]] with: answers>> Seek Answers
<<tiddler [[ChecklistScript::toggletag]] with: fun>> Have Fun
<<tiddler [[ChecklistScript::toggletag]] with: difference>> Make A
Difference
<<tiddler [[ChecklistScript::toggletag]] with: smile>> Smile

enjoy,
-e

Eric Shulman

unread,
Apr 30, 2008, 7:01:05 AM4/30/08
to TiddlyWiki
http://www.TiddlyTools.com/#ChecklistScript

has been updated again, to use tiddler *section* syntax for defining
the 'toggletag', 'toggleall', and 'resetall' content that is then
displayed using:

<<tiddler [[ChecklistScript##toggletag]] with: "tag">> text to show
<<tiddler [[ChecklistScript##toggleall]] with: "tag tag tag tag">>
text to show
<<tiddler [[ChecklistScript##resetall]] with: "buttonlabel" "tag tag
tag tag">>

Tiddler *sections* have advantages over using tiddler *slices*.
Specifically, the section definitions can include the "|" character
which was needed by slices to enter the delimiting 'table' format that
surrounds the slice, as well as embedded newlines which permits use of
multi-line content. The only limit on section content is that it
can't contain a line that starts with "!" (e.g. the heading format),
because that is used to delimit the section.

enjoy,
-e
Reply all
Reply to author
Forward
0 new messages