FormElementGroup: support setting value via .value()

This commit is contained in:
rolux 2015-02-14 19:51:55 +00:00
parent 35b0c46eac
commit 91d3f438b7

View file

@ -115,12 +115,18 @@ Ox.FormElementGroup = function(options, self) {
value <f> value value <f> value
@*/ @*/
that.value = function() { that.value = function() {
var values = self.options.elements.map(function(element) { var values;
return element.value ? element.value() : void 0; if (arguments.length == 0) {
}); values = self.options.elements.map(function(element) {
return self.options.joinValues return element.value ? element.value() : void 0;
? self.options.joinValues(values) });
: values; return self.options.join
? self.options.join(values)
: values;
} else {
setValue();
return that;
}
}; };
return that; return that;