2011-11-05 16:46:53 +00:00
|
|
|
'use strict';
|
2011-05-16 08:24:46 +00:00
|
|
|
/*@
|
2012-05-31 10:32:54 +00:00
|
|
|
Ox.Tabbar <f> Tabbar
|
2011-05-16 08:24:46 +00:00
|
|
|
options <o> Options object
|
|
|
|
selected <n|0> selected item
|
|
|
|
tabs <a|[]> tabs
|
|
|
|
self <o> Shared private variable
|
2012-07-04 11:29:18 +00:00
|
|
|
([options[, self]]) -> <o:Ox.Bar> Tabbar object
|
2011-05-16 08:24:46 +00:00
|
|
|
@*/
|
2011-04-22 22:03:10 +00:00
|
|
|
Ox.Tabbar = function(options, self) {
|
|
|
|
|
2011-06-19 17:48:32 +00:00
|
|
|
self = self || {};
|
|
|
|
var that = Ox.Bar({
|
2011-04-22 22:03:10 +00:00
|
|
|
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',
|
2011-06-19 17:48:32 +00:00
|
|
|
style: 'tab'
|
2011-04-22 22:03:10 +00:00
|
|
|
}).appendTo(that);
|
|
|
|
|
|
|
|
return that;
|
|
|
|
|
|
|
|
};
|