From: phasefx Date: Mon, 14 Aug 2006 19:57:01 +0000 (+0000) Subject: tweak magical statuses and mark item actions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa7799c9ffb3de17e348ed3698e74f841c5481e8;p=Evergreen.git tweak magical statuses and mark item actions git-svn-id: svn://svn.open-ils.org/ILS/trunk@5501 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 1d6a0a57cd..f833d295ff 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -2,10 +2,10 @@ dump('Loading constants.js\n'); 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 */ } } diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index fef6f332e5..ea107e00e1 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -205,7 +205,8 @@ cat.util.mark_item_damaged = function(copy_ids) { 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) { @@ -213,7 +214,7 @@ cat.util.mark_item_damaged = function(copy_ids) { } 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; @@ -246,7 +247,8 @@ cat.util.mark_item_missing = function(copy_ids) { 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) { @@ -254,7 +256,7 @@ cat.util.mark_item_missing = function(copy_ids) { } 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;