mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-17 15:21:22 +00:00
Fix problem with parsing main UI boot tiddlers
We were parsing the boot tiddlers, making them into a widget and then refreshing the widget tree. The problem is that subsequent chances to the boot tiddlers themselves wouldn’t be picked up as part of the refresh. Now we indirectly parse those UI boot tiddlers through a transclusion, which does get refreshed in the desired way.
This commit is contained in:
@@ -80,8 +80,7 @@ Modal.prototype.display = function(title,options) {
|
||||
headerWidgetNode.refresh(changes,modalHeader,null);
|
||||
});
|
||||
// Render the body of the message
|
||||
var bodyParser = this.wiki.parseTiddler(title),
|
||||
bodyWidgetNode = this.wiki.makeWidget(bodyParser,{parentWidget: $tw.rootWidget, document: document});
|
||||
var bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});
|
||||
bodyWidgetNode.render(modalBody,null);
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
bodyWidgetNode.refresh(changes,modalBody,null);
|
||||
|
||||
@@ -37,8 +37,7 @@ Notifier.prototype.display = function(title,options) {
|
||||
// Add classes
|
||||
$tw.utils.addClass(notification,"tw-notification");
|
||||
// Render the body of the notification
|
||||
var parser = this.wiki.parseTiddler(title),
|
||||
widgetNode = this.wiki.makeWidget(parser,{parentWidget: $tw.rootWidget, document: document});
|
||||
var widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document});
|
||||
widgetNode.render(notification,null);
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
widgetNode.refresh(changes,notification,null);
|
||||
|
||||
Reference in New Issue
Block a user