From: Cesar Velez Date: Fri, 12 Jan 2018 17:18:31 +0000 (-0500) Subject: LP#1712854 - make hold grids set grid.totalCount X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=356d488f8cdcf557d0e3c2e0940eccd98d3fd43f;p=working%2FEvergreen.git LP#1712854 - make hold grids set grid.totalCount Since we are pre-fetching all holds for these grids, we know the totalCount and thus we can make the grid behave better. Avoid the weirdness described in bug 1739648, which this patch depends on. 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 b63e9cb076..63d17c5ba3 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 @@ -1681,12 +1681,13 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e hold_ids = hold_ids.concat(list); }); + $scope.hold_grid_data_provider.grid.totalCount = hold_ids.length; + // Set the max value of the progress bar to the lesser of // the total number of holds to fetch or the page size // of the grid. egProgressDialog.update( {max : hold_ids.length}); - var holds_fetched = 0; fetchHolds().then(deferred.resolve, null, function(hold_data) { diff --git a/Open-ILS/web/js/ui/default/staff/circ/holds/app.js b/Open-ILS/web/js/ui/default/staff/circ/holds/app.js index f48bfa6136..c21dac7b23 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/holds/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/holds/app.js @@ -100,6 +100,7 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e } hold_ids = ids; + $scope.gridDataProvider.grid.totalCount = hold_ids.length; egProgressDialog.update( {max : hold_ids.length});