From f25217363dd3040a6cec4ae5798c52569a222e4e Mon Sep 17 00:00:00 2001 From: Cesar Velez Date: Fri, 15 Dec 2017 16:10:31 -0500 Subject: [PATCH] LP#1712854 - make progress dialog for record holds static 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 --- Open-ILS/web/js/ui/default/staff/cat/catalog/app.js | 2 +- Open-ILS/web/js/ui/default/staff/circ/holds/app.js | 1 + Open-ILS/web/js/ui/default/staff/services/ui.js | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) 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 72004013e9..b63e9cb076 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 @@ -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( 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 75e6e6a335..f48bfa6136 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 @@ -95,6 +95,7 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e ).then(function(ids) { if (!ids.length) { deferred.resolve(); + egProgressDialog.close(); return; } diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index 47632ed696..5841ba03a4 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -373,9 +373,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- -- 2.11.0