How to stick a checkbox together with a tag / tiddlertitle?

117 views
Skip to first unread message

Surya

unread,
Mar 15, 2018, 4:51:21 PM3/15/18
to TiddlyWiki
Hi all,
I have a search/filter tiddler, where I can search/filter tiddlers by multiple tags with checkboxes for the tags.
Almost everything is fine now, except only two things. One of it is:

The checkbox for the tags seems not to be fixed to the tag-title, to which it belongs. That means, if there isn't enough space anymore for the tag-title, the tag-title moves to the next line (if it is without space in it). But the checkbox doesn't move to the next line (on http://suryas-testwiki.tiddlyspot.com/#MultipleTagSearch%20by%20Mark it is the tag "E:Anewcharacter"). And if the tag-title has symbols or spaces in it, it is moved only partly to the next line. What can I do, that the tag-title is moved alltogether and with the checkbox to the next line?

It is made with this:

<$list filter="[tag[Character]sort[title]]" template="$:/core/ui/TagTemplate"
    selectedTiddler="$:/temp/selectedTiddler"
    unselectedText="<p>Select a topic in the table of contents. Click the arrow to expand a topic.</p>"
    missingText="<p>Missing tiddler.</p>"
template="CheckboxTemplate"
/>

Can you help me with this??
Thanks a lot! Surya

Mark S.

unread,
Mar 15, 2018, 5:10:37 PM3/15/18
to TiddlyWiki
This seemed to have fixed it, but I'm not entirely sure. Try changing the template contents to:

<$checkbox field="criteria"  checked="yes" unchecked="no">{{!!title}}&nbsp;&nbsp;&nbsp;&nbsp;</$checkbox>

HTH
-- Mark

Surya

unread,
Mar 15, 2018, 5:54:22 PM3/15/18
to TiddlyWiki
Hi Mark,

no, sorry, unfortunately it didn't fix it.

Surya

Mark S.

unread,
Mar 15, 2018, 6:48:26 PM3/15/18
to TiddlyWiki
Screenshot? Curious what you're seeing. Moving the link inside the <$check>...</$check> tags appeared to put the checkbox and the link inside a <label>...</label> tag. On mine that appeared to work, but I couldn't shrink the story river enough to be sure. 

I guess the next thing I would try is to make sure that the label is displayed inline.

-- Mark

Surya

unread,
Mar 15, 2018, 7:19:37 PM3/15/18
to TiddlyWiki
It just looks like before...

You can see it on http://suryas-testwiki.tiddlyspot.com/#MultipleTagSearch%20by%20Mark. I edited the original CheckboxTemplate to CheckboxTemplate1 and made the new CheckboxTemplate like you wrote.
Checkbox+Tags in MultipleTagSearch.jpeg

TonyM

unread,
Mar 16, 2018, 1:06:07 AM3/16/18
to TiddlyWiki
Surya,

I am getting the same problem in other places where I list multiple items, In a limited width space. 

Of Course ctrl-Mouse Roller lets you zoom out and stop this.

I played around with the example on your site, One partial solution is change your template to use the table Detail Tag in your CheckboxTemplate like this

<td><$checkbox field="criteria"  checked="yes" unchecked="no">{{!!title}}</$checkbox></td>

When there is insufficient space it responds a different way (Check Box above each Item), which is better than the current behaviour.


Regards
Tony

Surya

unread,
Mar 16, 2018, 10:01:55 AM3/16/18
to TiddlyWiki
Hi Tony,

yeah, that works :-) And I agree, that it doesn't matter so much, that the checkbox moves to the top, when there is not enough space anymore.

But now there is another problem:
For testing I made some more tags to be listed (F:Anewcharacter, G:Anewcharacter, H:Anewcharacter, I:Anewcharacter). The last two ones are moving out of the tiddler.
They want to use the whole site....

Do you have the same problem? Do you have any idea how to solve that?

Surya

Mark S.

unread,
Mar 16, 2018, 11:03:07 AM3/16/18
to TiddlyWiki
Ok, try again.

This stylesheet tiddler:

.nowrapme {white-space: nowrap;}

And this checkbox template:

 <$checkbox class="nowrapme" field="criteria"  checked="yes" unchecked="no">{{!!title}}&nbsp;&nbsp;&nbsp;&nbsp;</$checkbox><span> </span>Enter code here...

It's looking OK on mine, but I've said that before ;-)

-- Mark

Surya

unread,
Mar 16, 2018, 3:13:14 PM3/16/18
to TiddlyWiki
Hej Mark,

THAT'S IT!!

Now it works 100% correct- I tested it also on my other wiki with much much more tags and many of them have spaces in their names.
Now the checkbox is sticky to all of them and everything stays inside the tiddler :-)
(In my other wiki I had to load the wiki again, in my testwiki not).

1000 kisses :-*
Surya
Reply all
Reply to author
Forward
0 new messages