Re: [Freeipa-devel] [PATCH] 0230-redirect-on-show-erro

2011-05-31 Thread Endi Sukma Dewata

On 5/31/2011 4:50 PM, Adam Young wrote:

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


ACK and pushed to master.

This patch fixes the details page, but for some entities the default 
facet is association instead of details. It can be fixed in another patch.


--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 0230-redirect-on-show-erro

2011-05-31 Thread Adam Young

https://fedorahosted.org/freeipa/ticket/1227
From e0b5c62a22a10629f06484bb2339e927f2e57e6e Mon Sep 17 00:00:00 2001
From: Adam Young 
Date: Tue, 31 May 2011 17:48:20 -0400
Subject: [PATCH] redirect on show error.

---
 install/ui/details.js |   17 ++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/install/ui/details.js b/install/ui/details.js
index fbf2ff52d45e4ffce1069f6029e7836aedfcf5c0..d9c948e978e86b78b890f34c65cac793c58ef264 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -641,9 +641,20 @@ IPA.details_facet = function(spec) {
 };
 
 command.on_error = function(xhr, text_status, error_thrown) {
-var details = $('.details', that.container).empty();
-details.append('Error: '+error_thrown.name+'');
-details.append(''+error_thrown.message+'');
+if (that.entity.redirect_facet) {
+var current_entity = that.entity;
+while (current_entity.containing_entity){
+current_entity = current_entity.containing_entity;
+}
+IPA.nav.show_page(
+current_entity.name,
+that.entity.redirect_facet);
+return;
+}else{
+var details = $('.details', that.container).empty();
+details.append('Error: '+error_thrown.name+'');
+details.append(''+error_thrown.message+'');
+}
 };
 
 command.execute();
-- 
1.7.5.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel