script creating a button to cycle through a taglist

65 views
Skip to first unread message

Tobias

unread,
Aug 28, 2009, 7:23:23 PM8/28/09
to TiddlyWiki
Hi,

Based on InlineJavascriptPlugin and a conversation with Eric Schulman
(on his integrated tinychat in tiddlytools) I created a "simple"
script that allows you to iterate over a defined set of tags switching
from one to the next via clicking a button.

http://lastfm.tiddlyspot.com/#cycleTagsInfo

Hope that's of use to anyone of you, enjoy.


Tobias.

tony

unread,
Sep 1, 2009, 4:37:11 PM9/1/09
to TiddlyWiki
On Aug 28, 4:23 pm, Tobias <beertob...@googlemail.com> wrote:

> http://lastfm.tiddlyspot.com/#cycleTagsInfo
>
> Hope that's of use to anyone of you, enjoy.
>
> Tobias.

Thank you very much Tobias for creating and sharing.

cycleTags works as a great pseudo radio button control that has
replaced my checkboxes.

I was using ToggleTagPlugin to add checkbox statuses to tiddlers like
Cognywiki:
http://liris.cnrs.fr/~ogeorgeo/cognywiki.html

but had minor issues with having to uncheck the previous status.

Now with cycleTags, it just takes one click to move through the tag
statuses.

Great work!

Best,
tony

Tobias

unread,
Sep 1, 2009, 5:41:26 PM9/1/09
to TiddlyWiki
Thanks Tony,

There are some interesting points to your CognyWiki... I think I'll be
reading it through and create a cheat cheet for myself.

Tobias.

tony

unread,
Sep 1, 2009, 6:41:30 PM9/1/09
to TiddlyWiki
On Sep 1, 2:41 pm, Tobias <beertob...@googlemail.com> wrote:
> There are some interesting points to your CognyWiki...

Ah no, that is the fine work of Olivier GEORGEON, a cognitive
scientist:
http://liris.cnrs.fr/~ogeorgeo/index_en.htm

I'll try to post my KanbanWiki theme which is a mashup of your
cycleTags and Eric's TiddlyTools; heck almost everything sources back
to TiddlyTools one way or another :-)

I just need to squeeze in one more plugin and test against
Tiddlywebwiki.

Best,
tony

Anthony Muscio

unread,
Sep 2, 2009, 2:30:12 AM9/2/09
to tiddl...@googlegroups.com
Tobias.

Thanks for cycleTags and addtag macro. I will certainly be using them right away to re-engineer my Task management system. TiddlyWiki is screaming out for mature tag manipulation to be part of the core, these tools start us on that path.

Something we could think about is the ability to select one from a list of possible tags and ensure that only one is applied; that is those others are removed if present. An Example may be a Day of Month Tag
1st of Month
2nd of Month
...
31st of Month

Which is to big a list to cycle through, but if you want to change the tag from the 7th of month to the 21 st of month it will identify and remove any previous Nth of month tag (in this case the 7th of Month).

But good work and thanks again.

TonyM

If you have not found an easy way to do it with TiddlyWiki, you have missed something.
www.tiddlywiki.com

Eric Shulman

unread,
Sep 2, 2009, 3:35:05 AM9/2/09
to TiddlyWiki
> Something we could think about is the ability to select one from a list of
> possible tags and ensure that only one is applied; that is those others are
> removed if present. An Example may be a Day of Month Tag

I just tried a little experiment using
http://www.TiddlyTools.com/#ListboxPlugin

I wrote this:
<<select tags rows:1 A B C D E F G>>

... and it works!.... sort of... selecting any value from the droplist
sets the tiddler's tags to that value (and that value only). Of
course, this means that you can't have any other tags (i.e., tags
*not* in the list) assigned to the tiddler, which isn't very
practical.

Fortunately, it should be relatively straighforward to add special-
case handling for the tags field so that, instead of completely
replacing the current tags:
* tags that are selected in the list are added to the tiddler
* tags that are unselected in the list are removed from the tiddler
* all other tags are left as-is

