aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/webapp/apps/core/PagingTableService.js
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-21 16:50:41 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-21 16:50:54 +0100
commit6e403ab935f36720b3b954afdf3bbefcbf50bb5c (patch)
tree32042c30bb34c67067df064756ebe433f7275379 /src/main/resources/webapp/apps/core/PagingTableService.js
parent06e326aeb99ab022d80a4550ccd461d0fc95c74e (diff)
downloadesper-testing-6e403ab935f36720b3b954afdf3bbefcbf50bb5c.tar.gz
esper-testing-6e403ab935f36720b3b954afdf3bbefcbf50bb5c.tar.bz2
esper-testing-6e403ab935f36720b3b954afdf3bbefcbf50bb5c.tar.xz
esper-testing-6e403ab935f36720b3b954afdf3bbefcbf50bb5c.zip
o Adding a page={page} when paging through the person list.
Diffstat (limited to 'src/main/resources/webapp/apps/core/PagingTableService.js')
-rwxr-xr-xsrc/main/resources/webapp/apps/core/PagingTableService.js8
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();