From 6039fdd6b3002f65ecd0121b7ca6d31e49b9590e Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 1 Jun 2011 09:34:44 -0400 Subject: redirect on error Code for redirecting on error has been moved to IPA.facet so it can be called from both details and assocaiton facets. --- install/ui/details.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index d9c948e9..80e7bd9e 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -640,22 +640,7 @@ IPA.details_facet = function(spec) { that.load(data.result.result); }; - command.on_error = function(xhr, text_status, error_thrown) { - 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.on_error = that.on_error; command.execute(); }; -- cgit