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 committed 2012-08-02 10:27:17 +02:00
1 parent 8ce157910a
commit 1a94109f4a
1 file changed
+2 -4
+2 -4
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);
}
}
};