Hi Mans,
воскресенье, 24 февраля 2013 г., 23:42:16 UTC+4 пользователь Måns написал:
>
> H Yakov
>
> >I find it somewhat excessively narrowed in some aspects.
>
> Thanks - I appreciate you guidance very much.
>
> I made some changes following your advice.
>
> I will need some(much) more time (and practice I guess) if I should
> make references and comments to the javascript code - as I haven't got
> a clue of what I'm doing ;-)
>
> Everything in my writeup are tidbits of information, collected from
> different threads on this group - or from TiddlyWiki.com.
>
> What I also meant is linking some text about options and paramifiers in
general, but I'v searched tiddlywiki.org (where Tobias has done some
marvellous work recently, check it out) and tiddlywiki.com and found all
the articles not suitable for linking.. I'll see what I can do, probably
the [1] article should be extended so that it will be suitable for
reference in your article as well.
When I write it down like this, it's because it helps me embrace all
> needed information for being able to create links (ULs or wikilinks)
> which point to an open tab in a tiddler - and it allows me to follow a
> line of thought which leads to solutions - and more effective/
> practical use of "what's available atm..", not having to search
> through many more or less related topics on these threads each time I
> want to do this...
>
> If someone else can use it for their "own bag of tricks" - that would
> be fine.
>
> I'm very aware that what I've written is *not* a tutorial in
> javascript - however I would love so see one, which covered same
> topic, in a language that made someone like me, understand what's
> going on.
>
> Well, what can I add here..
story.displayTiddler is a function used to display tiddler (it is defined
in the story.js [2] which is used to manipulate DOM inside tiddlerDisplay
area as well as to switch themes and templates). It has many arguments
among which the first defines the place where to display the tiddler (for
instance, if you put "this" in your script, the button will open the
tiddler after the one containing the button; if you put the 'top' or the
'bottom' line there, the tiddler will be opened on the top or in the bottom
of the tiddlerDisplay area).
The second argument is the tiddler title, that's clear. The third is the
tiddler template. If you want to open a tiddler in the edit mode, you may
use
story.displayTiddler(this,title,story.chooseTemplateForTiddler(title,DEFAULT_EDIT_TEMPLATE));
which I do with some of my translusions on a mobile device. I guess, what
story.chooseTemplateForTiddler does is clear. There are many more
parameters in story.displayTiddler and also story.displayTiddlers function
in story.js.
I'm not sure why jQuery('#tiddlerDisplay').show(); is in your script, it
works without it (and is not used in the next one).
I'll explain the next one in comments
<html><a href='javascript:;' onclick='
config.options.txtTabID="TabTitle"; // set an option to use
the desirable tab
story.displayTiddler(story.findContainingTiddler(this),"TiddlerTitle");
// open the tiddler
story.refreshTiddler("TiddlerTitle",null,true); // refresh the tiddler
-- this is for the case the tiddler was opened before the link was clicked,
to change the tab I guess
'>LinkText</a></html>
I'd also recommend to add a link to [3] when you talk about transclusions
which is more important then suppressing formatting here :)
Best regards,
Yakov.
[1] http://tiddlywiki.org/#Options
[2] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Story.js
[3] http://tiddlywiki.org/#Transclusion
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.