1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Added classes on the story macros wrapper elements

This commit is contained in:
Jeremy Ruston 2012-06-04 12:11:18 +01:00
parent b5f5a742f4
commit 75f8abcf35

View File

@ -145,14 +145,14 @@ exports.eventMap["tw-SaveTiddler"] = function(event) {
exports.executeMacro = function() { exports.executeMacro = function() {
var story = this.getStory(), var story = this.getStory(),
storyNode = $tw.Tree.Element("div",{},[]); storyNode = $tw.Tree.Element("div",{"class": "tw-story-frame"},[]);
for(var t=0; t<story.tiddlers.length; t++) { for(var t=0; t<story.tiddlers.length; t++) {
var m = $tw.Tree.Macro("tiddler",{ var m = $tw.Tree.Macro("tiddler",{
srcParams: {target: story.tiddlers[t].title,template: story.tiddlers[t].template}, srcParams: {target: story.tiddlers[t].title,template: story.tiddlers[t].template},
wiki: this.wiki wiki: this.wiki
}); });
m.execute(this.parents,this.tiddlerTitle); m.execute(this.parents,this.tiddlerTitle);
storyNode.children.push($tw.Tree.Element("div",{},[m])); storyNode.children.push($tw.Tree.Element("div",{"class": "tw-story-element"},[m]));
} }
return [storyNode]; return [storyNode];
}; };
@ -197,7 +197,7 @@ exports.refreshInDom = function(changes) {
var tiddlerNode = findTiddler(t,story.tiddlers[t].title,story.tiddlers[t].template); var tiddlerNode = findTiddler(t,story.tiddlers[t].title,story.tiddlers[t].template);
if(tiddlerNode === null) { if(tiddlerNode === null) {
// If not, render the tiddler // If not, render the tiddler
var m = $tw.Tree.Element("div",{},[ var m = $tw.Tree.Element("div",{"class": "tw-story-element"},[
$tw.Tree.Macro("tiddler",{ $tw.Tree.Macro("tiddler",{
srcParams: {target: story.tiddlers[t].title,template: story.tiddlers[t].template}, srcParams: {target: story.tiddlers[t].title,template: story.tiddlers[t].template},
wiki: this.wiki wiki: this.wiki