Ox.Checkbox: change default width from 'auto' to 16 if there is neither a label nor a title

This commit is contained in:
rolux 2012-06-15 11:38:25 +02:00
parent 7284ae4ddf
commit 4b143de951

View file

@ -6,7 +6,6 @@ Ox.Checkbox <f> Checkbox Element
options <o> Options object
disabled <b> if true, checkbox is disabled
group <b> if true, checkbox is part of a group
id <s> element id
label <s> Label (on the left side)
labelWidth <n|64> Label width
title <s> Title (on the right side)
@ -23,13 +22,12 @@ Ox.Checkbox = function(options, self) {
.defaults({
disabled: false,
group: false,
id: '',
label: '',
labelWidth: 64,
overlap: 'none',
title: '',
value: false,
width: 'auto'
width: options && (options.label || options.title) ? 'auto' : 16
})
.options(options || {})
.update({