Hi cmari...

That's a cool solution!

I added a few options to complete the "cycle" and added it to the
toolbar, see here:
http://lastfm.tiddlyspot.com/#ViewTemplate

I'd love to see this generalized though ...in a way were neither
hideWhen nor CheckboxPlugin were needed.

I would love to be able to set up a definition tiddler, in this case
called "taskCycle", which would read like this:

tag 1, text for button to add tag 1, tooltip for button to add tag 1,
css class for button to add tag 1, RemoveButton?
tag 2, text for button to add tag 2, tooltip for button to add tag 2,
css class for button to add tag 2, RemoveButton?
tag 3, text for button to add tag 3, tooltip for button to add tag 3,
css class for button to add tag 3, RemoveButton?

etc...

And a macro to suck that in and let you cycle through, like:

<<cycleTags "taskCycle">>

Which would allow you to add the first tag from the list, when no tag
from the list is assigned
and create a button to switch from one tag to the next in the list,
while at the end allowing you to reassign the first tag.
Optionally you could define for each "stage" whether or not you want
to be able
to see a button to remove the currently assigned tag from the cycle
and to go back to the initial state.


An initial way to generalize that were a simple macro called
"addTag" (which I haven't found yet), which would use
CreateTiddlyButton (and allow you to pass all available options as
parameters to it) to create buttons instead of checkboxes (because
they're not needed ...I'd rather want to be able to fiddle with css
classes) whereas when you click that button, you would add a
predefined tag just as you did in your example.

store.setTiddlerTag(ThisTiddler, 1,'TagDefinedInTheMacroCall');


What do you think?

On Aug 28, 4:16 am, cmari <[email protected]> wrote:
> Or, you could take advantage of the onClickAfter powers of the
> CheckboxPlugin (http://www.tiddlytools.com/##CheckboxPlugin).  For
> example, if you also have the HideWhenPlugin (http://
> mptw.tiddlyspot.com/#HideWhenPlugin), you could put something like
> this in your ViewTemplate:
>
> <span macro="showWhenTagged 'queued'">change the tag to assigned:
> <span macro="checkbox [[]] [[]] [[]] [[]] [[{var
> t=story.findContainingTiddler(place).getAttribute('tiddler');
> store.setTiddlerTag(t,0,'queued'); store.setTiddlerTag(t,
> 1,'assigned');}]]"></span></span>
> <span macro="showWhenTagged 'assigned'">change the tag to completed:
> <span macro="checkbox [[]] [[]] [[]] [[]] [[{var
> t=story.findContainingTiddler(place).getAttribute('tiddler');
> store.setTiddlerTag(t,0,'assigned'); store.setTiddlerTag(t,
> 1,'completed');}]]"></span></span>
> <span macro="showWhenTagged 'completed'">change the tag to archived:
> <span macro="checkbox [[]] [[]] [[]] [[]] [[{var
> t=story.findContainingTiddler(place).getAttribute('tiddler');
> store.setTiddlerTag(t,0,'completed'); store.setTiddlerTag(t,
> 1,'archived');}]]"></span></span>
>
> cmari
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to