LP#1712854 - make progress dialog for record holds static
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Fri, 15 Dec 2017 21:10:31 +0000 (16:10 -0500)
committerCesar Velez <cesar.velez@equinoxinitiative.org>
Tue, 19 Dec 2017 22:05:30 +0000 (17:05 -0500)
Enables the progress dialog to get a backdrop argument,
this enables the bib record holds UI progress dialog have
static backdrop, only dismissable by using ESC-key.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
Open-ILS/web/js/ui/default/staff/circ/holds/app.js
Open-ILS/web/js/ui/default/staff/services/ui.js

index 7200401..b63e9cb 100644 (file)
@@ -1662,7 +1662,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
             return provider.arrayNotifier(holds, offset, count);
         }
         // open a determinate progress dialog, max value set below.
-        egProgressDialog.open({max : 1, value : 0});
+        egProgressDialog.open({max : 1, value : 0, backdrop: 'static'});
 
         // fetch the IDs
         egCore.net.request(
index 75e6e6a..f48bfa6 100644 (file)
@@ -95,6 +95,7 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e
         ).then(function(ids) {
             if (!ids.length) { 
                 deferred.resolve(); 
+                egProgressDialog.close();
                 return; 
             }
 
index 76d5425..72bee73 100644 (file)
@@ -310,9 +310,10 @@ function($timeout , $parse) {
     var service = {};
 
     service.open = function(args) {
+        if (!args) args = {};
         return $uibModal.open({
             templateUrl: './share/t_progress_dialog',
-            /* backdrop: 'static', */ /* allow 'cancelling' of progress dialog */
+            backdrop: args.backdrop || true, /* default=true, 'static' prevents dialog dismiss/close via click, only ESC-key works */
             controller: ['$scope','$uibModalInstance','egProgressData',
                 function( $scope , $uibModalInstance , egProgressData) {
                     // Once the new modal instance is available, force-