diff options
Diffstat (limited to 'src/main/resources/webapp/apps/core/PagingTableService.js')
-rwxr-xr-x | src/main/resources/webapp/apps/core/PagingTableService.js | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |