lp1731272 - hanging progress bar for records with no holds
authora. bellenir <ab@grpl.org>
Wed, 27 Jun 2018 00:57:08 +0000 (20:57 -0400)
committera. bellenir <ab@grpl.org>
Wed, 27 Jun 2018 00:57:08 +0000 (20:57 -0400)
there is a race condition between opening/closing the progress dialog if there are no holds.
use setTimeout to force egProgressDialog.close to the end of the javascript event queue.

Signed-off-by: a. bellenir <ab@grpl.org>
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index 524fca4..d171c4b 100644 (file)
@@ -1708,7 +1708,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
                         deferred.notify(hold_data);
                         egProgressDialog.increment();
                     }
-                )['finally'](egProgressDialog.close);
+                )['finally'](function(){ setTimeout(egProgressDialog.close); });
             }
         );