Report no result in a better way
[mkdru-moved-to-drupal.org.git] / mkdru.theme.js
index ebbc45b..c919ffd 100644 (file)
@@ -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) {
@@ -134,6 +137,6 @@ Drupal.theme.prototype.mkdruFacet = function (terms, facet, max, selections) {
   return html;
 };
 
-Drupal.theme.prototype.mkdruFacetContainer = function (facets, facetCfg) {
+Drupal.theme.prototype.mkdruFacetContainer = function (facetCfg) {
   return "";
 };