mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Tweaked mechanism so that macros can be nested directly inside other macros
This commit is contained in:
parent
1251a35375
commit
9247bb0186
@ -66,6 +66,7 @@ exports.refreshInDom = function(changes) {
|
||||
this.execute(this.parents,this.tiddlerTitle);
|
||||
// Render to the DOM
|
||||
this.child.renderInDom(parent,nextSibling);
|
||||
this.domNode = this.child.domNode;
|
||||
this.addEventHandlers();
|
||||
}
|
||||
} else {
|
||||
|
@ -45,7 +45,6 @@ exports.info = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
exports.executeMacro = function() {
|
||||
var templateType = "text/x-tiddlywiki",
|
||||
templateText = "<<view title link>>",
|
||||
|
@ -145,6 +145,7 @@ exports.refreshInDom = function(changes) {
|
||||
parent.removeChild(this.child.domNode);
|
||||
this.execute(this.parents,this.tiddlerTitle);
|
||||
this.child.renderInDom(parent,nextSibling);
|
||||
this.domNode = this.child.domNode;
|
||||
} else {
|
||||
this.child.refreshInDom(changes);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ exports.executeMacro = function() {
|
||||
wiki: this.wiki
|
||||
});
|
||||
link.execute(parents,this.tiddlerTitle);
|
||||
return $tw.Tree.Element("span",{},[link]);
|
||||
return link;
|
||||
}
|
||||
break;
|
||||
case "wikified":
|
||||
|
@ -177,6 +177,7 @@ Macro.prototype.render = function(type) {
|
||||
Macro.prototype.renderInDom = function(parentDomNode,insertBefore) {
|
||||
if(this.child) {
|
||||
this.child.renderInDom(parentDomNode,insertBefore);
|
||||
this.domNode = this.child.domNode;
|
||||
this.addEventHandlers();
|
||||
this.postRenderInDom();
|
||||
}
|
||||
@ -221,6 +222,7 @@ Macro.prototype.refreshInDom = function(changes) {
|
||||
parent.removeChild(this.child.domNode);
|
||||
this.execute(this.parents,this.tiddlerTitle);
|
||||
this.child.renderInDom(parent,nextSibling);
|
||||
this.domNode = this.child.domNode;
|
||||
this.addEventHandlers();
|
||||
} else {
|
||||
if(this.child) {
|
||||
|
Loading…
Reference in New Issue
Block a user