Fixed incorrect use of jQuery.attr for setting disabled attribute

Occurance: select_widget

Update to latest version of jQuery uncovered this issue.

https://fedorahosted.org/freeipa/ticket/2817
This commit is contained in:
Petr Vobornik 2012-07-26 10:13:00 +02:00
parent 8ce157910a
commit 1a94109f4a

View File

@ -928,15 +928,13 @@ IPA.select_widget = function(spec) {
that.set_options_enabled = function(enabled, options) {
var html_value = enabled ? '' : 'disabled';
if (!options) {
$('option', that.select).attr('disabled', html_value);
$('option', that.select).prop('disabled', !enabled);
} else {
for (var i=0; i<options.length;i++) {
var value = options[i];
var option = $('option[value="'+value+'"]', that.select);
option.attr('disabled', html_value);
option.prop('disabled', !enabled);
}
}
};