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: '',
|
id: '',
|
||||||
overlap: 'none',
|
overlap: 'none',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
|
style: 'rounded',
|
||||||
title: '',
|
title: '',
|
||||||
width: 'auto'
|
width: 'auto'
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass(
|
.addClass(
|
||||||
'OxLabel' + (self.options.disabled ? ' OxDisabled' : '') +
|
'OxLabel Ox' + Ox.toTitleCase(self.options.style)
|
||||||
(self.options.overlap != 'none' ?
|
+ (self.options.disabled ? ' OxDisabled' : '')
|
||||||
' OxOverlap' + Ox.toTitleCase(self.options.overlap) : '')
|
+ (
|
||||||
|
self.options.overlap != 'none'
|
||||||
|
?
|
||||||
|
' OxOverlap' + Ox.toTitleCase(self.options.overlap) : ''
|
||||||
|
)
|
||||||
)
|
)
|
||||||
.css(Ox.extend(self.options.width == 'auto' ? {} : {
|
.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
|
textAlign: self.options.textAlign
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue