diff options
author | Adam Young <ayoung@redhat.com> | 2011-05-31 17:48:20 -0400 |
---|---|---|
committer | Endi Sukma Dewata <edewata@people02.fedoraproject.org> | 2011-05-31 22:28:31 +0000 |
commit | 554bda2a853c9d48edbde6746c428c58368c7a93 (patch) | |
tree | 34149ee35a41fd167d27407fd394f55b8840f485 /install/ui/details.js | |
parent | 007f6dd4c237a64ea5b38792396d0db0d1704809 (diff) | |
download | freeipa-554bda2a853c9d48edbde6746c428c58368c7a93.tar.gz freeipa-554bda2a853c9d48edbde6746c428c58368c7a93.tar.xz freeipa-554bda2a853c9d48edbde6746c428c58368c7a93.zip |
redirect on show error.
Diffstat (limited to 'install/ui/details.js')
-rw-r--r-- | 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 fbf2ff52d..d9c948e97 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('<p>Error: '+error_thrown.name+'</p>'); - details.append('<p>'+error_thrown.message+'</p>'); + 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('<p>Error: '+error_thrown.name+'</p>'); + details.append('<p>'+error_thrown.message+'</p>'); + } }; command.execute(); |