mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-29 11:30:28 +00:00
Fixed timeline macro to exclude tiddlers that lack the target field
This commit is contained in:
parent
f0e9c4e7ff
commit
4217ee3ccc
@ -190,14 +190,18 @@ WikiTextRenderer.macros = {
|
|||||||
var tiddler = tiddlers[t],
|
var tiddler = tiddlers[t],
|
||||||
theGroupParseTree = this.parser.processor.textProcessors.parse(groupTemplateType,groupTemplateText),
|
theGroupParseTree = this.parser.processor.textProcessors.parse(groupTemplateType,groupTemplateText),
|
||||||
theGroup = theGroupParseTree.render("text/plain",theGroupParseTree.children,this.store,tiddler);
|
theGroup = theGroupParseTree.render("text/plain",theGroupParseTree.children,this.store,tiddler);
|
||||||
|
if(theGroup !== "") {
|
||||||
if(ul === undefined || theGroup != lastGroup) {
|
if(ul === undefined || theGroup != lastGroup) {
|
||||||
ul = {type: "ul", attributes: {"class": "timeline"}, children: []};
|
ul = {type: "ul", attributes: {"class": "timeline"}, children: []};
|
||||||
macroNode.output.push(ul);
|
macroNode.output.push(ul);
|
||||||
ul.children.push({type: "li", attributes: {"class": "listTitle"}, children: [{type: "text", value: theGroup}]});
|
ul.children.push({type: "li", attributes: {"class": "listTitle"}, children: [{type: "text", value: theGroup}]});
|
||||||
lastGroup = theGroup;
|
lastGroup = theGroup;
|
||||||
}
|
}
|
||||||
var item = {type: "li", attributes: {"class": "listLink"}, children: [ {
|
var item = {
|
||||||
|
type: "li",
|
||||||
|
attributes: {
|
||||||
|
"class": "listLink"},
|
||||||
|
children: [ {
|
||||||
type: "context",
|
type: "context",
|
||||||
tiddler: tiddler,
|
tiddler: tiddler,
|
||||||
children: []
|
children: []
|
||||||
@ -208,6 +212,7 @@ WikiTextRenderer.macros = {
|
|||||||
item.children[0].children.push(itemParseTree.children[c]);
|
item.children[0].children.push(itemParseTree.children[c]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.executeMacros(macroNode.output,title);
|
this.executeMacros(macroNode.output,title);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
title: ThisIsAlpha
|
title: ThisIsAlpha
|
||||||
modifier: JeremyRuston
|
modifier: JeremyRuston
|
||||||
|
modified: 20110228143927
|
||||||
|
|
||||||
TiddlyWiki5 is currently at //alpha status//, which means that it is still evolving, and not yet ready to be relied upon. But it also means that you can influence its development - join the [[Community]] and find out how you can help.
|
TiddlyWiki5 is currently at //alpha status//, which means that it is still evolving, and not yet ready to be relied upon. But it also means that you can influence its development - join the [[Community]] and find out how you can help.
|
||||||
|
Loading…
Reference in New Issue
Block a user