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);
+ html += '<a href="';
+ if (facet == 'source')
+ html += mkdru.addLimit(facet, terms[i].id);
+ else
+ html += mkdru.addLimit(facet, terms[i].name);
+ html += '">' + terms[i].name + '</a><span> (' + terms[i].freq + ')</span><br/>';
}
return html;
};
-Drupal.theme.prototype.mkdruFacetTerm = function (term, facet) {
- var html = '<a href="';
- switch (facet) {
- case 'source':
- html += mkdru.hashAddDelOne('limit_' + facet, term.id, 'page');
- break;
- case 'subject':
- case 'author':
- html += mkdru.hashAddDelOne('limit_' + facet, term.name, 'page');
- break;
- }
- html += '">' + term.name + '</a><span> (' + term.freq + ')</span><br/>';
- return html;
-};
-
Drupal.theme.prototype.mkdruFacetLimit = function (term, link) {
if (term) {
return '<p>' + Drupal.t('Only displaying ') + term.name + '</p>'