update ArrayInput

This commit is contained in:
rolux 2011-06-01 15:15:34 +02:00
parent 4f77725a74
commit b5363b38f4

View file

@ -87,7 +87,7 @@ Ox.ArrayInput = function(options, self) {
}
})
.appendTo(self.$element[i]));
self.$input.length > 1 && self.$removeButton[0].options({disabled: false});
self.$input.length > 1 && self.$removeButton[0].options({title: 'remove'});
self.$input.length == self.options.max && self.$addButton.forEach(function($button) {
$button.options({disabled: true});
});
@ -101,7 +101,7 @@ Ox.ArrayInput = function(options, self) {
self[key][i].removeElement();
self[key].splice(i, 1);
});
self.$input.length == 1 && self.$removeButton[0].options({disabled: true});
self.$input.length == 1 && self.$removeButton[0].options({title: 'close'});
self.$input.length == self.options.max - 1 && self.$addButton.forEach(function($button) {
$button.options({disabled: false});
});