From: Jason Etheridge Date: Sat, 22 Aug 2020 04:40:55 +0000 (-0400) Subject: lp1332651 do not strip internal spaces followup X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fphasefx%2Flp1332651-internal-space-followup;p=working%2FEvergreen.git lp1332651 do not strip internal spaces followup for Item Status Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 2237d75db9..3ee36cae50 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -371,11 +371,9 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD var barcodes = []; angular.forEach(newVal.split(/\r?\n/), function(line) { - //remove all whitespace and commas - line = line.replace(/[\s,]+/g,''); - //Or remove leading/trailing whitespace - //line = line.replace(/(^[\s,]+|[\s,]+$/g,''); + line = line.replace(/^[\s,]+/g,'') + line = line.replace(/[\s,]+$/g,''); if (!line) return; barcodes.push(line); @@ -420,11 +418,9 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD var barcodes = []; //split on commas and clean up barcodes angular.forEach(args.barcode.split(/,/), function(line) { - //remove all whitespace and commas - line = line.replace(/[\s,]+/g,''); - //Or remove leading/trailing whitespace - //line = line.replace(/(^[\s,]+|[\s,]+$/g,''); + line = line.replace(/^[\s,]+/g,'') + line = line.replace(/[\s,]+$/g,''); if (!line) return; barcodes.push(line);