[tw] Re: Checkbox for removing tags?

2017-01-29 Thread Dave
I'm trying to get this working in my TW and am struggling: this: \define cycleStatus() <$button> <$action-listops $tags="+[cycle[active waiting done]]"/> Cycle Status \end <> causes the TW to need changes saved (the "save" icon turns red") but nothing happens - I was expecting the tiddler to

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Andrew Whiting
Hi Matabele, I stumbled across this thread and was wondering if there is a way to combine your cycle [] filter operator with a checkbox so that checking the box removes one tag and adds the next in the cycle? I'm new to TIddlyWiki and am not in any way a programmer so hopefully that's not a

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Andrew Whiting
The problem is that I have multiple titles in my list (I attached a pic) so I was hoping not to end up with a bunch of buttons. If I understand correctly, the state of the checkbox would reflect the presence of a "Review" (or some iteration of it) tag. By clicking it, I would remove "Review"

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Matabele
Hi Andrew Note the @ I've placed before the expression with the keep[] operator -- this is so that the '@' shows as a button if the tiddler contains none of the tags in the list. The @ can be replaced with anything -- a string of text or an icon for example. regards On Tuesday, 2 February

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Andrew Whiting
That was it haha. I should have seen that. I told you I'm very new at this. Thanks! On Tuesday, February 2, 2016 at 5:36:27 PM UTC+1, Matabele wrote: > > Hi Andrew > > Oops -- I left out a at the bottom there. > > regards > > On Tuesday, 2 February 2016 18:20:05 UTC+2, Andrew Whiting wrote: >>

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Matabele
Hi Andrew On checking the demo site -- it isn't obvious that the buttons are cycling tags from the tags field of the target tiddler (as the tiddlers are open in a substory without the tag pills displayed.) If you wish to see this, open any of the target tiddlers from the sidebar (perhaps,

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Andrew Whiting
Awesome, that was confusing me. Thanks! On Tuesday, February 2, 2016 at 4:49:33 PM UTC+1, Matabele wrote: > > Hi Andrew > > On checking the demo site -- it isn't obvious that the buttons are cycling > tags from the tags field of the target tiddler (as the tiddlers are open in > a substory

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Andrew Whiting
Hi Matabele Okay, I'll see if I can make that work. It's not displaying a button for some reason but I'm really new at this so I'll keep working on it. Thanks so much for your time and help! Andrew On Tuesday, February 2, 2016 at 5:04:03 PM UTC+1, Matabele wrote: > > Hi Andrew > > In the

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Matabele
Hi Andrew OK -- tested this in a TW now :-) Place this code in a tiddler, and place the list of tags in the list field (of the same tiddler.) <$list filter="[tag[ToReview]]"> <$link><> <$button class="tc-btn-invisible" tooltip="cycle period"> <$action-listops $tags="+[cycle{!!list}]"/> @

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Matabele
Hi Andrew The state of a checkbox (checked/unchecked) is tied to the presence/absence of an item in a list. When cycling a tag, therefore, what should the state of the checkbox reflect? Rather build a button which cycles the tag on each click -- the current state can be displayed (on the

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Matabele
Hi Andrew In the demo, each of the 'tag buttons' is cycling a different tag on a different tiddler. For your usage case, you'd need only a single 'tag button': <$list filter="[tag[ToReview]]"> <$link><> <$button class="tc-btn-invisible" tooltip="cycle period"> <$action-listops

[tw] Re: Checkbox for removing tags?

2016-02-02 Thread Matabele
Hi Andrew Oops -- I left out a at the bottom there. regards On Tuesday, 2 February 2016 18:20:05 UTC+2, Andrew Whiting wrote: > > Hi Matabele > > Okay, I'll see if I can make that work. It's not displaying a button for > some reason but I'm really new at this so I'll keep working on it. > >

[tw] Re: Checkbox for removing tags?

2016-01-15 Thread Casey Allan
Thanks :) I changed things to "active", "waiting" and "done" . All is happy on the tasklist front. Cheers, -C On Wednesday, January 13, 2016 at 4:33:18 PM UTC, Tobias Beer wrote: > Hi Casey, > > >> I can't get the correction with the button to work, though, Tobias - it >> doesn't list

