From: Jakub Skoczen Date: Thu, 3 Mar 2011 09:23:16 +0000 (+0100) Subject: Only pass selection for a given facet X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=44ebb26e14d9baf9d6886a45e424abf7d00a80c4;p=mkdru-moved-to-drupal.org.git Only pass selection for a given facet --- diff --git a/mkdru.client.js b/mkdru.client.js index 5c2d0d0..ddda649 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -163,7 +163,8 @@ mkdru.pz2Term = function (data) { } } $('.mkdru-facet-' + facet).html( - Drupal.theme('mkdruFacet', terms, facet, mkdru.facets[facet].max, hash)); + Drupal.theme('mkdruFacet', terms, facet, mkdru.facets[facet].max, + hash[facet])); } }; diff --git a/mkdru.theme.js b/mkdru.theme.js index 1871750..ebbc45b 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -122,12 +122,12 @@ Drupal.theme.prototype.mkdruFacet = function (terms, facet, max, selections) { + ')
'; } //TODO, meed to look up target name from ID - var sel = selections[facet]; - if (terms.length == 0 && sel && sel.length) { - for (var i=0; i'+sel[i]+' (0)
'; + if (terms.length == 0 && selections && selections.length) { + for (var i=0; i'+selections[i]+' (0)
'; } } }