diff options
author | Adam Young <ayoung@redhat.com> | 2011-06-15 11:18:25 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-06-15 14:09:33 -0400 |
commit | 17dccbdeccc037886b7d3335343a967df72555e8 (patch) | |
tree | 55646824c1852af1b9d0a01976cbb61e4fa17544 | |
parent | b22a41ead58547d72c4099a6f92ac595c3b3d2fe (diff) | |
download | freeipa-17dccbdeccc037886b7d3335343a967df72555e8.tar.gz freeipa-17dccbdeccc037886b7d3335343a967df72555e8.tar.xz freeipa-17dccbdeccc037886b7d3335343a967df72555e8.zip |
no redirect on search
https://fedorahosted.org/freeipa/ticket/1281
-rw-r--r-- | install/ui/entity.js | 13 | ||||
-rw-r--r-- | install/ui/search.js | 4 |
2 files changed, 13 insertions, 4 deletions
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('<p>Error: '+error_thrown.name+'</p>'); + details.append('<p>'+error_thrown.message+'</p>'); + }; + 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('<p>Error: '+error_thrown.name+'</p>'); - details.append('<p>'+error_thrown.message+'</p>'); + that.report_error(error_thrown); } }; diff --git a/install/ui/search.js b/install/ui/search.js index 8250e0a76..5a9b14f05 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -287,6 +287,10 @@ IPA.search_facet = function(spec) { that.search_refresh(that.entity); }; + that.on_error = function(xhr, text_status, error_thrown) { + that.report_error(error_thrown); + }; + that.search_refresh = function(entity){ $('input[type=checkbox]',that.table.thead).removeAttr("checked"); |