From 4eb066033edea348660a0e54a45cdec8528804dc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 2 Jul 2013 19:36:53 +0300 Subject: [PATCH] Trim whitespace from beginning and end of the barcode in checkout. Signed-off-by: Pasi Kallinen Signed-off-by: Ben Shum --- Open-ILS/xul/staff_client/server/circ/checkout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index 56d5ef8650..78ae98b613 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -113,7 +113,7 @@ circ.checkout.prototype = { ['keypress'], function(ev) { if (ev.keyCode && ev.keyCode == 13) { - obj.checkout( { barcode: ev.target.value } ); + obj.checkout( { barcode: ev.target.value.trim() } ); } } ], @@ -143,7 +143,7 @@ circ.checkout.prototype = { if (obj.controller.view.checkout_menu.value == 'barcode' || obj.controller.view.checkout_menu.value === '') { - params.barcode = obj.controller.view.checkout_barcode_entry_textbox.value; + params.barcode = obj.controller.view.checkout_barcode_entry_textbox.value.trim(); } else { params.noncat = 1; params.noncat_type = obj.controller.view.checkout_menu.value; -- 2.43.2