1
0
Fork 0
forked from 0x2620/oxjs

some more support for squared style

This commit is contained in:
rlx 2016-01-12 11:11:08 +05:30
commit 32252a1dfd
7 changed files with 24 additions and 5 deletions

View file

@ -27,13 +27,19 @@ Ox.Label = function(options, self) {
width: function() {
that.css({
width: self.options.width - (
self.options.style == 'rounded' ? 14 : 8
Ox.contains(['rounded', 'squared'], self.options.style)
? 14 : 8
) + 'px'
});
}
})
.addClass(
'OxLabel Ox' + Ox.toTitleCase(self.options.style)
'OxLabel'
+ (
self.options.style != 'rounded'
? ' Ox' + Ox.toTitleCase(self.options.style)
: ''
)
+ (self.options.disabled ? ' OxDisabled' : '')
+ (
self.options.overlap != 'none'
@ -42,7 +48,8 @@ Ox.Label = function(options, self) {
)
.css(Ox.extend(self.options.width == 'auto' ? {} : {
width: self.options.width - (
self.options.style == 'rounded' ? 14 : 8
Ox.contains(['rounded', 'squared'], self.options.style)
? 14 : 8
) + 'px'
}, {
textAlign: self.options.textAlign