mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-07-06 20:12:49 +00:00
Allow class to be specified for list widget frame element
This commit is contained in:
parent
a20eb4867e
commit
92fee547a9
@ -41,6 +41,12 @@ ListWidget.prototype.generate = function() {
|
|||||||
this.template = this.renderer.getAttribute("template");
|
this.template = this.renderer.getAttribute("template");
|
||||||
this.editTemplate = this.renderer.getAttribute("editTemplate");
|
this.editTemplate = this.renderer.getAttribute("editTemplate");
|
||||||
this.emptyMessage = this.renderer.getAttribute("emptyMessage");
|
this.emptyMessage = this.renderer.getAttribute("emptyMessage");
|
||||||
|
this["class"] = this.renderer.getAttribute("class");
|
||||||
|
// Set up the classes
|
||||||
|
var classes = ["tw-list-frame"];
|
||||||
|
if(this["class"]) {
|
||||||
|
$tw.utils.pushTop(classes,this["class"]);
|
||||||
|
}
|
||||||
// Get the list of tiddlers object
|
// Get the list of tiddlers object
|
||||||
this.getTiddlerList();
|
this.getTiddlerList();
|
||||||
// Create the list
|
// Create the list
|
||||||
@ -57,7 +63,7 @@ ListWidget.prototype.generate = function() {
|
|||||||
// Create the list frame element
|
// Create the list frame element
|
||||||
this.tag = this.renderer.parseTreeNode.isBlock ? "div" : "span";
|
this.tag = this.renderer.parseTreeNode.isBlock ? "div" : "span";
|
||||||
this.attributes = {
|
this.attributes = {
|
||||||
"class": "tw-list-frame"
|
"class": classes.join(" ")
|
||||||
};
|
};
|
||||||
this.children = this.renderer.renderTree.createRenderers(this.renderer,listMembers);
|
this.children = this.renderer.renderTree.createRenderers(this.renderer,listMembers);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user