From: Mike Taylor Date: Mon, 11 May 2015 22:18:22 +0000 (+0100) Subject: Attempt to generate filter fragments that are a based on the X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=ac02e881da60b67e64ecc3284a51bf3af498af51;p=mkws-moved-to-github.git 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. --- 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)); }