Hi Jeremy, Thanks a lot for looking at my "toggle width" buttons.
On Monday, December 23, 2013 1:38:40 PM UTC+1, Jeremy Ruston wrote: > > Hi Ton > > Spreading out $:/Toggle-fluid-width-button, you've got this: > > <span title="Toggle fluid width"> > <$fieldmangler> > <$list filter="[is[current]tag[$:/tags/stylesheet]]"> > <$button message="tw-remove-tag" param="$:/tags/stylesheet" > class="btn-invisible">{{$:/images/non-fluid-width-button}}</$button> > </$list> > <$list filter="[is[current]!tag[$:/tags/stylesheet]]"> > <$button message="tw-add-tag" param="$:/tags/stylesheet" > class="btn-invisible">{{$:/images/fluid-width-button}}</$button> > </$list> > </$fieldmangler> > > So, the first thing is that you're missing the closing </span> > Yes, stupid. I totally overlooked it. > > Secondly, the fieldmangler widget is set to use the current tiddler. When > you're viewing $:/Toggle-fluid-width-button normally, that will be the > current tiddler will be. When you're viewing it in the sidebar, the current > tiddler will be the sidebar. > I never thought about that and even now I think about it I do not fully understand it. Why is the sidebar the current tiddler? This morning, as a temporary workaround I placed both buttons in the top menu $:/TopSideBar and there they work [1] (still with the incorrect code and without a closing </span>) The only difference between both places is (correct me if I am wrong): 1) PageControl: The buttons are added via tagging alone and the "current tiddler" changes from button to sidebar? I added them to $:/core/ui/PageControls. Is $:/core/ui/PageControls not the "current tiddler? 2) PageTemplate: The top menu $:/TopSideBar is added by tagging and the buttons are transcluded into $:/TopSideBar". What is in this case the "current tiddler"? The buttons with the "wrong" code work. Sorry for my questions but I try to understand it. Cheers, Ton [1] http://tw5toolbar.tiddlyspot.com/ > > The solution is to specify the target tiddler in the fieldmangler widget, > and specify the tiddler directly in the list filters: > > <span title="Toggle fluid width"> > <$fieldmangler tiddler="$:/Toggle-fluid-width-button"> > <$list filter="[[$:/Toggle-fluid-width-button]tag[$:/tags/stylesheet]]"> > <$button message="tw-remove-tag" param="$:/tags/stylesheet" > class="btn-invisible">{{$:/images/non-fluid-width-button}}</$button> > </$list> > <$list filter="[[$:/Toggle-fluid-width-button]!tag[$:/tags/stylesheet]]"> > <$button message="tw-add-tag" param="$:/tags/stylesheet" > class="btn-invisible">{{$:/images/fluid-width-button}}</$button> > </$list> > </$fieldmangler> > </span> > > Best wishes > > Jeremy. > > > > > On Sun, Dec 22, 2013 at 6:41 PM, Ton Gerner <ton.g...@gmail.com<javascript:> > > wrote: > >> Hi Jeremy, >> >> A new version with bug fixes and improvements. I will have a better look >> at the release notes. >> Easier instructions for node.js. I will check to see if it is as simple >> as you wrote ;) >> And you added a favicon, but I get the impression it is hardcoded? Is >> there a possibility to add your own favicon to distinguish all TW5s? >> >> Trying to update my Toolbar/top menu guide to TW5.0.4-beta I came across >> a strange effect with 2 of my toolbar buttons. >> In TW5.0.3-beta the $:/Toggle-fluid-width-button and >> $:/Toggle-tiddler-width-button did work "alone" but not when added to the >> PageControl buttons (tagged with $:/tags/PageControls). >> Clicking the button(s) (to the right of the Save button) executed the >> code once and thereafter a Javascript error popped up. [1] >> I hoped this was fixed in TW5.0.4-beta. >> But, in TW5.0.4-beta the $:/Toggle-fluid-width-button and >> $:/Toggle-tiddler-width-button do work "alone" correct, but don't work >> tagged with $:/tags/PageControls. When clicked, the Sidebar disappears >> while the tiddler width does not change (all without Javascript errors). >> >> I made a special version of my guide with $:/Toggle-fluid-width-button >> and $:/Toggle-tiddler-width-button added to $:/DefaultTiddlers and uploaded >> it to my "playground" [2] >> So you can see the described effect in action. >> >> Cheers, >> >> Ton >> >> [1] https://groups.google.com/d/msg/tiddlywiki/9Gs6MtZ5RBs/c6Hvu-oEdiQJ >> >> [2] http://tongerner.tiddlyspot.com/ >> >> >> >> On Sunday, December 22, 2013 5:19:22 PM UTC+1, Jeremy Ruston wrote: >> >>> TiddlyWiki 5.0.4-beta has just been released: >>> >>> http://tiddlywiki.com/ >>> >>> Changes this time around include much more thorough (and accurate) >>> instructions for getting up and running under Node.js. If you haven't tried >>> it for a while, I'd highly recommend it. It's as simple as: >>> >>> mkdir mywiki >>> cd mywiki >>> npm install tiddlywiki >>> tiddlywiki --server >>> >>> Then just visit http://0.0.0.0:8080 in your browser and start adding >>> tiddlers. >>> >>> I've also reworked the stylesheet mechanism. One benefit is that now >>> theme tweaks are applied instantly. The best demo is in Chrome: visit the >>> control panel "Theme Tweaks" tab, click on a colour swatch and you can >>> select colours from a chooser which are dynamically reflected in the page. >>> >>> I've added a favicon, more for my own benefit as I juggle copies of >>> tiddlywiki in the browser; there's a blue one for static builds and a pink >>> one for client-server builds. >>> >>> Regular contributors StephanHradek and DavidJade have made several >>> contributions to this release. >>> >>> There are many more minor changes, consult the release history on >>> tiddlywiki.com for more details (clicking on the version ribbon at the >>> top right takes you straight to the release notes). >>> >>> Let me know if you have any questions, >>> >>> Best wishes >>> >>> Jeremy. >>> >>> -- >>> Jeremy Ruston >>> mailto:jeremy...@gmail.com >>> >> > > > -- > Jeremy Ruston > mailto:jeremy...@gmail.com <javascript:> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.