From 51c1061a6271bd746732760ce1eb2162666049dc Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Sun, 1 Feb 2015 15:55:39 -0500 Subject: [PATCH] LP#1402797 Make Strict Barcode checkbox sticky upon actual use Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/circ/checkin/app.js | 4 ++++ Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js | 4 ++++ Open-ILS/web/js/ui/default/staff/circ/renew/app.js | 3 +++ 3 files changed, 11 insertions(+) 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 dd3fe8f622..d0407c6403 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 @@ -49,6 +49,9 @@ function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataPro $scope.grid_persist_key = $scope.is_capture ? 'circ.checkin.capture' : 'circ.checkin.checkin'; + egCore.hatch.getItem('circ.checkin.strict_barcode') + .then(function(sb){ $scope.strict_barcode = sb }); + egCore.org.settings([ 'ui.circ.suppress_checkin_popups' // add other settings as needed ]).then(function(set) { @@ -143,6 +146,7 @@ function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataPro } } + egCore.hatch.setItem('circ.checkin.strict_barcode', $scope.strict_barcode); var options = { check_barcode : $scope.strict_barcode, no_precat_alert : $scope.modifiers.no_precat_alert, diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index 1dff72bf8d..9806d8f04b 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -36,6 +36,9 @@ function($scope , $q , $modal , $routeParams , egCore , egUser , patronSvc , $scope.using_hatch = egCore.hatch.usingHatch(); + egCore.hatch.getItem('circ.checkout.strict_barcode') + .then(function(sb){ $scope.strict_barcode = sb }); + // avoid multiple, in-flight attempts on the same barcode var pending_barcodes = {}; @@ -110,6 +113,7 @@ function($scope , $q , $modal , $routeParams , egCore , egUser , patronSvc , $scope.checkouts.unshift(row_item); $scope.gridDataProvider.refresh(); + egCore.hatch.setItem('circ.checkout.strict_barcode', $scope.strict_barcode); var options = {check_barcode : $scope.strict_barcode}; egCirc.checkout(params, options).then( diff --git a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js index c64c66c40f..85ed29427c 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js @@ -32,6 +32,8 @@ angular.module('egRenewApp', ['$scope','$window','$location','egCore','egGridDataProvider','egCirc', function($scope , $window , $location , egCore , egGridDataProvider , egCirc) { + egCore.hatch.getItem('circ.renew.strict_barcode') + .then(function(sb){ $scope.strict_barcode = sb }); $scope.focusBarcode = true; $scope.renewals = []; @@ -90,6 +92,7 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) { $scope.renewals.unshift(row_item); $scope.gridDataProvider.refresh(); + egCore.hatch.setItem('circ.renew.strict_barcode', $scope.strict_barcode); var options = {check_barcode : $scope.strict_barcode}; egCirc.renew(params, options).then( -- 2.11.0