1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-06 20:46:57 +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 in the browser, load the tiddlers built into the TiddlyWiki document
if(this.isBrowser) { if(this.isBrowser) {
// First, the JavaScript system tiddlers // First, the JavaScript system tiddlers
var moduleArea = document.getElementById("jsModules"), var moduleArea = document.getElementById("jsModules");
tiddlers = this.store.deserializeTiddlers("(DOM)",moduleArea); this.store.shadows.addTiddlers(this.store.deserializeTiddlers("(DOM)",moduleArea));
for(t=0; t<tiddlers.length; t++) {
this.store.addTiddler(new Tiddler(tiddlers[t]));
}
// Then, the ordinary tiddlers baked into the storeArea // Then, the ordinary tiddlers baked into the storeArea
var storeArea = document.getElementById("storeArea"); var storeArea = document.getElementById("storeArea");
tiddlers = this.store.deserializeTiddlers("(DOM)",storeArea); this.store.addTiddlers(this.store.deserializeTiddlers("(DOM)",storeArea));
for(t=0; t<tiddlers.length; t++) { // Finally, the shadow tiddlers
this.store.addTiddler(new Tiddler(tiddlers[t])); var shadowArea = document.getElementById("shadowArea");
} this.store.shadows.addTiddlers(this.store.deserializeTiddlers("(DOM)",shadowArea));
} }
// Bit of a hack to set up the macros // Bit of a hack to set up the macros
this.store.installMacro(require("./macros/chooser.js").macro); 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/*.jpg
tiddler: tiddlers/*.png tiddler: tiddlers/*.png
tiddler: tiddlers/*.svg tiddler: tiddlers/*.svg
tiddler: shadows/templates/*.tid shadow: shadows/templates/*.tid
#tiddler: http://wikitext.tiddlyspace.com/fractalveg.jpg #tiddler: http://wikitext.tiddlyspace.com/fractalveg.jpg
# type: image/jpeg # type: image/jpeg