summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2011-09-07 18:19:01 +0200
committerEndi S. Dewata <edewata@redhat.com>2011-09-07 19:23:30 +0000
commit1b397de2d205921648afa925da098a59fc7e8e94 (patch)
tree1da9a98afb3cdce993e08c02272e3bbf1ed9b71a
parent236dcfa236a703592e6a17b9fac5b9d9e15d242b (diff)
downloadfreeipa-1b397de2d205921648afa925da098a59fc7e8e94.zip
freeipa-1b397de2d205921648afa925da098a59fc7e8e94.tar.gz
freeipa-1b397de2d205921648afa925da098a59fc7e8e94.tar.xz
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
-rw-r--r--install/ui/details.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/install/ui/details.js b/install/ui/details.js
index 4f7e4a2..dbdca5a 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -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');
+ }
}
};