summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-07-22 14:32:33 -0500
committerAdam Young <ayoung@redhat.com>2011-07-22 16:29:53 -0400
commit7b73fa7bb030902626f2b74c328d68aa752727aa (patch)
treec645f37870b84def7a08edb44a75462d97741ef0
parent4ae7edebafbfc551ddaf036b6860781182867c47 (diff)
downloadfreeipa-7b73fa7bb030902626f2b74c328d68aa752727aa.tar.gz
freeipa-7b73fa7bb030902626f2b74c328d68aa752727aa.tar.xz
freeipa-7b73fa7bb030902626f2b74c328d68aa752727aa.zip
Fixed click handlers on certificate buttons.
The click event handlers for certificate buttons have been fixed to stop standard event processing which causes the page to change.
-rwxr-xr-xinstall/ui/certificate.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/install/ui/certificate.js b/install/ui/certificate.js
index bfecfc5b4..6d86ddb4b 100755
--- a/install/ui/certificate.js
+++ b/install/ui/certificate.js
@@ -518,7 +518,7 @@ IPA.cert.status_widget = function(spec) {
that.get_button = IPA.button({
name: 'get',
label: IPA.messages.buttons.get,
- 'click': function() {
+ click: function() {
IPA.command({
entity: that.entity_name,
method: 'show',
@@ -527,6 +527,7 @@ IPA.cert.status_widget = function(spec) {
get_certificate(data.result.result);
}
}).execute();
+ return false;
}
});
button.replaceWith(that.get_button);
@@ -535,7 +536,7 @@ IPA.cert.status_widget = function(spec) {
that.revoke_button = IPA.button({
name: 'revoke',
label: IPA.messages.buttons.revoke,
- 'click': function() {
+ click: function() {
IPA.command({
entity: that.entity_name,
method: 'show',
@@ -544,6 +545,7 @@ IPA.cert.status_widget = function(spec) {
revoke_certificate(data.result.result);
}
}).execute();
+ return false;
}
});
button.replaceWith(that.revoke_button);
@@ -552,7 +554,7 @@ IPA.cert.status_widget = function(spec) {
that.view_button = IPA.button({
name: 'view',
label: IPA.messages.buttons.view,
- 'click': function() {
+ click: function() {
IPA.command({
entity: that.entity_name,
method: 'show',
@@ -561,6 +563,7 @@ IPA.cert.status_widget = function(spec) {
view_certificate(data.result.result);
}
}).execute();
+ return false;
}
});
button.replaceWith(that.view_button);
@@ -571,7 +574,7 @@ IPA.cert.status_widget = function(spec) {
that.restore_button = IPA.button({
name: 'restore',
label: IPA.messages.buttons.restore,
- 'click': function() {
+ click: function() {
IPA.command({
entity: that.entity_name,
method: 'show',
@@ -580,6 +583,7 @@ IPA.cert.status_widget = function(spec) {
restore_certificate(data.result.result);
}
}).execute();
+ return false;
}
});
button.replaceWith(that.restore_button);
@@ -589,8 +593,9 @@ IPA.cert.status_widget = function(spec) {
that.create_button = IPA.button({
name: 'create',
label: IPA.messages.objects.cert.new_certificate,
- 'click': function() {
+ click: function() {
request_certificate(that.result);
+ return false;
}
});
button.replaceWith(that.create_button);