Drupal.theme.mkdruFacet = function (terms, facet, max) {
var html = "";
for (var i = 0; i < terms.length && i < max; i++ ) {
- 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;
-};
+ var term = terms[i];
+ html += '<a href="'+term.hashQuery+'"';
+ if (term.selected) html += ' class="cross"><strong';
+ html += '>'+terms[i].name;
+ if (term.selected) html += "</strong>";
+ html += '</a><span> (' + terms[i].freq
+ + ')</span><br/>';
-Drupal.theme.mkdruFacetLimit = function (term, link) {
- if (term) {
- return '<p><strong>' + term.name + '</strong></p>'
- + '<p><a href="' + link + '">' + Drupal.t('Show all...') + '</a></p>';
}
+ return html;
};
-