forked from 0x2620/oxjs
remove unneeded Ox. prefix from path and file names
This commit is contained in:
parent
4138e4e558
commit
51696562f1
1365 changed files with 43 additions and 43 deletions
54
source/UI/js/Form/Label.js
Normal file
54
source/UI/js/Form/Label.js
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.Label <f> Label element
|
||||
options <o|u> Options object
|
||||
self <o|u> Shared private variable
|
||||
([options[, self]]) -> <o:Ox.Element> Label element
|
||||
@*/
|
||||
Ox.Label = function(options, self) {
|
||||
|
||||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
disabled: false,
|
||||
id: '',
|
||||
overlap: 'none',
|
||||
textAlign: 'left',
|
||||
style: 'rounded',
|
||||
title: '',
|
||||
width: 'auto'
|
||||
})
|
||||
.options(options || {})
|
||||
.update({
|
||||
title: function() {
|
||||
that.html(self.options.title);
|
||||
},
|
||||
width: function() {
|
||||
that.css({
|
||||
width: self.options.width - (
|
||||
self.options.style == 'rounded' ? 14 : 8
|
||||
) + 'px'
|
||||
});
|
||||
}
|
||||
})
|
||||
.addClass(
|
||||
'OxLabel Ox' + Ox.toTitleCase(self.options.style)
|
||||
+ (self.options.disabled ? ' OxDisabled' : '')
|
||||
+ (
|
||||
self.options.overlap != 'none'
|
||||
? ' OxOverlap' + Ox.toTitleCase(self.options.overlap) : ''
|
||||
)
|
||||
)
|
||||
.css(Ox.extend(self.options.width == 'auto' ? {} : {
|
||||
width: self.options.width - (
|
||||
self.options.style == 'rounded' ? 14 : 8
|
||||
) + 'px'
|
||||
}, {
|
||||
textAlign: self.options.textAlign
|
||||
}))
|
||||
.html(Ox.isUndefined(self.options.title) ? '' : self.options.title);
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue