forked from 0x2620/oxjs
simpler fix for changes in jquery attr()
This commit is contained in:
parent
cd9a26dab5
commit
f2490fe771
3 changed files with 13 additions and 27 deletions
|
|
@ -205,11 +205,10 @@ Ox.Input = function(options, self) {
|
|||
|
||||
self.$input = $(self.options.type == 'textarea' ? '<textarea>' : '<input>')
|
||||
.addClass('OxInput OxMedium Ox' + Ox.toTitleCase(self.options.style))
|
||||
.attr(Ox.extend({
|
||||
.attr({
|
||||
disabled: self.options.disabled,
|
||||
type: self.options.type == 'password' ? 'password' : 'text'
|
||||
}, self.options.disabled ? {
|
||||
disabled: 'disabled'
|
||||
} : {}))
|
||||
})
|
||||
.css(Ox.extend({
|
||||
width: self.inputWidth + 'px',
|
||||
textAlign: self.options.textAlign
|
||||
|
|
@ -794,11 +793,7 @@ Ox.Input = function(options, self) {
|
|||
}
|
||||
self.bindKeyboard = self.options.autocomplete || self.options.autovalidate;
|
||||
} else if (key == 'disabled') {
|
||||
if (value) {
|
||||
self.$input.attr({disabled: 'disabled'});
|
||||
} else {
|
||||
self.$input.removeAttr('disabled');
|
||||
}
|
||||
self.$input.attr({disabled: value});
|
||||
} else if (key == 'height') {
|
||||
that.css({
|
||||
height: value + 'px'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue