CC-4919: Library -> Search: Exception happens when switching back to simple search with some illegal input in Advanced Search

-fixed
This commit is contained in:
denise 2013-02-06 12:36:04 -05:00
parent 8e82db1bc7
commit 517a58bc43
1 changed files with 13 additions and 2 deletions

View File

@ -702,8 +702,19 @@ var AIRTIME = (function(AIRTIME) {
$simpleSearch.addClass("sp-invisible");
}
else {
//clear the advanced search fields and reset datatable
$(".filter_column input").val("").keyup();
// clear the advanced search fields
var divs = $("div#advanced_search").children(':visible');
$.each(divs, function(i, div){
fields = $(div).children().find('input');
$.each(fields, function(i, field){
if ($(field).val() !== "") {
$(field).val("");
// we need to reset the results when removing
// an advanced search field
$(field).keyup();
}
});
});
//reset datatable with previous simple search results (if any)
$(".dataTables_filter input").val(simpleSearchText).keyup();