From 16820395ec44a6944f020cb65c2d79c315de209e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 3 Mar 2017 11:42:44 -0500 Subject: [PATCH] LP#1642378 Webstaff negative balance UI progress dialog Display a progress dialog while loading the Patrons With Negative Balances UI. Dialog starts indeterminate, morphing into semi-determinate as patron data streams in. Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier --- .../staff/admin/local/circ/neg_balance_users.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js b/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js index 1697aa7cfc..1386c6c863 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js +++ b/Open-ILS/web/js/ui/default/staff/admin/local/circ/neg_balance_users.js @@ -3,14 +3,17 @@ angular.module('egAdminCirc', ['ngRoute','ui.bootstrap','egCoreMod','egUiMod','egGridMod']) .controller('NegBalances', - ['$scope','$q','$timeout','$location','$window','egCore','egGridDataProvider', -function($scope , $q , $timeout , $location , $window , egCore , egGridDataProvider) { + ['$scope','$q','$timeout','$location','$window','egCore', + 'egGridDataProvider','egProgressDialog', +function($scope , $q , $timeout , $location , $window , egCore , + egGridDataProvider , egProgressDialog) { $scope.grid_provider = egGridDataProvider.instance({}); // API does not currenlty support paging, so it's all or none. $scope.grid_provider.get = function(offset, count) { if (!$scope.context_org) return $q.when(); + egProgressDialog.open(); var deferred = $q.defer(); @@ -19,10 +22,11 @@ function($scope , $q , $timeout , $location , $window , egCore , egGridDataProvi 'open-ils.actor.users.negative_balance', egCore.auth.token(), $scope.context_org.id()) .then(deferred.resolve, null, function(blob) { + egProgressDialog.increment(); // Give the grid a top-level identifier field blob.usr_id = blob.usr.id(); deferred.notify(blob) - }); + }).finally(egProgressDialog.close); return deferred.promise; } -- 2.43.2