From: Victoria Lewis Date: Mon, 10 Aug 2015 17:09:43 +0000 (-0700) Subject: LP 1437103 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=93fb8236d2cb688baab1f2cb25edd46348538fdf;p=working%2FEvergreen.git LP 1437103 Add code to suppress popups on checkin. Signed-off-by: Victoria Lewis Signed-off-by: Victoria Lewis --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index d0407c6403..8b5eb0c1a1 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -152,7 +152,8 @@ function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataPro no_precat_alert : $scope.modifiers.no_precat_alert, auto_print_holds_transits : $scope.modifiers.auto_print_holds_transits, - suppress_popups : suppress_popups + suppress_popups : suppress_popups, + suppress_checkin_popups : suppress_popups }; return {params : params, options: options}; diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index f8f4dd8e40..67d8546c10 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -418,7 +418,17 @@ function($scope, $q, $routeParams, egCore , egUser, patronSvc , }).result; } + + var suppress_popups = false; + egCore.org.settings([ + 'ui.circ.suppress_checkin_popups' // add other settings as needed + ]).then(function(set) { + suppress_popups = set['ui.circ.suppress_checkin_popups']; + }); + $scope.checkin = function(items) { + var options = {suppress_popups : suppress_popups, + suppress_checkin_popups : suppress_popups}; if (!items.length) return; var barcodes = items.map(function(circ) { return circ.target_copy().barcode() }); @@ -429,7 +439,7 @@ function($scope, $q, $routeParams, egCore , egUser, patronSvc , }).result.then(function() { function do_one() { if (bc = barcodes.pop()) { - egCirc.checkin({copy_barcode : bc}) + egCirc.checkin({copy_barcode : bc}, options) .finally(do_one); } else { reset_page(); diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index eea4a18235..ccd0bfd79f 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -1373,28 +1373,29 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog) { if (options.auto_print_holds_transits) return print_transit(); - return $modal.open({ - templateUrl: tmpl, - controller: [ + if(!options.suppress_popups){ + return $modal.open({ + templateUrl: tmpl, + controller: [ '$scope','$modalInstance', function($scope , $modalInstance) { + $scope.today = new Date(); - $scope.today = new Date(); - - // copy the print scope into the dialog scope - angular.forEach(print_context, function(val, key) { - $scope[key] = val; - }); + // copy the print scope into the dialog scope + angular.forEach(print_context, function(val, key) { + $scope[key] = val; + }); - $scope.ok = function() {$modalInstance.close()} + $scope.ok = function() {$modalInstance.close()} - $scope.print = function() { - $modalInstance.close(); - print_transit(); - } - }] + $scope.print = function() { + $modalInstance.close(); + print_transit(); + } + }] - }).result; + }).result; + } else {return}; }); }