1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-12 17:11:55 +00:00

Fixed problem with setting classes on list and story macros

This commit is contained in:
Jeremy Ruston 2012-06-11 13:06:22 +01:00
parent 6448c70984
commit bf85908d5e
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ exports.executeMacro = function() {
handler = handler || handlers.all; handler = handler || handlers.all;
var tiddlers = handler(this.wiki); var tiddlers = handler(this.wiki);
if(this.classes) { if(this.classes) {
$tw.utils.pushTop(attributes["class"],this.classes); attributes["class"] = this.classes.slice(0);
} }
if(tiddlers.length === 0) { if(tiddlers.length === 0) {
return $tw.Tree.Text(this.params.emptyMessage || ""); return $tw.Tree.Text(this.params.emptyMessage || "");

View File

@ -158,9 +158,9 @@ exports.executeMacro = function() {
m.execute(this.parents,this.tiddlerTitle); m.execute(this.parents,this.tiddlerTitle);
this.storyNode.children.push($tw.Tree.Element("div",{"class": "tw-story-element"},[m])); this.storyNode.children.push($tw.Tree.Element("div",{"class": "tw-story-element"},[m]));
} }
var attributes = {"class": []}; var attributes = {};
if(this.classes) { if(this.classes) {
$tw.utils.pushTop(attributes["class"],this.classes); attributes["class"] = this.classes.slice(0);
} }
return $tw.Tree.Element("div",attributes,[this.contentNode,this.storyNode]); return $tw.Tree.Element("div",attributes,[this.contentNode,this.storyNode]);
}; };