From e2707ae49dbb4c6c2ac0baca9ce24ff8d714d14c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 7 Jun 2012 13:10:15 +0100 Subject: [PATCH] Updated story macro to allow for contained content This allows us to fix the zooming chooser and zooming navigator --- core/modules/macros/story/story.js | 38 +++++++++++++++++------------- core/templates/PageTemplate.tid | 5 ++-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/core/modules/macros/story/story.js b/core/modules/macros/story/story.js index 492660927..55857ed0c 100644 --- a/core/modules/macros/story/story.js +++ b/core/modules/macros/story/story.js @@ -65,7 +65,7 @@ exports.eventMap["tw-navigate"] = function(event) { if(typeof(navTiddler) !== "undefined") { // If we found our tiddler, just tell the storyview to navigate to it if(this.storyview && this.storyview.navigate) { - this.storyview.navigate(this.children[0].children[navTiddler],false,event); + this.storyview.navigate(this.storyNode.children[navTiddler],false,event); } } else { // Add the tiddler to the bottom of the story (subsequently there will be a refreshInDom() call which is when we'll actually do the navigation) @@ -144,17 +144,21 @@ exports.eventMap["tw-SaveTiddler"] = function(event) { }; exports.executeMacro = function() { - var story = this.getStory(), - storyNode = $tw.Tree.Element("div",{"class": "tw-story-frame"},[]); + // Create the story frame + var story = this.getStory(); + this.contentNode = $tw.Tree.Element("div",{"class": "tw-story-content"},this.content); + this.contentNode.execute(this.parents,this.tiddlerTitle); + this.storyNode = $tw.Tree.Element("div",{"class": "tw-story-frame"},[]); + // Create each story element for(var t=0; t t) { // First delete the DOM nodes for(n=t; n story.tiddlers.length) { - for(t=story.tiddlers.length; t story.tiddlers.length) { + for(t=story.tiddlers.length; t< {{navigation-panel{ <> }}} {{zoomer-panel{ <> }}} -{{container-fluid{ -<> +>> }}}