diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-06 14:56:35 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-06 14:56:35 +0100 |
commit | a310ffdce4cd6dcbb6ba8e4fb739412ea9abdca5 (patch) | |
tree | c798cd712d273326c3ae8613e04799478af38385 /src/main/webapp/apps/core/PagingTableService.js | |
parent | 7663c88dba4da60afde4691fc925e2f4cf6e3c4b (diff) | |
download | esper-testing-a310ffdce4cd6dcbb6ba8e4fb739412ea9abdca5.tar.gz esper-testing-a310ffdce4cd6dcbb6ba8e4fb739412ea9abdca5.tar.bz2 esper-testing-a310ffdce4cd6dcbb6ba8e4fb739412ea9abdca5.tar.xz esper-testing-a310ffdce4cd6dcbb6ba8e4fb739412ea9abdca5.zip |
o Getting the pager to work again.
Diffstat (limited to 'src/main/webapp/apps/core/PagingTableService.js')
-rwxr-xr-x | src/main/webapp/apps/core/PagingTableService.js | 6 |
1 files changed, 3 insertions, 3 deletions
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); |