<command id="cmd_local_admin_work_log" />
<command id="cmd_local_admin_patrons_due_refunds" />
<command id="cmd_local_admin_copy_template" />
+ <command id="cmd_local_admin_item_attribute_editor" />
<command id="cmd_local_admin_address_alert"
perm="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT" />
<command id="cmd_local_admin_circ_limit_set"
<menuitem label="&staff.main.menu.admin.local_admin.conify.copy_location_order.label;" command="cmd_local_admin_copy_location_order"/>
<menuitem label="&staff.main.menu.admin.local_admin.copy_location_group.label;" command="cmd_local_admin_copy_location_group"/>
<menuitem label="&staff.main.menu.admin.local_admin.copy_template.label;" accesskey="&staff.main.menu.admin.local_admin.copy_template.accesskey;" command="cmd_local_admin_copy_template"/>
+ <menuitem label="&staff.main.menu.admin.local_admin.item_attribute_editor.label;" accesskey="&staff.main.menu.admin.local_admin.item_attribute_editor.accesskey;" command="cmd_local_admin_item_attribute_editor"/>
<menuitem label="&staff.main.menu.admin.local_admin.conify.idl_field_doc.label;" command="cmd_local_admin_idl_field_doc"/>
<menuitem label="&staff.main.menu.admin.local_admin.conify.grp_penalty_threshold.label;" command="cmd_local_admin_grp_penalty_threshold"/>
<menuitem label="&staff.main.menu.admin.local_admin.hold_matrix_matchpoint.label;" command="cmd_local_admin_hold_matrix_matchpoint"/>
g.callnumbers = xul_param('callnumbers',{'concat':true,'JSON2js_if_cgi':true,'JSON2js_if_xpcom':true,'stash_name':'temp_callnumbers','clear_xpcom':true});
/******************************************************************************************************/
+ /* If invoked from the Local Admin menu, rig up a fake item and disable save/create functionality */
+
+ if (xulG.admin) {
+ xulG.edit = 1;
+ var fake_item = new acp();
+ fake_item.id( -1 );
+ fake_item.barcode( 'fake_item' );
+ fake_item.call_number( -1 );
+ fake_item.circ_lib(ses('ws_ou'));
+ /* FIXME -- use constants; really, refactor this into a library somewhere that can be used by chrome and
+ remote xul for new copies */
+ fake_item.deposit(0);
+ fake_item.price(0);
+ fake_item.deposit_amount(0);
+ fake_item.fine_level(2); // Normal
+ fake_item.loan_duration(2); // Normal
+ fake_item.location(1); // Stacks
+ fake_item.status(0);
+ fake_item.circulate(get_db_true());
+ fake_item.holdable(get_db_true());
+ fake_item.opac_visible(get_db_true());
+ fake_item.ref(get_db_false());
+ fake_item.mint_condition(get_db_true());
+ g.copies = [ fake_item ];
+ $('save').hidden = true;
+ $('save').disabled = true;
+ $('non_unified_buttons').hidden = true;
+ }
+
+ /******************************************************************************************************/
/* Get preference (if it exists) for copy location label order */
g.cl_first = false; // Default to legacy OU first mode
g.map_acn[copy.call_number()] = volume;
}
var old_volume = g.map_acn[copy.call_number()];
- var acn_blob = g.network.simple_request(
- 'FM_ACN_FIND_OR_CREATE',
- [ses(),old_volume.label(),old_volume.record(),ou_id,old_volume.prefix().id(),old_volume.suffix().id(),old_volume.label_class().id()]
- );
+ var acn_blob;
+ if (! xulG.admin) {
+ acn_blob = g.network.simple_request(
+ 'FM_ACN_FIND_OR_CREATE',
+ [ses(),old_volume.label(),old_volume.record(),ou_id,old_volume.prefix().id(),old_volume.suffix().id(),old_volume.label_class().id()]
+ );
+ } else {
+ acn_blob = { 'acn_id' : -1 }; // spawned from Local Admin menu, so fake item and call number
+ }
if (typeof acn_blob.ilsevent != 'undefined') {
g.error.standard_unexpected_error_alert($('catStrings').getFormattedString('staff.cat.copy_editor.apply_owning_lib.call_number.error', [copy.barcode()]), acn_blob);
continue;
g.safe_to_change_owning_lib = function() {
try {
if (xulG.unified_interface) { return false; }
+ if (xulG.admin) { return false; }
var safe = true;
for (var i = 0; i < g.copies.length; i++) {
var cn = g.copies[i].call_number();