forked from 0x2620/oxjs
rename Ox.UI source files, remove Ox. prefix
This commit is contained in:
parent
005d50c389
commit
91e1065aab
101 changed files with 0 additions and 0 deletions
27
source/Ox.UI/js/Bar/Bar.js
Normal file
27
source/Ox.UI/js/Bar/Bar.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
/*@
|
||||
Ox.Bar <f:Ox.Element> Bar
|
||||
() -> <o> Bar object
|
||||
(options) -> <o> Bar object
|
||||
(options, self) -> <o> Bar object
|
||||
options <o> Options object
|
||||
orientation <s|'horizontal'>
|
||||
size <s|'medium'> can be small, medium, large or number
|
||||
self <o> Shared private variable
|
||||
@*/
|
||||
Ox.Bar = function(options, self) {
|
||||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
orientation: 'horizontal',
|
||||
size: 'medium'
|
||||
})
|
||||
.options(options || {})
|
||||
.addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation)),
|
||||
dimensions = Ox.UI.DIMENSIONS[self.options.orientation];
|
||||
self.options.size = Ox.isString(self.options.size)
|
||||
? Ox.UI.getBarSize(self.options.size) : self.options.size;
|
||||
that.css(dimensions[0], '100%')
|
||||
.css(dimensions[1], self.options.size + 'px');
|
||||
return that;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue