portality/static/widget/fq_widget_depends_compiled.js
// function to make the relevant filters from the filter definition
function to make the relevant filters from the filter definition
function to make the relevant filters from the filter definition
function makeFilters(filter_definition) {
        var filters = [];
        for (var field in filter_definition) {
            if (filter_definition.hasOwnProperty(field)) {
                var facet = selectFacet(field);
                if (facet.disabled) { continue }
                var filter_list = filter_definition[field];
                if (facet.type === "terms") {
                    filters = filters.concat(termsFilter(facet, filter_list)); 
                } else if (facet.type === "range") {
                    filters.push(rangeFilter(facet, filter_list))
                } else if (facet.type === "geo_distance") {
                    filters.push(geoFilter(facet, filter_list))
                } else if (facet.type == "date_histogram") {
                    filters.push(dateHistogramFilter(facet, filter_list))
                }
            }
        }
        return filters
    }
function makeFilters ( filter_definition ) { var filters = [ ] ; for ( var field in filter_definition ) { if ( filter_definition . hasOwnProperty ( field ) ) { var facet = selectFacet ( field ) ; if ( facet . disabled ) { continue } var filter_list = filter_definition [ field ] ; if ( facet . type === "terms" ) { filters = filters . concat ( termsFilter ( facet , filter_list ) ) ; } else if ( facet . type === "range" ) { filters . push ( rangeFilter ( facet , filter_list ) ) } else if ( facet . type === "geo_distance" ) { filters . push ( geoFilter ( facet , filter_list ) ) } else if ( facet . type == "date_histogram" ) { filters . push ( dateHistogramFilter ( facet , filter_list ) ) } } } return filters }
function to make the relevant filters from the filter definition
function to make the relevant filters from the filter definition
// FIXME: is this the right behaviour? // ignore any filters from disabled facets // Note this is a concat not a push, unlike the others