X-Git-Url: http://git.indexdata.com/?p=mkdru-moved-to-drupal.org.git;a=blobdiff_plain;f=mkdru.theme.js;h=229c482dd6c7870c8f68582a3fbb24ea63dcce5b;hp=92e1340dc4414f9a33827a364c481fb7983683d5;hb=HEAD;hpb=2ac88bd98cd870652e1610dec04be01d2ebee745 diff --git a/mkdru.theme.js b/mkdru.theme.js index 92e1340..229c482 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,26 +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++ ) { - 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...') + '

'; + 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 (facetsCfg) { return ""; };