From 08e153dd69ff1fa4cede7728de22dfde799ab513 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Thu, 3 Mar 2011 10:23:16 +0100 Subject: [PATCH] Only pass selection for a given facet --- mkdru.client.js | 3 ++- mkdru.theme.js | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) 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)
'; } } } -- 1.7.10.4