From fad4233d8ded5bf23e8cbdcd70b688a11995d594 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 18 May 2017 12:23:57 -0400 Subject: [PATCH] webstaff: Allow jumping between pages Signed-off-by: Mike Rylander --- .../web/js/ui/default/staff/serials/directives/view-items-grid.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js b/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js index c584bf8244..0aaf680ac3 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js @@ -44,7 +44,12 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , if (egSerialsCoreSvc.itemList.length >= offset + count) { // if there's anything on the requested page, notify return self.arrayNotifier(egSerialsCoreSvc.itemList, offset, count); } else { // else try to fetch another page - return egSerialsCoreSvc.fetchItemsForSubPaged($scope.ssubId, _paging_filter, offset, count).then(function() { + return egSerialsCoreSvc.fetchItemsForSubPaged( + $scope.ssubId, + _paging_filter, + egSerialsCoreSvc.itemList.length, + count + offset - egSerialsCoreSvc.itemList.length + ).then(function() { return self.arrayNotifier(egSerialsCoreSvc.itemList, offset, count); }); } -- 2.11.0