aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/apps')
-rwxr-xr-xsrc/main/webapp/apps/core/PagingTableService.js6
-rwxr-xr-xsrc/main/webapp/apps/frontPageApp/personList.html2
2 files changed, 4 insertions, 4 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);
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 @@
</div>
</div>
<ul class="pager">
- <li class="previous" ng-hide="persons.startIndex == 0">
+ <li class="previous" ng-show="persons.startIndex > 0">
<a ng-click="persons.prev()">&larr; Prev</a>
</li>
<li class="next">