I'll post when I have an update.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Eric Shulman

unread,
Sep 2, 2009, 6:07:41 AM9/2/09
to TiddlyWiki
>    <<select tags rows:1 A B C D E F G>>
> Fortunately, it should be relatively straighforward to add special-
> case handling for the tags field so that, instead of completely
> replacing the current tags:
> * tags that are selected in the list are added to the tiddler
> * tags that are unselected in the list are removed from the tiddler
> * all other tags are left as-is
> I'll post when I have an update.

ListboxPlugin has been updated (v1.3.0)
http://www.TiddlyTools.com/#ListboxPlugin

You can now write something like:
<<select tags rows:1 unassigned assigned inprogress testing
completed>>

This will set *one* of the indicated tag values on the current
tiddler. Selecting a different item in the list removes the previous
tag and replaces it with the new one. Any other tags that are not in
the listbox are left unchanged.

Tobias

unread,
Sep 2, 2009, 6:36:00 AM9/2/09
to TiddlyWiki
That is great Eric,

A simple selective Tag adding mechanism via dropdowns!
Looks like Tagger is getting competion ;-)

Besides that addition that you are planning to make,
I think it were also great if one could specify...

a) in addition to "allowblank" an "initial value" which would always
be shown as long as none of the list-items are selected, but not
effect any changes upon selection, e.g. "add status..."

b) a user defined tooltip


@TonyM... I think for your "unique select" Erics addition will
definitely do what you want in a better way.
As for addTagMacro I'll look into adding the ability to specify
multiple tags in "removeTag".

Tobias.

Tobias

unread,
Sep 2, 2009, 6:36:45 AM9/2/09
to TiddlyWiki
Great!

Tobias

unread,
Sep 2, 2009, 6:50:40 AM9/2/09
to TiddlyWiki
While being at it, that "initial value" would also come in handy to
remove any of the tags from the list.
So other than what I said before, I think if you implemented it,
selecting that item should NOT leave the tags untouched, but rather
revert the tiddler to the "initial state".

Tobias

unread,
Sep 2, 2009, 9:06:47 AM9/2/09
to TiddlyWiki
Hi Eric,

I see you added that prompt (initial value) feature, thanks. So,
instead of having that functionality in the prompt, you have to use
the allowblank and then click on it in order to deselect (remove) all
items. Alright.

Tobias.

Eric Shulman

unread,
Sep 2, 2009, 9:41:46 AM9/2/09
to TiddlyWiki
> I see you added that prompt (initial value) feature, thanks. So,
> instead of having that functionality in the prompt, you have to use
> the allowblank and then click on it in order to deselect (remove) all
> items. Alright.

Actually, in addition to adding support for an optional "prompt:..."
param, I've tweaked the code a bit, so that if you select the 'prompt'
item, it will de-select all other items in the list, so you no longer
need to use the allowBlank option in order to clear all your choices
in a single click. I've also corrected the handling for when you
manually deselect all items in a multi-select (by using ctrl-click or
shift-click), so it no longer throws an error.

Get the update (v1.4.0) here:
http://www.TiddlyTools.com/#ListboxPlugin

enjoy
-e

Anthony Muscio

unread,
Sep 2, 2009, 10:00:25 AM9/2/09
to tiddl...@googlegroups.com
Oohhhh La La,

As my French Girlfriend would say, if she had any idea of what we are doing here.

Thanks heaps Eric and Tobias, I am starting to have difficulty keeping ahead of all these fantastic facilities which are only multiplying what can be done with tiddlywiki.

Tagging is very powerful and allows all kinds of sophisticated list, queue, and object/relationship handling, especially with the tools like select.

I can't help but think that such power could somehow be handled within tiddlywiki's core and basic design in a way that even novice users could use.

TonyM

If you have not found an easy way to do it with TiddlyWiki, you have missed something.
www.tiddlywiki.com



Reply all
Reply to author
Forward
0 new messages