1
0
Fork 0
forked from 0x2620/oxjs

update tab panel and button group so that selected can be set from outside

This commit is contained in:
rlx 2011-11-06 14:08:13 +00:00
commit 7e2e0cedb6
2 changed files with 19 additions and 5 deletions

View file

@ -75,5 +75,15 @@ Ox.ButtonGroup = function(options, self) {
}
}
that.select = function(id) {
// fixme: this doesn't work in cases where
// multiple buttons can be selected
var position = Ox.getPositionById(self.options.buttons, id);
if (position > -1) {
self.$buttons[position].trigger('click');
}
};
return that;
};