X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=a3a0c0e1f8fb0208c72b84490c6ba331695afc86;hb=2b5e7db83479b99d46023a9e832d374f66fad453;hp=6f77dda1133cd1136f642e78f968d00c4198f603;hpb=4df4972a2a7429f91acd889dbaa60ef9e40c684a;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index 6f77dda..a3a0c0e 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -100,10 +100,32 @@ Drupal.theme.prototype.mkdruPager = function (pages, start, current, total, prev return html; }; -Drupal.theme.prototype.mkdruTerm = function (term, freq, linkClass, id) { - var html = '' + term + ' (' + freq + ')
'; +Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) { + var html = ""; + for (var i = 0; i < terms.length && i < max; i++ ) { + html += Drupal.theme('mkdruFacetTerm', terms[i], facet); + } return html; +}; + +Drupal.theme.prototype.mkdruFacetTerm = function (term, facet) { + var html = '' + term.name + ' (' + term.freq + ')
'; + return html; +}; + +Drupal.theme.prototype.mkdruFacetLimit = function (term, link) { + if (term) { + return '

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

' + + '

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

'; + } }; \ No newline at end of file