From e28ef5d213bc71173c46a5776d49ff185799b3d2 Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 4 Aug 2006 06:01:29 +0000 Subject: [PATCH] don't create copies if editor is closed. Don't allow empty barcodes to get into editor. wording git-svn-id: svn://svn.open-ils.org/ILS/trunk@5280 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 1 + Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js | 2 +- Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 343e90f196..90b1a6b48b 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -43,6 +43,7 @@ function my_init() { if (window.xulG && window.xulG.copies) g.copies = g.copies.concat( window.xulG.copies ); if (g.cgi.param('copies')) g.copies = g.copies.concat( JSON2js( g.cgi.param('copies') ) ); if (g.data.temp_copies != 'undefined' && g.data.temp_copies) g.copies = g.copies.concat( JSON2js( g.data.temp_copies ) ); + g.data.temp_copies = null; g.data.stash('temp_copies'); /******************************************************************************************************/ /* We try to retrieve callnumbers for existing copies, but for new copies, we rely on this */ diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index 8e9f3df658..bfdac19ec5 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -305,7 +305,7 @@ g.stash_and_close = function() { if (typeof volumes_hash[ou_id] == 'undefined') { volumes_hash[ou_id] = {} } if (typeof volumes_hash[ou_id][callnumber] == 'undefined') { volumes_hash[ou_id][callnumber] = [] } - volumes_hash[ou_id][callnumber].push( barcode ); + if (barcode != '') volumes_hash[ou_id][callnumber].push( barcode ); } var volumes = []; diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul index 59e8bc86ef..c820fda923 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul @@ -39,8 +39,8 @@ - -