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
|
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;
|
||||||
|
|
Loading…
Reference in a new issue