diff --git a/source/Ox.UI/js/Form/Ox.Button.js b/source/Ox.UI/js/Form/Ox.Button.js index 0c4ac14f..f4ab6ffb 100644 --- a/source/Ox.UI/js/Form/Ox.Button.js +++ b/source/Ox.UI/js/Form/Ox.Button.js @@ -43,10 +43,11 @@ Ox.Button = function(options, self) { width: 'auto' }) .options(options || {}) - .attr({ - disabled: self.options.disabled ? 'disabled' : '', + .attr(Ox.extend({ type: self.options.type == 'text' ? 'button' : 'image' - }) + }, self.options.disabled ? { + disabled: 'disabled' + } : {}) .addClass('OxButton Ox' + Ox.toTitleCase(self.options.size) + (self.options.disabled ? ' OxDisabled': '') + (self.options.selected ? ' OxSelected': '') + @@ -131,10 +132,12 @@ Ox.Button = function(options, self) { self.setOption = function(key, value) { if (key == 'disabled') { - that.attr({ - disabled: value ? 'disabled' : '' - }) - .toggleClass('OxDisabled'); + if (value) { + that.attr({disabled: 'disabled'}) + } else { + that.removeAttr('disabled'); + } + that.toggleClass('OxDisabled'); } else if (key == 'selected') { if (value != that.hasClass('OxSelected')) { // fixme: neccessary? that.toggleClass('OxSelected'); diff --git a/source/Ox.UI/js/Form/Ox.Checkbox.js b/source/Ox.UI/js/Form/Ox.Checkbox.js index ddee5cee..92a48e55 100644 --- a/source/Ox.UI/js/Form/Ox.Checkbox.js +++ b/source/Ox.UI/js/Form/Ox.Checkbox.js @@ -101,6 +101,12 @@ Ox.Checkbox = function(options, self) { self.setOption = function(key, value) { if (key == 'checked') { that.toggleChecked(); + } else if (key == 'disabled') { + if (value) { + that.attr({disabled: 'disabled'}) + } else { + that.removeAttr('disabled'); + } } else if (key == 'title') { self.$title.options({title: value}); } diff --git a/source/Ox.UI/js/Form/Ox.Input.js b/source/Ox.UI/js/Form/Ox.Input.js index 002737c5..48e955d5 100644 --- a/source/Ox.UI/js/Form/Ox.Input.js +++ b/source/Ox.UI/js/Form/Ox.Input.js @@ -205,10 +205,11 @@ Ox.Input = function(options, self) { self.$input = $(self.options.type == 'textarea' ? '