From 8ae358405f107d317e01580e4036a054e89f8472 Mon Sep 17 00:00:00 2001 From: Cesar Velez Date: Fri, 12 Jan 2018 12:18:31 -0500 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/staff/cat/catalog/app.js | 3 ++- Open-ILS/web/js/ui/default/staff/circ/holds/app.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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}); -- 2.11.0