X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=034b4033c50969a7a93d099c4eb248b40d3c62e0;hb=7f65c61eb4ac230a607fa8125ca41a7e3dc539f8;hp=8051e40e863d727bc7e029fd71c62193b1fa9ce0;hpb=08871a2c8216c8b9a6c39104402dc55e07df5cf3;p=mkdru-moved-to-drupal.org.git
diff --git a/mkdru.theme.js b/mkdru.theme.js
index 8051e40..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,27 +113,34 @@ Drupal.theme.prototype.mkdruStatus = function(activeClients, clients) {
+ clients + Drupal.t(' targets');
};
-Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) {
- debugger;
+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 += ''+terms[i].name;
+ if (term.selected) html += "";
+ html += ' (' + terms[i].freq
+ + ')
';
}
- 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