From a310ffdce4cd6dcbb6ba8e4fb739412ea9abdca5 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 6 Jan 2013 14:56:35 +0100 Subject: o Getting the pager to work again. --- src/main/webapp/apps/core/PagingTableService.js | 6 +++--- src/main/webapp/apps/frontPageApp/personList.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/webapp/apps/core/PagingTableService.js b/src/main/webapp/apps/core/PagingTableService.js index a6a10f7..af593df 100755 --- a/src/main/webapp/apps/core/PagingTableService.js +++ b/src/main/webapp/apps/core/PagingTableService.js @@ -5,7 +5,7 @@ function PagingTableService() { var self = { rows: [], startIndex: options.startIndex || 0, - count: options.count + count: options.count || 10 }; var update = function(){ @@ -21,7 +21,7 @@ function PagingTableService() { }; self.next = function () { - this.startIndex += this.count; + self.startIndex += self.count; update(); }; @@ -42,13 +42,13 @@ function PagingTableService() { var defaultCallback = function(Resource, args) { args = args || {}; return function(startIndex, count, cb) { - console.log("fetching", arguments); if(startIndex) { args.startIndex = startIndex; } if(count) { args.count = count; } + console.log("fetching", args); Resource.query(args, function(data, headers) { var totalResults = headers("total-results"); console.log("totalResults", totalResults); diff --git a/src/main/webapp/apps/frontPageApp/personList.html b/src/main/webapp/apps/frontPageApp/personList.html index 5212ff6..5247f29 100755 --- a/src/main/webapp/apps/frontPageApp/personList.html +++ b/src/main/webapp/apps/frontPageApp/personList.html @@ -35,7 +35,7 @@