<!ENTITY staff.cat.copy_browser.actions.cmd_edit_items.accesskey "E">
<!ENTITY staff.cat.copy_browser.actions.cmd_transfer_items.label "Transfer Items to Previously Marked Volume">
<!ENTITY staff.cat.copy_browser.actions.cmd_transfer_items.accesskey "T">
+<!ENTITY staff.cat.copy_browser.actions.cmd_link_as_multi_bib.label "Link as Multi-Bib Items to Previously Marked Bib Record">
+<!ENTITY staff.cat.copy_browser.actions.cmd_link_as_multi_bib.accesskey "B">
<!ENTITY staff.cat.copy_browser.actions.cmd_add_volumes.label "Add Volumes">
<!ENTITY staff.cat.copy_browser.actions.cmd_add_volumes.accesskey "V">
<!ENTITY staff.cat.copy_browser.actions.cmd_mark_library.label "Mark Library as Volume Transfer Destination">
obj.refresh_list();
}
],
+
+ 'cmd_link_as_multi_bib' : [
+ ['command'],
+ function() {
+ try {
+ obj.data.stash_retrieve();
+ if (!obj.data.marked_multi_home_record) {
+ alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.link_as_multi_bib.missing_bib'));
+ return;
+ }
+
+ 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) {
+ return obj.map_acp[ o ].barcode();
+ }
+ );
+
+ xulG.new_tab(
+ window.xulG.url_prefix(urls.MANAGE_MULTI_HOME_ITEMS),
+ {},
+ { 'docid' : obj.data.marked_multi_home_record, 'barcodes' : list }
+ );
+
+ } catch(E) {
+ alert('Error in copy_browser.js, cmd_link_as_multi_bib: ' + E);
+ }
+ obj.refresh_list();
+ }
+ ]
}
}
);
<command id="cmd_edit_items"/>
<command id="cmd_delete_items"/>
<command id="cmd_transfer_items"/>
+ <command id="cmd_link_as_multi_bib"/>
<command id="cmd_print_spine_labels"/>
<command id="cmd_add_volumes"/>
<command id="cmd_edit_volumes"/>
<menuseparator/>
<menuitem command="cmd_edit_items" label="&staff.cat.copy_browser.actions.cmd_edit_items.label;" accesskey="&staff.cat.copy_browser.actions.cmd_edit_items.accesskey;"/>
<menuitem command="cmd_transfer_items" label="&staff.cat.copy_browser.actions.cmd_transfer_items.label;" accesskey="&staff.cat.copy_browser.actions.cmd_transfer_items.accesskey;"/>
+ <menuitem command="cmd_link_as_multi_bib" label="&staff.cat.copy_browser.actions.cmd_link_as_multi_bib.label;" accesskey="&staff.cat.copy_browser.actions.cmd_link_as_multi_bib.accesskey;"/>
<menuseparator/>
<menuitem command="cmd_add_volumes" label="&staff.cat.copy_browser.actions.cmd_add_volumes.label;" accesskey="&staff.cat.copy_browser.actions.cmd_add_volumes.accesskey;"/>
<menuitem command="cmd_mark_library" label="&staff.cat.copy_browser.actions.cmd_mark_library.label;" accesskey="&staff.cat.copy_browser.actions.cmd_mark_library.accesskey;"/>
<menuseparator/>
<menuitem command="cmd_edit_items" label="&staff.cat.copy_browser.holdings_maintenance.cmd_edit_items.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_edit_items.accesskey;"/>
<menuitem command="cmd_transfer_items" label="&staff.cat.copy_browser.holdings_maintenance.cmd_transfer_items.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_transfer_items.accesskey;"/>
+ <menuitem command="cmd_link_as_multi_bib" label="&staff.cat.copy_browser.actions.cmd_link_as_multi_bib.label;" accesskey="&staff.cat.copy_browser.actions.cmd_link_as_multi_bib.accesskey;"/>
<menuseparator/>
<menuitem command="cmd_add_volumes" label="&staff.cat.copy_browser.holdings_maintenance.cmd_add_volumes.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_add_volumes.accesskey;"/>
<menuitem command="cmd_mark_library" label="&staff.cat.copy_browser.holdings_maintenance.cmd_mark_library.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_mark_library.accesskey;"/>
-var data; var list; var error; var net; var pcrud; var sound;
+var data; var list; var error; var net; var sound;
var rows = {};
var bpbcm_barcode_map = {};
data.stash_retrieve();
JSAN.use('util.network'); net = new util.network();
dojo.require('openils.PermaCrud');
- pcrud = new openils.PermaCrud( { authtoken :ses() });
JSAN.use('cat.util');
init_menu();
}
}
-function handle_submit(create,my_bpbcm) {
+function handle_submit(create,my_bpbcm,my_barcode) {
try {
var barcode;
if (create) {
- barcode = $('scanbox').value;
- $('scanbox').value = '';
- default_focus();
+ if (my_barcode) {
+ barcode = my_barcode;
+ } else {
+ barcode = $('scanbox').value;
+ $('scanbox').value = '';
+ default_focus();
+ }
}
var placeholder_acp = new acp();
new_bpbcm.peer_type($('bpt_menu').value);
new_bpbcm.peer_record(xul_param('docid'));
new_bpbcm.target_copy(robj.copy.id());
+ var pcrud = new openils.PermaCrud( { authtoken :ses() });
pcrud.create(new_bpbcm, {
"onerror" : function(r) {
dump('onerror, r = ' + js2JSON(r) + '\n');
function populate_list() {
try {
+ var pcrud = new openils.PermaCrud( { authtoken :ses() });
pcrud.search(
'bpbcm',
{
alert('Error in manage_multi_home_items.js, populate_list(), pcrud.search onerror: ' + r);
},
oncomplete : function() {
+ if (xul_param('barcodes')) { // incoming from Holdings Maintenance
+ handle_barcodes( xul_param('barcodes') );
+ }
},
onresponse : function(r) {
try {
obj.peer_type( $('bpt_menu').value );
bpbcm_list.push( obj );
}
+ var pcrud = new openils.PermaCrud( { authtoken :ses() });
pcrud.update(
bpbcm_list, {
'async' : false,
obj.isdeleted(1);
bpbcm_list.push( obj );
}
+ var pcrud = new openils.PermaCrud( { authtoken :ses() });
pcrud.eliminate(
bpbcm_list, {
'async' : false,
alert('Error in manage_multi_home_items.js, handle_opac(): ' + E);
}
}
+
+function handle_barcodes(barcodes) {
+ try {
+ var funcs = [];
+
+ for (var i = 0; i < barcodes.length; i++) {
+ if (typeof rows[barcodes[i]] == 'undefined') {
+ funcs.push(
+ function(barcode) {
+
+ return function() {
+ handle_submit(true,null,barcode);
+ };
+
+ }(barcodes[i])
+ )
+ }
+ }
+
+ JSAN.use('util.exec'); var exec = new util.exec();
+ exec.timer( funcs, 500 );
+
+ funcs.push(
+ function() {
+ exec.clear_timer();
+ }
+ );
+
+ } catch(E) {
+ alert('Error in manage_multi_home_items.js, handle_barcodes(): ' + E);
+ }
+}
staff.cat.copy_browser.transfer.unexpected_error=All volumes not likely transferred.
staff.cat.copy_browser.transfer_items.missing_volume=Please mark a volume as the destination from within holdings maintenance and then try this again.
staff.cat.copy_browser.transfer_items.unexpected_error=All copies not likely transferred.
+staff.cat.copy_browser.link_as_multi_bib.missing_bib=Please Mark a bib record as a Target for Multi-Bib Items and try this again.
staff.cat.copy_browser.missing_library=Missing library list.
staff.cat.copy_browser.consortial_copy_count.error=Error retrieving consortial copy count.
staff.cat.copy_browser.list_init.tree_location=Location/Barcode