add style option to Label

This commit is contained in:
rolux 2011-11-30 15:42:54 +01:00
parent aaded38a5f
commit cba3dc23f6

View file

@ -16,17 +16,24 @@ Ox.Label = function(options, self) {
id: '',
overlap: 'none',
textAlign: 'left',
style: 'rounded',
title: '',
width: 'auto'
})
.options(options || {})
.addClass(
'OxLabel' + (self.options.disabled ? ' OxDisabled' : '') +
(self.options.overlap != 'none' ?
' OxOverlap' + Ox.toTitleCase(self.options.overlap) : '')
'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 - 14 + 'px' // fixme: why 14????
width: self.options.width - (
self.options.style == 'rounded' ? 14 : 6
) + 'px'
}, {
textAlign: self.options.textAlign
}))