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.Bar <f> Bar
|
2011-05-16 08:24:46 +00:00
|
|
|
options <o> Options object
|
2012-06-21 21:15:54 +00:00
|
|
|
orientation <s|'horizontal'> Orientation ('horizontal' or 'vertical')
|
|
|
|
size <n|s|'medium'> can be 'small', 'medium', 'large' or number
|
2011-05-16 08:24:46 +00:00
|
|
|
self <o> Shared private variable
|
2012-07-04 11:29:18 +00:00
|
|
|
([options[, self]]) -> <o:Ox.Element> Bar object
|
2011-05-16 08:24:46 +00:00
|
|
|
@*/
|
2011-04-22 22:03:10 +00:00
|
|
|
Ox.Bar = function(options, self) {
|
2014-09-25 10:05:22 +00:00
|
|
|
|
2011-06-19 17:48:32 +00:00
|
|
|
self = self || {};
|
|
|
|
var that = Ox.Element({}, self)
|
2011-04-22 22:03:10 +00:00
|
|
|
.defaults({
|
|
|
|
orientation: 'horizontal',
|
2014-09-25 10:05:22 +00:00
|
|
|
size: 16
|
2011-04-22 22:03:10 +00:00
|
|
|
})
|
|
|
|
.options(options || {})
|
2014-09-25 10:05:22 +00:00
|
|
|
.addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation));
|
|
|
|
|
|
|
|
self.dimensions = Ox.UI.DIMENSIONS[self.options.orientation];
|
|
|
|
|
|
|
|
that.css(self.dimensions[0], '100%')
|
|
|
|
.css(self.dimensions[1], self.options.size + 'px');
|
|
|
|
|
2011-04-22 22:03:10 +00:00
|
|
|
return that;
|
2014-09-25 10:05:22 +00:00
|
|
|
|
2011-04-22 22:03:10 +00:00
|
|
|
};
|