From: Jason Etheridge Date: Wed, 2 Mar 2011 06:37:53 +0000 (-0500) Subject: enable actual volume/item creation in unified interface X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmasslnc-vol-item-ui;p=evergreen%2Fequinox.git enable actual volume/item creation in unified interface --- 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 9b9d57fd35..8c1ffff9ff 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -185,7 +185,10 @@ function my_init() { } catch(E) { alert('Error in copy_editor.js, xulG.refresh_copy_editor(): ' + E); } - } + }; + xulG.unlock_copy_editor = function() { + oils_unlock_page(); + }; } } catch(E) { 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 37d1500ced..3b8805e0c4 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 @@ -23,6 +23,8 @@ function my_init() { if (xulG.unified_interface) { $('non_unified_buttons').hidden = true; + } else { + $('Create').hidden = true; } /***********************************************************************************************************/ @@ -47,11 +49,15 @@ function my_init() { set_attr('EditThenCreate','accesskey','staff.cat.volume_copy_creator.edit_then_rebarcode.btn.accesskey'); set_attr('CreateWithDefaults','label','staff.cat.volume_copy_creator.rebarcode.btn.label'); set_attr('CreateWithDefaults','accesskey','staff.cat.volume_copy_creator.rebarcode.btn.accesskey'); + set_attr('Create','label','staff.cat.volume_copy_creator.rebarcode.btn.label'); + set_attr('Create','accesskey','staff.cat.volume_copy_creator.rebarcode.btn.accesskey'); } else { set_attr('EditThenCreate','label','staff.cat.volume_copy_creator.edit_then_create.btn.label'); set_attr('EditThenCreate','accesskey','staff.cat.volume_copy_creator.edit_then_create.btn.accesskey'); set_attr('CreateWithDefaults','label','staff.cat.volume_copy_creator.create_with_defaults.btn.label'); set_attr('CreateWithDefaults','accesskey','staff.cat.volume_copy_creator.create_with_defaults.btn.accesskey'); + set_attr('Create','label','staff.cat.volume_copy_creator.create.btn.label'); + set_attr('Create','accesskey','staff.cat.volume_copy_creator.create.btn.accesskey'); } //g.error.sdump('D_ERROR','location.href = ' + location.href + '\n\ncopy_short cut = ' + g.copy_shortcut + '\n\nou_ids = ' + xul_param('ou_ids')); @@ -231,6 +237,8 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) { if (! xulG.unified_interface) { document.getElementById("EditThenCreate").disabled = false; document.getElementById("CreateWithDefaults").disabled = false; + } else { + document.getElementById("Create").disabled = false; } } @@ -321,6 +329,8 @@ g.render_barcode_entry = function(node,callnumber,count,ou_id) { if (! xulG.unified_interface) { document.getElementById("EditThenCreate").disabled = false; document.getElementById("CreateWithDefaults").disabled = false; + } else { + document.getElementById("Create").disabled = false; } } @@ -521,7 +531,12 @@ g.stash_and_close = function(param) { try { - var copies = g.gather_copies(); + var copies; + if (xulG.unified_interface) { + copies = xulG.copies; + } else { + copies = g.gather_copies(); + } var dont_close = false; JSAN.use('util.window'); var win = new util.window(); @@ -562,6 +577,10 @@ g.stash_and_close = function(param) { try { if (typeof window.refresh == 'function') { window.refresh(); } } catch(E) { dump(E+'\n'); } try { if (typeof g.refresh == 'function') { g.refresh(); } } catch(E) { dump(E+'\n'); } + if (typeof xulG.unlock_copy_editor == 'function') { + xulG.unlock_copy_editor(); + } + if (! dont_close) { xulG.close_tab(); } } catch(E) { 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 0a2ddb45ed..4d62a96887 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 @@ -56,10 +56,13 @@ - + -