add style option to Label
This commit is contained in:
parent
aaded38a5f
commit
cba3dc23f6
1 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
}))
|
||||
|
|
Loading…
Reference in a new issue