From d7d1d516417c422f07e64b9e095bf5d89e41d6ad Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 11 Mar 2011 13:07:10 -0500 Subject: [PATCH] make sure we can create empty volumes straight away without needing to enter barcodes --- Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 71796ef52a..1c9933e0ea 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 @@ -306,7 +306,10 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) { ) { dump('handle_change_precipitating_barcode_rendering\n'); - if (isNaN( Number( number_of_copies_column_textbox.value ) )) return; + if (isNaN( Number( number_of_copies_column_textbox.value ) )) { + dump('1:handle_change_precipitating_barcode_rendering early return\n'); + return; + } if ( Number( number_of_copies_column_textbox.value ) > g_max_copies_that_can_be_added_at_a_time_per_volume ) { g.error.yns_alert($("catStrings").getFormattedString('staff.cat.volume_copy_creator.render_volume_count_entry.message', [g_max_copies_that_can_be_added_at_a_time_per_volume]), $("catStrings").getString('staff.cat.volume_copy_creator.render_volume_count_entry.title'), @@ -619,6 +622,7 @@ g.render_part_menuitems = function(menupopup) { g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) { try { + dump('g.render_barcode_entry(node,'+callnumber_composite_key+','+count+','+ou_id+'\n'); function ready_to_create(ev) { if (! xulG.unified_interface) { document.getElementById("EditThenCreate").disabled = false; @@ -689,6 +693,7 @@ g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) { } } + g.gather_copies_soon(); setTimeout( function() { if (g.first_focus) { g.first_focus.focus(); } }, 0 ); } catch(E) { @@ -954,6 +959,8 @@ g.vivicate_update_volumes = function() { 'FM_ACN_FIND_OR_CREATE', [ ses(), callnumber_data.acn_label, g.doc_id, ou_id, acnp_id, acns_id, acnc_id ] ); + dump('FM_ACN_FIND_OR_CREATE: label = ' + callnumber_data.acn_label + + ' doc = ' + g.doc_id + ' ou = ' + ou_id + ' acnp = ' + acnp_id + ' acns = ' + acns_id + ' acnc = ' + acnc_id + '\n'); if (typeof acn_blob.ilsevent != 'undefined') { alert('Error in g.vivicate_update_volumes, acn_id = ' + acn_id + ' acn_blob = ' + js2JSON(acn_blob)); -- 2.11.0