const my_constants = {
'magical_statuses' : {
- '1' : 't', /* | Checked out | t */
- '3' : 't', /* | Lost | f */
- '6' : 't', /* | In transit | t */
- '8' : 't', /* | On holds shelf | t */
+ '1' : { 'disable_in_copy_editor' : true, 'block_mark_item_action' : true }, /* | Checked out | t */
+ '3' : { 'disable_in_copy_editor' : true, 'block_mark_item_action' : true }, /* | Lost | f */
+ '6' : { 'disable_in_copy_editor' : true, 'block_mark_item_action' : true }, /* | In transit | t */
+ '8' : { 'disable_in_copy_editor' : true, 'block_mark_item_action' : false }, /* | On holds shelf | t */
}
}
var magic_status = false;
for (var i = 0; i < copies.length; i++) {
var status = copies[i].status(); if (typeof status == 'object') status = status.id();
- if (typeof my_constants.magical_statuses[ status ] != 'undefined') magic_status = true;
+ if (typeof my_constants.magical_statuses[ status ] != 'undefined')
+ if (my_constants.magical_statuses[ status ].block_mark_item_action) magic_status = true;
}
if (magic_status) {
} else {
- var r = error.yns_alert('Change the status for these items to Damaged? You will have to manually retrieve the last circulation if you need to bill a patron. Barcodes: ' + util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", "), 'Mark Damaged', 'OK', 'Cancel', null, 'Check here to confirm this action');
+ var r = error.yns_alert('Change the status for these items to Damaged? You will have to manually retrieve the last circulation if you need to bill a patron. You will also have to manually adjust any pertinent holds. Barcodes: ' + util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", "), 'Mark Damaged', 'OK', 'Cancel', null, 'Check here to confirm this action');
if (r == 0) {
var count = 0;
var magic_status = false;
for (var i = 0; i < copies.length; i++) {
var status = copies[i].status(); if (typeof status == 'object') status = status.id();
- if (typeof my_constants.magical_statuses[ status ] != 'undefined') magic_status = true;
+ if (typeof my_constants.magical_statuses[ status ] != 'undefined')
+ if (my_constants.magical_statuses[ status ].block_mark_item_action) magic_status = true;
}
if (magic_status) {
} else {
- var r = error.yns_alert('Change the status for these items to Missing? Barcodes: ' + util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", "), 'Mark Missing', 'OK', 'Cancel', null, 'Check here to confirm this action');
+ var r = error.yns_alert('Change the status for these items to Missing? You will have to manually adjust any pertinent holds. Barcodes: ' + util.functional.map_list( copies, function(o) { return o.barcode(); } ).join(", "), 'Mark Missing', 'OK', 'Cancel', null, 'Check here to confirm this action');
if (r == 0) {
var count = 0;