From ac02e881da60b67e64ecc3284a51bf3af498af51 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 11 May 2015 23:18:22 +0100 Subject: [PATCH] Attempt to generate filter fragments that are a based on the prevailing state. This DOES NOT WORK due to an aliasing bug that I can make no sense of. I'll discuss this with Jakub tomorrow. --- src/mkws-widget-facets.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mkws-widget-facets.js b/src/mkws-widget-facets.js index 3e1ef5a..5c720bd 100644 --- a/src/mkws-widget-facets.js +++ b/src/mkws-widget-facets.js @@ -45,11 +45,17 @@ mkws.registerWidgetType('facet', function() { data = data[name]; var terms = []; var teamName = team.name(); + var base = team.filters(); + var fs; for (var i = 0; i < data.length && i < max; i++) { - var fs = filterSet(team) + fs = $.extend(base, [], false); + //team.warn("fs = " + mkws.$.toJSON(fs)); + //team.warn("team.filters = " + mkws.$.toJSON(team.filters())); if (!pzIndex) { // Special case: target selection + team.warn("before: team.filters = " + mkws.$.toJSON(team.filters())); fs.add(targetFilter(data[i].id, data[i].name)); + team.warn("after: team.filters = " + mkws.$.toJSON(team.filters())); } else { fs.add(fieldFilter(pzIndex, data[i].name)); } -- 1.7.10.4