X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=1871750510b759d719d82e831a591cf0b916c2a2;hb=294a6b92a83414b55fb6619bb74074e7ecae1a08;hp=bcf9de9040c995f1e5b62c3cba0f5607ef7f89b2;hpb=be97579a24b75983d1ba3069d9ca38cf87702a0b;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index bcf9de9..1871750 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -110,7 +110,7 @@ Drupal.theme.prototype.mkdruStatus = function(activeClients, clients) { + clients + Drupal.t(' targets'); }; -Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) { +Drupal.theme.prototype.mkdruFacet = function (terms, facet, max, selections) { var html = ""; for (var i = 0; i < terms.length && i < max; i++ ) { var term = terms[i]; @@ -120,7 +120,16 @@ Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) { if (term.selected) html += ""; html += ' (' + terms[i].freq + ')
'; - + } + //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)
'; + } + } } return html; };