Browse files

Add noDataMessage when no data is available

  • Loading branch information...
1 parent a30a30c commit 900c987157bbfa03166a9732412efac59be37a01 @kriszyp committed Oct 3, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 extensions/Pagination.js
View
5 extensions/Pagination.js
@@ -241,8 +241,11 @@ function(_StoreMixin, declare, lang, Deferred, on, query, string, has, put, i18n
delete grid._isLoading;
// reset scroll position now that new page is loaded
grid.bodyNode.scrollTop = 0;
-
Deferred.when(results.total, function(total){
+ if(!total){
+ put(grid.contentNode, "div.dgrid-no-data").innerHTML = grid.noDataMessage;
+ }
+
// update status text based on now-current page and total
grid.paginationStatusNode.innerHTML = string.substitute(i18n.status, {
start: Math.min(start + 1, total),

0 comments on commit 900c987

Please sign in to comment.