The click event handlers for certificate buttons have been fixed
to stop standard event processing which causes the page to change.

--
Endi S. Dewata
From eb263c323a61e3d197c86585643e7dab351b1f4a Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <[email protected]>
Date: Fri, 22 Jul 2011 14:32:33 -0500
Subject: [PATCH] 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.
---
 install/ui/certificate.js |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/install/ui/certificate.js b/install/ui/certificate.js
index bfecfc5b408dd7cc9d89ea3d251defaaaafdc1b5..6d86ddb4bf985d8908a2e693088c90a75c8a78d8 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);
-- 
1.7.5.1

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to