Sort of solved the issue for now. There is now one cookie per tiddler
that has the tab (the name is built from a fixed prefix, and the
suffix is the title of the tiddler). This means that I can get the
open tab for the tiddler which had its button clicked. It does not
look very nice, but it works.
config.macros.doSomething.handler = function
(place,macroName,params,wikifier,paramString,tiddler)
{
var par=
{
tiddler_title: tiddler.title
}
createTiddlyButton(place, this.label, this.prompt,
function ()
{
[...]
var _sug =
document.getElementById("buttonMagic").attributes;
var tiddler_title =
_sug.getNamedItem("tiddler_title").value;
var open_tab="";
for(i in config.options)
{
if(i.match(tiddler_title+"$")==tiddler_title)
{
open_tab=config.options[i];
}
}
var
query=store.getTiddlerText(tabNameFromTabLabel(tiddler_title,
open_tab));
[...]
}, "button", "buttonMagic", null, par);
}
// return the actual tiddler NAME not the LABEL on the tab
function tabNameFromTabLabel(title, label)
{
if(label == "My Label")
{
return title+"_mylabel";
}
[...]
}
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.