Fixed: JavaScript type error in entitlement page

https://fedorahosted.org/freeipa/ticket/1767

Opening IPA Server/Entitlements causes: "Uncaught TypeError: Cannot call method 'addClass' of undefined" error - Details.js:489

Introduced by patch for #1697

Cause: Details facet of entitlements doesn't contain Reset and Update buttons
This commit is contained in:
Petr Vobornik 2011-09-07 18:19:01 +02:00 committed by Endi S. Dewata
parent 1785d0a7c1
commit d02e72d3e8

View File

@ -482,12 +482,20 @@ IPA.details_facet = function(spec) {
};
that.enable_update = function(value) {
if(value) {
that.reset_button.removeClass('action-button-disabled');
that.update_button.removeClass('action-button-disabled');
} else {
that.reset_button.addClass('action-button-disabled');
that.update_button.addClass('action-button-disabled');
if(that.reset_button) {
if(value) {
that.reset_button.removeClass('action-button-disabled');
} else {
that.reset_button.addClass('action-button-disabled');
}
}
if(that.update_button) {
if(value) {
that.update_button.removeClass('action-button-disabled');
} else {
that.update_button.addClass('action-button-disabled');
}
}
};