2011-04-23 16:45:50 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
2011-05-16 08:24:46 +00:00
|
|
|
/*@
|
|
|
|
Ox.Tabbar <f:Ox.Bar> Tabbar
|
|
|
|
() -> <o> Tabbar object
|
|
|
|
(options) -> <o> Tabbar object
|
|
|
|
(options, self) -> <o> Tabbar object
|
|
|
|
options <o> Options object
|
|
|
|
selected <n|0> selected item
|
|
|
|
tabs <a|[]> tabs
|
|
|
|
self <o> Shared private variable
|
|
|
|
@*/
|
2011-04-22 22:03:10 +00:00
|
|
|
/**
|
|
|
|
*/
|
|
|
|
Ox.Tabbar = function(options, self) {
|
|
|
|
|
|
|
|
var self = self || {},
|
|
|
|
that = new Ox.Bar({
|
|
|
|
size: 20
|
|
|
|
}, self)
|
|
|
|
.defaults({
|
|
|
|
selected: 0,
|
|
|
|
tabs: []
|
|
|
|
})
|
|
|
|
.options(options || {})
|
|
|
|
.addClass('OxTabbar');
|
|
|
|
|
|
|
|
Ox.ButtonGroup({
|
|
|
|
buttons: self.options.tabs,
|
|
|
|
group: true,
|
|
|
|
selectable: true,
|
|
|
|
selected: self.options.selected,
|
|
|
|
size: 'medium',
|
|
|
|
style: 'tab',
|
|
|
|
}).appendTo(that);
|
|
|
|
|
|
|
|
return that;
|
|
|
|
|
|
|
|
};
|