fix selecting tab via .select in tab panel
This commit is contained in:
parent
d10deb81aa
commit
319608b5ac
2 changed files with 11 additions and 1 deletions
|
@ -96,6 +96,16 @@ Ox.ButtonGroup = function(options, self) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.setOption = function(key, value) {
|
||||||
|
if (key == 'value') {
|
||||||
|
// fixme: this doesn't work in cases where
|
||||||
|
// multiple buttons can be selected
|
||||||
|
var position = Ox.getIndexById(self.options.buttons, value);
|
||||||
|
if (position > -1) {
|
||||||
|
self.$buttons[position].trigger('click');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,7 +57,7 @@ Ox.TabPanel = function(options, self) {
|
||||||
|
|
||||||
that.select = function(id) {
|
that.select = function(id) {
|
||||||
if (Ox.getIndexById(self.options.tabs, id) > -1) {
|
if (Ox.getIndexById(self.options.tabs, id) > -1) {
|
||||||
self.$tabs.select(id);
|
self.$tabs.options({value: id});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue