X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=mkdru.theme.js;h=1871750510b759d719d82e831a591cf0b916c2a2;hb=db5b797778922d50919364399c90411dfdfb712a;hp=8051e40e863d727bc7e029fd71c62193b1fa9ce0;hpb=df266c1e61953919f80aaf4b6d31a1c433808028;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index 8051e40..1871750 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -110,25 +110,28 @@ Drupal.theme.prototype.mkdruStatus = function(activeClients, clients) { + clients + Drupal.t(' targets'); }; -Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) { - debugger; +Drupal.theme.prototype.mkdruFacet = function (terms, facet, max, selections) { var html = ""; for (var i = 0; i < terms.length && i < max; i++ ) { - html += '' + terms[i].name + ' (' + terms[i].freq + ')
'; + var term = terms[i]; + html += '
'; } - return html; -}; - -Drupal.theme.prototype.mkdruFacetLimit = function (term, link) { - if (term) { - return '

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

' - + '

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

'; + //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; }; Drupal.theme.prototype.mkdruFacetContainer = function (facets, facetCfg) {