From 17dccbdeccc037886b7d3335343a967df72555e8 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 15 Jun 2011 11:18:25 -0400 Subject: no redirect on search https://fedorahosted.org/freeipa/ticket/1281 --- install/ui/entity.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'install/ui/entity.js') diff --git a/install/ui/entity.js b/install/ui/entity.js index de57df544..107c3c4d4 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('

Error: '+error_thrown.name+'

'); + details.append('

'+error_thrown.message+'

'); + }; + 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('

Error: '+error_thrown.name+'

'); - details.append('

'+error_thrown.message+'

'); + that.report_error(error_thrown); } }; -- cgit