1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-09 13:34:21 +00:00

Started using shadow tiddlers

Now the JavaScript modules and templates are put into the shadow store
This commit is contained in:
Jeremy Ruston 2012-03-14 18:57:53 +00:00
parent 1cf54ce08c
commit 91bba13608
3 changed files with 10 additions and 10 deletions

View File

@ -72,17 +72,14 @@ var App = function() {
// If in the browser, load the tiddlers built into the TiddlyWiki document
if(this.isBrowser) {
// First, the JavaScript system tiddlers
var moduleArea = document.getElementById("jsModules"),
tiddlers = this.store.deserializeTiddlers("(DOM)",moduleArea);
for(t=0; t<tiddlers.length; t++) {
this.store.addTiddler(new Tiddler(tiddlers[t]));
}
var moduleArea = document.getElementById("jsModules");
this.store.shadows.addTiddlers(this.store.deserializeTiddlers("(DOM)",moduleArea));
// Then, the ordinary tiddlers baked into the storeArea
var storeArea = document.getElementById("storeArea");
tiddlers = this.store.deserializeTiddlers("(DOM)",storeArea);
for(t=0; t<tiddlers.length; t++) {
this.store.addTiddler(new Tiddler(tiddlers[t]));
}
this.store.addTiddlers(this.store.deserializeTiddlers("(DOM)",storeArea));
// Finally, the shadow tiddlers
var shadowArea = document.getElementById("shadowArea");
this.store.shadows.addTiddlers(this.store.deserializeTiddlers("(DOM)",shadowArea));
}
// Bit of a hack to set up the macros
this.store.installMacro(require("./macros/chooser.js").macro);

View File

@ -0,0 +1,3 @@
title: ShadowTiddlers
<<list shadowed>>

View File

@ -6,7 +6,7 @@ tiddler: tiddlers/*.tid
tiddler: tiddlers/*.jpg
tiddler: tiddlers/*.png
tiddler: tiddlers/*.svg
tiddler: shadows/templates/*.tid
shadow: shadows/templates/*.tid
#tiddler: http://wikitext.tiddlyspace.com/fractalveg.jpg
# type: image/jpeg