From: Bill Erickson Date: Fri, 3 Mar 2017 16:42:44 +0000 (-0500) Subject: LP#1642378 Webstaff negative balance UI progress dialog X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dea08c3d3797ad4e9fd75f3c80cae9c782b7c1e8;p=working%2FEvergreen.git 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 --- 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 0428d09c85..b72fd5109c 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(); @@ -18,7 +21,10 @@ function($scope , $q , $timeout , $location , $window , egCore , egGridDataProvi 'open-ils.actor', 'open-ils.actor.users.negative_balance', egCore.auth.token(), $scope.context_org.id()) - .then(deferred.resolve, null, deferred.notify); + .then(deferred.resolve, null, function(usr) { + egProgressDialog.increment(); + deferred.notify(usr); + }).finally(egProgressDialog.close); return deferred.promise; }