Restoring selfcheck.js to stock version
authorChris Sharp <csharp@georgialibraries.org>
Wed, 23 Nov 2016 13:21:34 +0000 (08:21 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 23 Nov 2016 13:21:34 +0000 (08:21 -0500)
Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js

index ae748bb..3959fbc 100644 (file)
@@ -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;