{I" class:EFI"ProcessedAsset;FI"logical_path;FI" carnival/advanced_search.js;TI" pathname;FI"@/project/app/assets/javascripts/carnival/advanced_search.js;TI"content_type;FI"application/javascript;FI" mtime;Fl+'ÚSI" length;FiáI" digest;F"%1229acbe7df38522a961dbc40ff6e232I" source;FI"á$(document).ready(function(){ $("#advanced_search_toggler, ul#advanced_search_form").mouseover(function(e){ $("#advanced_search_form").show(); }); $("#advanced_search_toggler, ul#advanced_search_form").mouseout(function(e){ $("#advanced_search_form").hide(); }); $("#search_button").click(function(e){ e.preventDefault(); var queryParams = []; $(".advanced_search input").each(function(){ if($(this).attr("type") == "checkbox") queryParams.push(generateQueryParam($(this).attr("name"), $(this).data("type"), $(this).data("operator"), $(this).is(":checked"))); else if ($(this).attr("type") == "text" && $(this).val() != "") queryParams.push(generateQueryParam($(this).attr("name"), $(this).data("type"), $(this).data("operator"), $(this).val())); }); $(".advanced_search select").each(function(){ if($(this).val() != "-1") queryParams.push(generateQueryParam($(this).attr("name"), $(this).data("type"), $(this).data("operator"), $(this).val())); }); $(".table").first().data("advancedquery", "{" + queryParams.join(", ") + "}"); var dataTable = $(".table").dataTable(); dataTable.fnReloadAjax(generateDataSource($(".table"))); }); $("#clear_button").click(function(e){ e.preventDefault(); $($(this).parent().parent().parent()).trigger("reset") $(".table").first().data("advancedquery", ""); $(".dataTables_filter input[type=text]").val(""); var dataTable = $(".table").dataTable(); dataTable.fnReloadAjax(generateDataSource($(".table"))); }); }); function generateQueryParam(field, association, operator, value){ return '"' + field + '":{"operator":"' + operator + '", "value":"' + value + '", "type":"' + association + '"}' } ; ;TI"dependency_digest;F"%2533287cc77935003a96a76a9a883f52I"required_paths;F[I"@/project/app/assets/javascripts/carnival/advanced_search.js;TI"dependency_paths;F[{I" path;FI"@/project/app/assets/javascripts/carnival/advanced_search.js;TI" mtime;FI"2014-03-09T03:04:07+00:00;FI" digest;F"%4918adc5972ebfbf76d7808d1c94be55I" _version;F"%9bd74cab6f8cd17bb7b52df6002861bd