[Freeipa-devel] [PATCH] 0236-no-redirect-on-search
From 9a49b4f23609e6a57775c0107de47b44b99a674f Mon Sep 17 00:00:00 2001 From: Adam Young ayo...@redhat.com Date: Wed, 15 Jun 2011 11:18:25 -0400 Subject: [PATCH] no redirect on search https://fedorahosted.org/freeipa/ticket/1281 --- install/ui/entity.js |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/install/ui/entity.js b/install/ui/entity.js index de57df544995df8a1f8721dfc6c9ff4698ec4f19..58e1d150d81aac28f561844681632f19629a3cbc 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -1,3 +1,4 @@ + /*jsl:import ipa.js */ /*jsl:import navigation.js */ @@ -131,11 +132,14 @@ IPA.facet = function (spec) { }; that.on_error = function(xhr, text_status, error_thrown) { -if (that.entity.redirect_facet) { +if (that.entity.redirect_facet +(IPA.current_facet(that.entity) !== 'search')) +{ 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); -- 1.7.5.2 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 0236-no-redirect-on-search
On 06/15/2011 11:24 AM, Adam Young wrote: ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel Removed extra whitespace From f53183f649aebe4f85a904639c21236a80c1eb32 Mon Sep 17 00:00:00 2001 From: Adam Young ayo...@redhat.com Date: Wed, 15 Jun 2011 11:18:25 -0400 Subject: [PATCH] no redirect on search https://fedorahosted.org/freeipa/ticket/1281 --- install/ui/entity.js |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/install/ui/entity.js b/install/ui/entity.js index de57df544995df8a1f8721dfc6c9ff4698ec4f19..24f2020619ee3249acc1c524175d7b7bd6f6793a 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -131,7 +131,9 @@ IPA.facet = function (spec) { }; that.on_error = function(xhr, text_status, error_thrown) { -if (that.entity.redirect_facet) { +if (that.entity.redirect_facet +(IPA.current_facet(that.entity) !== 'search')) +{ var current_entity = that.entity; while (current_entity.containing_entity){ current_entity = current_entity.containing_entity; -- 1.7.5.2 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 0236-no-redirect-on-search
On 06/15/2011 11:28 AM, Adam Young wrote: On 06/15/2011 11:24 AM, Adam Young wrote: ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel Removed extra whitespace ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel Facet can override what to do on error From a779c30aeafe839bbfe3982151ffadd2ea03f336 Mon Sep 17 00:00:00 2001 From: Adam Young ayo...@redhat.com Date: Wed, 15 Jun 2011 11:18:25 -0400 Subject: [PATCH] no redirect on search https://fedorahosted.org/freeipa/ticket/1281 --- install/ui/entity.js | 13 + install/ui/search.js |4 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/install/ui/entity.js b/install/ui/entity.js index de57df544995df8a1f8721dfc6c9ff4698ec4f19..3b16c6518253d24ae450d46937aecb5ab245d16f 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -130,8 +130,15 @@ IPA.facet = function (spec) { return $('.content', that.container); }; +that.report_error = function(error_thrown){ +var details = $('.details', that.container).empty(); +details.append('pError: '+error_thrown.name+'/p'); +details.append('p'+error_thrown.message+'/p'); +} + that.on_error = function(xhr, text_status, error_thrown) { -if (that.entity.redirect_facet) { +if (that.entity.redirect_facet ) +{ var current_entity = that.entity; while (current_entity.containing_entity){ current_entity = current_entity.containing_entity; @@ -141,9 +148,7 @@ IPA.facet = function (spec) { that.entity.redirect_facet); return; }else{ -var details = $('.details', that.container).empty(); -details.append('pError: '+error_thrown.name+'/p'); -details.append('p'+error_thrown.message+'/p'); +that.report_error(error_thrown); } }; diff --git a/install/ui/search.js b/install/ui/search.js index 8250e0a76baacbac9de4a27165157cb1ff29aee4..5a9b14f0528dcf08f70e877bc6df56bb84bd2edd 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -287,6 +287,10 @@ IPA.search_facet = function(spec) { that.search_refresh(that.entity); }; +that.on_error = function(xhr, text_status, error_thrown) { +that.report_error(error_thrown); +}; + that.search_refresh = function(entity){ $('input[type=checkbox]',that.table.thead).removeAttr(checked); -- 1.7.5.2 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 0236-no-redirect-on-search
On 6/15/2011 11:37 AM, Adam Young wrote: Removed extra whitespace Facet can override what to do on error There's a jslint warning, but other than that it can be pushed. This patch fixes the first item in ticket #1281. The second item is still a problem. Steps to reproduce: 1. Open a search page. 2. Run service dirsrv stop 3. Click one of the entries in the list. It will go to the details page and display an error dialog. If you close the dialog it will go back to search page and display another error dialog. See also the entitlements page, instead of displaying an error dialog it shows the error in the status bar below. Should we replace redirection with this? Or should we fix entitlements to show error dialog too? Normally the status bar in entitlements is used to show the enrollment status (which is not an error). -- Endi S. Dewata ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 0236-no-redirect-on-search
On 06/15/2011 01:50 PM, Endi Sukma Dewata wrote: On 6/15/2011 11:37 AM, Adam Young wrote: Removed extra whitespace Facet can override what to do on error There's a jslint warning, but other than that it can be pushed. This patch fixes the first item in ticket #1281. The second item is still a problem. Steps to reproduce: 1. Open a search page. 2. Run service dirsrv stop 3. Click one of the entries in the list. It will go to the details page and display an error dialog. If you close the dialog it will go back to search page and display another error dialog. See also the entitlements page, instead of displaying an error dialog it shows the error in the status bar below. Should we replace redirection with this? Or should we fix entitlements to show error dialog too? Normally the status bar in entitlements is used to show the enrollment status (which is not an error). Fixed the JSL error and pushed to master ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel