FormElementGroup: support setting value via .value()
This commit is contained in:
parent
35b0c46eac
commit
91d3f438b7
1 changed files with 12 additions and 6 deletions
|
@ -115,12 +115,18 @@ Ox.FormElementGroup = function(options, self) {
|
|||
value <f> value
|
||||
@*/
|
||||
that.value = function() {
|
||||
var values = self.options.elements.map(function(element) {
|
||||
return element.value ? element.value() : void 0;
|
||||
});
|
||||
return self.options.joinValues
|
||||
? self.options.joinValues(values)
|
||||
: values;
|
||||
var values;
|
||||
if (arguments.length == 0) {
|
||||
values = self.options.elements.map(function(element) {
|
||||
return element.value ? element.value() : void 0;
|
||||
});
|
||||
return self.options.join
|
||||
? self.options.join(values)
|
||||
: values;
|
||||
} else {
|
||||
setValue();
|
||||
return that;
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
|
|
Loading…
Reference in a new issue