Restore the Replace Barcode option in Holdings Maintenance, as the Edit Item menu...
authorJason Etheridge <jason@esilibrary.com>
Fri, 20 May 2011 16:45:08 +0000 (12:45 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 20 May 2011 16:47:29 +0000 (12:47 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/cat/copy_browser.js
Open-ILS/xul/staff_client/server/cat/copy_browser.xul

index 3e15bd3..bb362c7 100644 (file)
 <!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_print_spine_labels.label "Print Item Spine Labels">
 <!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_print_spine_labels.accesskey "P">
 <!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.label "Replace Barcode">
+<!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.accesskey "R">
 <!ENTITY staff.cat.copy_browser.holdings_maintenance.save_columns.label "Save Columns">
 <!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.label "Refresh Listing">
 <!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.accesskey "R">
index 8c0ddaf..5f2ee1d 100644 (file)
@@ -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');
index 240fceb..d161d12 100644 (file)
@@ -86,6 +86,7 @@ vim:noet:sw=4:ts=4:
         <command id="cmd_add_items"/>
         <command id="cmd_add_items_to_buckets"/>
         <command id="cmd_edit_items"/>
+        <command id="cmd_replace_barcode"/>
         <command id="cmd_delete_items"/>
         <command id="cmd_transfer_items"/>
         <command id="cmd_link_as_multi_bib"/>
@@ -129,6 +130,7 @@ vim:noet:sw=4:ts=4:
             <menuitem command="sel_mark_items_missing" label="&staff.cat.copy_browser.actions.sel_mark_items_missing.label;" accesskey="&staff.cat.copy_browser.actions.sel_mark_items_missing.accesskey;"/>
             <menuseparator/>
             <menuitem command="cmd_print_spine_labels" label="&staff.cat.copy_browser.actions.cmd_print_spine_labels.label;" accesskey="&staff.cat.copy_browser.actions.cmd_print_spine_labels.accesskey;"/>
+            <menuitem command="cmd_replace_barcode" label="&staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.accesskey;"/>
             <menuitem command="save_columns" label="&staff.cat.copy_browser.actions.save_columns.label;"/>
             <menuitem command="cmd_refresh_list" label="&staff.cat.copy_browser.actions.cmd_refresh_list.label;" accesskey="&staff.cat.copy_browser.actions.cmd_refresh_list.accesskey;"/>
         </popup>
@@ -183,6 +185,7 @@ vim:noet:sw=4:ts=4:
                         <menuitem command="sel_mark_items_missing" label="&staff.cat.copy_browser.holdings_maintenance.sel_mark_items_missing.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.sel_mark_items_missing.accesskey;"/>
                         <menuseparator/>
                         <menuitem command="cmd_print_spine_labels" label="&staff.cat.copy_browser.holdings_maintenance.cmd_print_spine_labels.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_print_spine_labels.accesskey;"/>
+                        <menuitem command="cmd_replace_barcode" label="&staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.accesskey;"/>
                         <menuitem command="save_columns" label="&staff.cat.copy_browser.holdings_maintenance.save_columns.label;"/>
                         <menuitem command="cmd_refresh_list" label="&staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.accesskey;"/>
                     </menupopup>