forked from 0x2620/oxjs
Ox.load(), and adding moved files
This commit is contained in:
parent
dc1ec954fb
commit
6cfb6b7647
594 changed files with 1381 additions and 19555 deletions
35
source/js/Ox.UI/Form/Ox.Label.js
Normal file
35
source/js/Ox.UI/Form/Ox.Label.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||
Ox.Label = function(options, self) {
|
||||
|
||||
var self = self || {},
|
||||
that = new Ox.Element('div', self)
|
||||
.defaults({
|
||||
disabled: false,
|
||||
id: '',
|
||||
overlap: 'none',
|
||||
textAlign: 'left',
|
||||
title: '',
|
||||
width: 'auto'
|
||||
})
|
||||
.options(options)
|
||||
.addClass(
|
||||
'OxLabel' + (self.options.disabled ? ' OxDisabled' : '') +
|
||||
(self.options.overlap != 'none' ?
|
||||
' OxOverlap' + Ox.toTitleCase(self.options.overlap) : '')
|
||||
)
|
||||
.css($.extend(self.options.width == 'auto' ? {} : {
|
||||
width: (self.options.width - 14) + 'px'
|
||||
}, {
|
||||
textAlign: self.options.textAlign
|
||||
}))
|
||||
.html(self.options.title);
|
||||
|
||||
self.onChange = function(key, value) {
|
||||
if (key == 'title') {
|
||||
that.html(value);
|
||||
}
|
||||
}
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue