From fc78a83a2f25cafde03d37c4359f1a9d27137ee9 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Sat, 22 Aug 2020 00:40:55 -0400 Subject: [PATCH] lp1332651 do not strip internal spaces followup for Item Status Signed-off-by: Jason Etheridge --- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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); -- 2.11.0