fix a bug where clicking on a separator in an input group would call focusInput of an element without such a method

This commit is contained in:
rlx 2011-11-10 10:44:35 +00:00
parent 369c52d4d1
commit 3130de08c5
2 changed files with 9 additions and 3 deletions

View file

@ -252,9 +252,10 @@ Ox.Filter = function(options, self) {
] ]
}); });
// limit and view temporarily disabled
self.$items = self.options.list self.$items = self.options.list
? [self.$operator, self.$save, self.$limit, self.$view] ? [self.$operator, self.$save/*, self.$limit, self.$view*/]
: [self.$operator, self.$limit, self.$view]; : [self.$operator/*, self.$limit, self.$view*/];
self.numberOfAdditionalFormItems = self.$items.length; self.numberOfAdditionalFormItems = self.$items.length;

View file

@ -83,7 +83,12 @@ Ox.InputGroup = function(options, self) {
function click(event) { function click(event) {
if ($(event.target).hasClass('OxSeparator')) { if ($(event.target).hasClass('OxSeparator')) {
self.options.inputs[0].focusInput(); Ox.forEach(self.options.inputs, function($input) {
if ($input.focusInput) {
$input.focusInput();
return false;
}
});
} }
} }