diff options
Diffstat (limited to 'install/ui/entity.js')
-rw-r--r-- | install/ui/entity.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/install/ui/entity.js b/install/ui/entity.js index 4b6ce1d0e..030bcb016 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -130,6 +130,25 @@ IPA.facet = function (spec) { return $('.content', that.container); }; + + that.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('<p>Error: '+error_thrown.name+'</p>'); + details.append('<p>'+error_thrown.message+'</p>'); + } + }; + + // methods that should be invoked by subclasses that.facet_init = that.init; that.facet_create_header = that.create_header; |