mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-29 15:30:47 +00:00
Fix rootwidget handling
This commit is contained in:
parent
7c1cb97f7f
commit
449edf99b5
@ -15,7 +15,7 @@ Password handling
|
|||||||
// Export name and synchronous status
|
// Export name and synchronous status
|
||||||
exports.name = "password";
|
exports.name = "password";
|
||||||
exports.platforms = ["browser"];
|
exports.platforms = ["browser"];
|
||||||
exports.after = ["rootwidget"];
|
exports.after = ["startup"];
|
||||||
exports.synchronous = true;
|
exports.synchronous = true;
|
||||||
|
|
||||||
exports.startup = function() {
|
exports.startup = function() {
|
||||||
|
@ -15,12 +15,10 @@ Setup the root widget and the core root widget handlers
|
|||||||
// Export name and synchronous status
|
// Export name and synchronous status
|
||||||
exports.name = "rootwidget";
|
exports.name = "rootwidget";
|
||||||
exports.platforms = ["browser"];
|
exports.platforms = ["browser"];
|
||||||
exports.after = ["load-modules"];
|
exports.after = ["startup"];
|
||||||
exports.before = ["story"];
|
exports.before = ["story"];
|
||||||
exports.synchronous = true;
|
exports.synchronous = true;
|
||||||
|
|
||||||
var widget = require("$:/core/modules/widgets/widget.js");
|
|
||||||
|
|
||||||
exports.startup = function() {
|
exports.startup = function() {
|
||||||
// Install the modal message mechanism
|
// Install the modal message mechanism
|
||||||
$tw.modal = new $tw.utils.Modal($tw.wiki);
|
$tw.modal = new $tw.utils.Modal($tw.wiki);
|
||||||
|
@ -20,6 +20,8 @@ exports.synchronous = true;
|
|||||||
// Set to `true` to enable performance instrumentation
|
// Set to `true` to enable performance instrumentation
|
||||||
var PERFORMANCE_INSTRUMENTATION = false;
|
var PERFORMANCE_INSTRUMENTATION = false;
|
||||||
|
|
||||||
|
var widget = require("$:/core/modules/widgets/widget.js");
|
||||||
|
|
||||||
exports.startup = function() {
|
exports.startup = function() {
|
||||||
var modules,n,m,f;
|
var modules,n,m,f;
|
||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
@ -51,6 +53,7 @@ exports.startup = function() {
|
|||||||
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
|
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
|
||||||
$tw.wiki.clearTiddlerEventQueue();
|
$tw.wiki.clearTiddlerEventQueue();
|
||||||
// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers
|
// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers
|
||||||
|
if($tw.browser) {
|
||||||
$tw.rootWidget = new widget.widget({
|
$tw.rootWidget = new widget.widget({
|
||||||
type: "widget",
|
type: "widget",
|
||||||
children: []
|
children: []
|
||||||
@ -58,6 +61,7 @@ exports.startup = function() {
|
|||||||
wiki: $tw.wiki,
|
wiki: $tw.wiki,
|
||||||
document: document
|
document: document
|
||||||
});
|
});
|
||||||
|
}
|
||||||
// Set up the syncer object
|
// Set up the syncer object
|
||||||
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});
|
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});
|
||||||
// Host-specific startup
|
// Host-specific startup
|
||||||
|
Loading…
Reference in New Issue
Block a user