1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-23 23:46:52 +00:00

Fix up more document references

This commit is contained in:
Jeremy Ruston 2013-05-17 17:37:39 +01:00
parent a4f394b32a
commit d8abc0e9e3
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ Modal.prototype.display = function(title,options) {
titleText = title;
}
var headerParser = this.wiki.parseText("text/vnd.tiddlywiki-run",titleText,{parseAsInline: true}),
headerRenderTree = new $tw.WikiRenderTree(headerParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}});
headerRenderTree = new $tw.WikiRenderTree(headerParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}, document: document});
headerRenderTree.execute();
headerRenderTree.renderInDom(headerTitle);
this.wiki.addEventListener("change",function(changes) {
@ -74,7 +74,7 @@ Modal.prototype.display = function(title,options) {
});
// Render the body of the message
var bodyParser = this.wiki.parseTiddler(title),
bodyRenderTree = new $tw.WikiRenderTree(bodyParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}});
bodyRenderTree = new $tw.WikiRenderTree(bodyParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}, document: document});
bodyRenderTree.execute();
bodyRenderTree.renderInDom(modalBody);
this.wiki.addEventListener("change",function(changes) {
@ -102,7 +102,7 @@ Modal.prototype.display = function(title,options) {
footerText = '<$button message="tw-close-tiddler" class="btn btn-primary">Close</$button>';
}
var footerParser = this.wiki.parseText("text/vnd.tiddlywiki-run",footerText,{parseAsInline: true}),
footerRenderTree = new $tw.WikiRenderTree(footerParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}});
footerRenderTree = new $tw.WikiRenderTree(footerParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}, document: document});
footerRenderTree.execute();
footerRenderTree.renderInDom(modalFooterButtons);
this.wiki.addEventListener("change",function(changes) {

View File

@ -36,7 +36,7 @@ Notifier.prototype.display = function(title,options) {
$tw.utils.addClass(notification,"tw-notification");
// Render the body of the notification
var bodyParser = this.wiki.parseTiddler(title),
bodyRenderTree = new $tw.WikiRenderTree(bodyParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}});
bodyRenderTree = new $tw.WikiRenderTree(bodyParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}, document: document});
bodyRenderTree.execute();
bodyRenderTree.renderInDom(notification);
this.wiki.addEventListener("change",function(changes) {