From 20020046437ff268fe15c45378e1ee22a63865f4 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 23 Nov 2016 08:21:34 -0500 Subject: [PATCH] Restoring selfcheck.js to stock version --- .../web/js/ui/default/circ/selfcheck/selfcheck.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js index ae748bbe29..3959fbca07 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -100,8 +100,7 @@ function SelfCheckManager() { this.checkouts = []; this.itemsOut = []; - this.holds = []; - this.fines = []; + this.holds = []; // During renewals, keep track of the ID of the previous circulation. // Previous circ is used for tracking failed renewals (for receipts). @@ -332,12 +331,8 @@ SelfCheckManager.prototype.loadOrgSettings = function() { this.orgSettings[k] = settings[k].value; } - if(settings[SET_BARCODE_REGEX]) { + if(settings[SET_BARCODE_REGEX]) this.patronBarcodeRegex = new RegExp(settings[SET_BARCODE_REGEX].value); - } else { - this.patronBarcodeRegex = new RegExp(/^\d/); - // this assumes barcodes start with digits - } // Subtract the timeout warning interval from the configured timeout // so that when taken together they add up to the configured amount. @@ -815,8 +810,6 @@ SelfCheckManager.prototype.drawHoldsPage = function() { return; } - self.holds = ids; - fieldmapper.standardRequest( // fetch the hold objects with fleshed details ['open-ils.circ', 'open-ils.circ.hold.details.batch.retrieve'], { async : true, @@ -827,7 +820,6 @@ SelfCheckManager.prototype.drawHoldsPage = function() { } } ); - } } ); @@ -1452,6 +1444,7 @@ SelfCheckManager.prototype.printData = function(data, numItems, callback) { * Print a receipt for this user's items out */ SelfCheckManager.prototype.printItemsOutReceipt = function(callback) { + if(!this.itemsOut.length) return; progressDialog.show(true); @@ -1494,6 +1487,7 @@ SelfCheckManager.prototype.printItemsOutReceipt = function(callback) { * Print a receipt for this user's holds */ SelfCheckManager.prototype.printHoldsReceipt = function(callback) { + if(!this.holds.length) return; progressDialog.show(true); @@ -1533,7 +1527,8 @@ SelfCheckManager.prototype.printHoldsReceipt = function(callback) { null, 'format.selfcheck.holds', 'print-on-demand', - this.holds + holdIds, + holdData ]; var self = this; @@ -1605,7 +1600,7 @@ SelfCheckManager.prototype.printFinesReceipt = function(callback) { null, 'format.selfcheck.fines', 'print-on-demand', - this.patron.id() + [this.patron.id()] ]; var self = this; -- 2.11.0