From d8abc0e9e3aea1abd472d5ab976275ba5230ba7d Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 17 May 2013 17:37:39 +0100 Subject: [PATCH] Fix up more document references --- core/modules/utils/dom/modal.js | 6 +++--- core/modules/utils/dom/notifier.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index c16057a2f..ddc2ecee8 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -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'; } 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) { diff --git a/core/modules/utils/dom/notifier.js b/core/modules/utils/dom/notifier.js index 22cecebb8..a27f3271e 100644 --- a/core/modules/utils/dom/notifier.js +++ b/core/modules/utils/dom/notifier.js @@ -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) {