don't create copies if editor is closed. Don't allow empty barcodes to get into...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 06:01:29 +0000 (06:01 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 06:01:29 +0000 (06:01 +0000)
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
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul

index 343e90f..90b1a6b 100644 (file)
@@ -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 */
index 8e9f3df..bfdac19 100644 (file)
@@ -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 = [];
index 59e8bc8..c820fda 100644 (file)
@@ -39,8 +39,8 @@
                <hbox style="border-bottom: solid black thin">
                        <hbox id="marc_cn"/>
                        <spacer flex="1" />
-                       <checkbox id="print_labels" label="Print Labels" persist="checked"/>
-                       <button id="Create" accesskey="C" label="Create" disabled="true" oncommand="g.stash_and_close();"/>
+                       <checkbox id="print_labels" label="Print Labels" persist="checked" accesskey="P"/>
+                       <button id="Create" accesskey="C" label="Edit then Create" disabled="true" oncommand="g.stash_and_close();"/>
                </hbox>
                <grid flex="1">
                        <columns> <column flex="0"/> <column flex="0"/> <column flex="1"/> </columns>