no redirect on search

https://fedorahosted.org/freeipa/ticket/1281
This commit is contained in:
Adam Young
2011-06-15 11:18:25 -04:00
parent b22a41ead5
commit 17dccbdecc
2 changed files with 13 additions and 4 deletions

View File

@@ -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);
}
};

View File

@@ -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");