Fixed problem with setting classes on list and story macros

print-window-tiddler
Jeremy Ruston 2012-06-11 13:06:22 +01:00
rodzic 6448c70984
commit bf85908d5e
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

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

Wyświetl plik

@ -158,9 +158,9 @@ exports.executeMacro = function() {
m.execute(this.parents,this.tiddlerTitle);
this.storyNode.children.push($tw.Tree.Element("div",{"class": "tw-story-element"},[m]));
}
var attributes = {"class": []};
var attributes = {};
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]);
};