From: Jakub Skoczen Date: Thu, 3 Mar 2011 00:47:52 +0000 (+0100) Subject: Drop mkdruFacetLimit, extend args for mkdruFacet X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=be97579a24b75983d1ba3069d9ca38cf87702a0b;p=mkdru-moved-to-drupal.org.git Drop mkdruFacetLimit, extend args for mkdruFacet Append more data to the array so the template can be simpler. Both selected and available facets can now be rendered in one go. --- diff --git a/mkdru.client.js b/mkdru.client.js index 9365e78..f931c3e 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -122,23 +122,49 @@ mkdru.pz2Status = function (data) { $('.mkdru-status').html(Drupal.theme('mkdruStatus', data.activeclients, data.clients)); }; +mkdru.contains = function (hash, key, value) { + if (hash[key]) { + if (hash[key].length) { + for (var i=0; i (' + terms[i].freq + ')
'; - } - return html; -}; + var term = terms[i]; + html += '
'; -Drupal.theme.prototype.mkdruFacetLimit = function (term, link) { - if (term) { - return '

' + Drupal.t('Only displaying ') + term.name + '

' - + '

' + Drupal.t('Show all...') + '

'; } + return html; }; Drupal.theme.prototype.mkdruFacetContainer = function (facets, facetCfg) {