[tw] Re: Checkbox for removing tags?

2016-01-15 Thread Casey Allan
Oh, this is cool. Thanks, Matabele. Cheers, -C On Thursday, January 14, 2016 at 4:59:45 AM UTC, Matabele wrote: > Hi Casey > > An alternative approach which might suit your usage case: > -- each click of the button will choose the next tag in the list from the > 'list' field of the

[tw] Re: Checkbox for removing tags?

2016-01-15 Thread Matabele
Hi Casey You might like to have a look at my new cycle[] filter operator from here . If you like this solution, copy across the modified version of the '$:/core/modules/filters/x-listops.js <#%24%3A%2Fcore%2Fmodules%2Ffilters%2Fx-listops.js>' filters to your

[tw] Re: Checkbox for removing tags?

2016-01-13 Thread Casey Allan
<$list filter="[!has[draft.of]tag[task]!tag[active]!tag[done]sort[created]]" > <$checkbox tag="active"> <$link to={{!!title}}><$view field="title"/> ! In Progress... <$list filter="[!has[draft.of]tag[task]tag[active]sort[created]]"> <$button class="tc-btn-invisible"> <$action-listops

[tw] Re: Checkbox for removing tags?

2016-01-13 Thread Matabele
Hi Casey An alternative approach which might suit your usage case: -- each click of the button will choose the next tag in the list from the 'list' field of the currentTiddler -- place the list of tags you wish to cycle through in the 'list' field <$button> <$action-listops

[tw] Re: Checkbox for removing tags?

2016-01-13 Thread Tobias Beer
Hi Casey, > I can't get the correction with the button to work, though, Tobias - it > doesn't list the tasks at all under the In Progress... header. All I get is > one lone checkbox. > I feared this might happen. ;-) It's because I was so so sneaky as to change the tag from *In Progress*

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Tobias Beer
Hi Eric, > According to those docs, you want to add invertTag="yes", which says: > > "When set to yes, flips the tag binding logic so that the absence of the > tag causes the checkbox to be checked" > I think the problem is that Casey wants to perform two actions in one checkbox, and

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Matabele
Hi Tobias The $tags= attribute accepts a subfilter, which is applied as a run to the the existing contents of the 'tags' field -- so use: <$action-listops $tags="done -[[In Progress]]"/> AS far as I remember, I included this option to render the setting/unsetting of tags as quick and easy as

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Matabele
Hi Tobias Shouldn't close the with /> regards On Tuesday, 12 January 2016 20:53:16 UTC+2, Tobias Beer wrote: > > Hi Matabele, > > Ah, I see what I did wrong before now. Find the error: > > <$button class="tc-btn-invisible"><$action-listops > $field="tags" $subfilter="+done -[[In Progress]]"/>

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Tobias Beer
Hi Matabele, Ah, I see what I did wrong before now. Find the error: <$button class="tc-btn-invisible"><$action-listops $field="tags" $subfilter="+done -[[In Progress]]"/> :-) Ok, so this should work *for you Casey*: ! Backlog <$list

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Tobias Beer
Hi Matabele, > Shouldn't close the with /> > Not quite. It was the little *+ *before the done tag which essentially removed *all *previous tags while adding the tag done. ;-) Best wishes, Tobias. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki"

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Eric Shulman
On Tuesday, January 12, 2016 at 3:17:16 AM UTC-8, Casey Allan wrote: > > I've got tags adding with no issue...but I want the "In Progress" tag to > be removed once I tick the box to complete it... I'm just not sure how to > delete a tag. > Your first stop should always be to check the

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Eric Shulman
On Tuesday, January 12, 2016 at 5:19:54 AM UTC-8, Tobias Beer wrote: > > Hi Eric, > > >> According to those docs, you want to add invertTag="yes", which says: >> >> "When set to yes, flips the tag binding logic so that the absence of the >> tag causes the checkbox to be checked" >> > > I think

[tw] Re: Checkbox for removing tags?

2016-01-12 Thread Tobias Beer
Hi Eric, > Only *one* action remove a tag when a checkbox is clicked (or set the > tag when the checkbox is cleared) > > That is *exactly* what the "invertTag" parameter accomplishes. > The way I interpreted it is that a task is to move from *In Progress* to *done*. This requires for a