1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-14 22:37:13 +00:00

Add size attribute to select widget for multiple selection mode

This commit is contained in:
Jermolene
2016-01-05 18:48:21 +00:00
parent 93f7d8c028
commit 0cbe97615a
2 changed files with 9 additions and 2 deletions

View File

@@ -138,6 +138,7 @@ SelectWidget.prototype.execute = function() {
this.selectClass = this.getAttribute("class");
this.selectDefault = this.getAttribute("default");
this.selectMultiple = this.getAttribute("multiple", false);
this.selectSize = this.getAttribute("size");
// Make the child widgets
var selectNode = {
type: "element",
@@ -150,6 +151,9 @@ SelectWidget.prototype.execute = function() {
if(this.selectMultiple) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"multiple","multiple");
}
if(this.selectSize) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize);
}
this.makeChildWidgets([selectNode]);
};