From 85a648005c0948a641b79a64d9b9029bdfc02ecf Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 22 Jun 2017 12:09:26 -0400 Subject: [PATCH] LP#1697954 Notify correct page of patron holds Instead of notifying the grid on all holds, just notify when we're inside the current page of results. Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/circ/patron/holds.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js b/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js index e2c422b1c7..1e51cde659 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/holds.js @@ -83,6 +83,7 @@ function($scope, $q, $routeParams, egCore, egUser, patronSvc, if ($scope.holds_display == 'alt') method = 'open-ils.circ.holds.canceled.id_list.retrieve.authoritative'; + var current = 0; egCore.net.request( 'open-ils.circ', method, egCore.auth.token(), $scope.patron_id @@ -92,7 +93,14 @@ function($scope, $q, $routeParams, egCore, egUser, patronSvc, patronSvc.hold_ids = hold_ids; fetchHolds(offset, count) - .then(deferred.resolve, null, deferred.notify); + .then(deferred.resolve, null, function (data) { + if (data) { + if (current >= offset && current < count) { + deferred.notify(data); + } + current++; + } + }); }); return deferred.promise; -- 2.43.2