From 4b143de951f9232d0ea9aed3f327fd202221f0b5 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 15 Jun 2012 11:38:25 +0200 Subject: [PATCH] Ox.Checkbox: change default width from 'auto' to 16 if there is neither a label nor a title --- source/Ox.UI/js/Form/Checkbox.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Form/Checkbox.js b/source/Ox.UI/js/Form/Checkbox.js index a4dd17ba..5277095f 100644 --- a/source/Ox.UI/js/Form/Checkbox.js +++ b/source/Ox.UI/js/Form/Checkbox.js @@ -6,7 +6,6 @@ Ox.Checkbox Checkbox Element options Options object disabled if true, checkbox is disabled group if true, checkbox is part of a group - id element id label Label (on the left side) labelWidth Label width title 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({