From: Mike Rylander Date: Fri, 15 Dec 2017 16:00:05 +0000 (-0500) Subject: LP#1712854 - add misc fixes for bib hold grid fetching X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1f0345df20a893143849b6148a4a19230f84df26;p=working%2FEvergreen.git LP#1712854 - add misc fixes for bib hold grid fetching Only notify when we are inside the limit/count window. Plus white space fix. Darn it Cesar, fix your Vim... ;) Signed-off-by: Mike Rylander Signed-off-by: Cesar Velez --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index 20bd078515..72004013e9 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -1690,8 +1690,11 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e var holds_fetched = 0; fetchHolds().then(deferred.resolve, null, function(hold_data) { + if (holds_fetched >= offset && holds_fetched < offset + count) { + // We're in the window of holds we want to see + deferred.notify(hold_data); + } holds_fetched++; - deferred.notify(hold_data); egProgressDialog.increment(); } )['finally'](egProgressDialog.close); @@ -1715,7 +1718,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e $scope.pickup_ou = egCore.org.get(egCore.auth.user().ws_ou()); $scope.pickup_ou_changed = function(org) { if($scope.pickup_ou.id() != org.id()){ - $scope.pickup_ou = org; + $scope.pickup_ou = org; holds = []; // cached hold data is stale due to ou change, clear it } provider.refresh(false);