From 554bda2a853c9d48edbde6746c428c58368c7a93 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Tue, 31 May 2011 17:48:20 -0400 Subject: redirect on show error. --- install/ui/details.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index fbf2ff52..d9c948e9 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(); -- cgit