From 6e403ab935f36720b3b954afdf3bbefcbf50bb5c Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 21 Jan 2013 16:50:41 +0100 Subject: o Adding a page={page} when paging through the person list. --- src/main/resources/webapp/apps/core/PagingTableService.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/resources/webapp/apps/core/PagingTableService.js') diff --git a/src/main/resources/webapp/apps/core/PagingTableService.js b/src/main/resources/webapp/apps/core/PagingTableService.js index b602fbe..802c0c8 100755 --- a/src/main/resources/webapp/apps/core/PagingTableService.js +++ b/src/main/resources/webapp/apps/core/PagingTableService.js @@ -66,6 +66,9 @@ function PagingTableService() { }); }; + /* + * UI actions + */ self.first = function () { self.startIndex = 0; update(); @@ -100,6 +103,7 @@ function PagingTableService() { }; self.onSearchChange = function () { + self.startIndex = 0; update(); }; @@ -127,6 +131,10 @@ function PagingTableService() { return internal.currentlySearching; }; + self.currentPage = function() { + return (self.startIndex / self.count) + 1; + }; + // Do an initial fetch update(); -- cgit v1.2.3