Support barcode autocompletion in copy buckets
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 9 Feb 2012 21:37:48 +0000 (16:37 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 18 Dec 2012 04:11:35 +0000 (23:11 -0500)
By request of our staff, who are lazy.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/xul/staff_client/server/cat/copy_buckets.js

index 47a9a28..3e470ed 100644 (file)
@@ -704,6 +704,13 @@ cat.copy_buckets.prototype = {
         var obj = this;
         try {
             var barcode = obj.controller.view.copy_bucket_barcode_entry_textbox.value;
+            var barcode_object = xulG.get_barcode(window, 'asset', barcode);
+            // user_false means the user said "None of the above", so abort without further prompts/actions
+            if(barcode_object == "user_false") return;
+            if(barcode_object && barcode_object.barcode) {
+                barcode = barcode_object.barcode;
+            }
+
             var copy_obj = obj.network.simple_request('FM_ACP_DETAILS_VIA_BARCODE',[ses(),barcode]);
             if (copy_obj == null) {
                 throw(document.getElementById('circStrings').getString('staff.circ.copy_status.status.null_result'));