From: Mike Rylander Date: Thu, 22 Jun 2017 16:09:26 +0000 (-0400) Subject: LP#1697954 Notify correct page of patron holds X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fmiker%2Flp1697954-signoff-tweaks-notify-fix;p=working%2FEvergreen.git 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 --- 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;