X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=034b4033c50969a7a93d099c4eb248b40d3c62e0;hb=b05198f173da13dbb50bd270bd27c2029a546565;hp=09226c128958280956aa9cf4b2c1447fbe7d3b52;hpb=f1795ec17ae3999b5e652bdabb4016345533b35b;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index 09226c1..034b403 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -101,8 +101,11 @@ Drupal.theme.prototype.mkdruPager = function (pages, start, current, total, prev }; Drupal.theme.prototype.mkdruCounts = function(first, last, available, total) { - return first + Drupal.t(' to ') + last + Drupal.t(' of ') + available + if (last > 0) + return first + Drupal.t(' to ') + last + Drupal.t(' of ') + available + Drupal.t(' available (') + total + Drupal.t(' found)'); + else + return Drupal.t('No results'); }; Drupal.theme.prototype.mkdruStatus = function(activeClients, clients) { @@ -110,30 +113,34 @@ 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]; - html += '
'; } - //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'+name+' (0)
'; } } } return html; }; -Drupal.theme.prototype.mkdruFacetContainer = function (facets, facetCfg) { +Drupal.theme.prototype.mkdruFacetContainer = function (facetCfg) { return ""; };