From a46dbc98501fca2bc26f1b44f55f489a540d67f9 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 20 May 2011 12:45:08 -0400 Subject: [PATCH] Restore the Replace Barcode option in Holdings Maintenance, as the Edit Item menu will only serve the same duty if the unified volume/copy editor is activated via org setting (otherwise, it's just the Item Attribute Editor). klussier++ for the catch Signed-off-by: Jason Etheridge --- Open-ILS/web/opac/locale/en-US/lang.dtd | 1 + .../xul/staff_client/server/cat/copy_browser.js | 33 ++++++++++++++++++++++ .../xul/staff_client/server/cat/copy_browser.xul | 3 ++ 3 files changed, 37 insertions(+) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 3e15bd306e..bb362c7960 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2598,6 +2598,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.js b/Open-ILS/xul/staff_client/server/cat/copy_browser.js index 8c0ddafa8e..5f2ee1dd0d 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_browser.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.js @@ -387,6 +387,37 @@ cat.copy_browser.prototype = { } } ], + 'cmd_replace_barcode' : [ + ['command'], + function() { + try { + JSAN.use('util.functional'); + + var list = util.functional.filter_list( + obj.sel_list, + function (o) { + return o.split(/_/)[0] == 'acp'; + } + ); + + list = util.functional.map_list( + list, + function (o) { + var cloned_copy_obj = JSON2js( js2JSON( obj.map_acp[ o ] ) ); + cloned_copy_obj.call_number( obj.map_acn[ 'acn_' + cloned_copy_obj.call_number() ] ); + return cloned_copy_obj; + } + ); + + xulG.volume_item_creator( {'existing_copies':list, 'onrefresh' : function() { obj.refresh_list(); } } ); + + } catch(E) { + obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_items.error'),E); + obj.refresh_list(); + } + } + ], + 'old_cmd_edit_items' : [ ['command'], function() { @@ -1740,6 +1771,7 @@ cat.copy_browser.prototype = { obj.controller.view.cmd_add_items.setAttribute('disabled','true'); obj.controller.view.cmd_add_items_to_buckets.setAttribute('disabled','true'); obj.controller.view.cmd_edit_items.setAttribute('disabled','true'); + obj.controller.view.cmd_replace_barcode.setAttribute('disabled','true'); obj.controller.view.cmd_delete_items.setAttribute('disabled','true'); obj.controller.view.cmd_print_spine_labels.setAttribute('disabled','true'); obj.controller.view.cmd_add_volumes.setAttribute('disabled','true'); @@ -1771,6 +1803,7 @@ cat.copy_browser.prototype = { obj.controller.view.sel_mark_items_missing.setAttribute('disabled','false'); obj.controller.view.cmd_add_items_to_buckets.setAttribute('disabled','false'); obj.controller.view.cmd_edit_items.setAttribute('disabled','false'); + obj.controller.view.cmd_replace_barcode.setAttribute('disabled','false'); obj.controller.view.cmd_delete_items.setAttribute('disabled','false'); obj.controller.view.cmd_print_spine_labels.setAttribute('disabled','false'); obj.controller.view.cmd_transfer_items.setAttribute('disabled','false'); diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.xul b/Open-ILS/xul/staff_client/server/cat/copy_browser.xul index 240fceba2a..d161d121f5 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_browser.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.xul @@ -86,6 +86,7 @@ vim:noet:sw=4:ts=4: + @@ -129,6 +130,7 @@ vim:noet:sw=4:ts=4: + @@ -183,6 +185,7 @@ vim:noet:sw=4:ts=4: + -- 2.11.0