From cccc447cdf8c70149581e63b304e86bf08c6d13e Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 2 Jan 2007 19:48:18 +0000 Subject: [PATCH] revised circ-mod logic to search for the provided (as-is) circ-mod config, then the lower-cased version of the circ-mod config git-svn-id: svn://svn.open-ils.org/ILS/trunk@6716 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../javascript/backend/circ/circ_item_config.js | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Open-ILS/src/javascript/backend/circ/circ_item_config.js b/Open-ILS/src/javascript/backend/circ/circ_item_config.js index 15e7036776..87207f06b6 100644 --- a/Open-ILS/src/javascript/backend/circ/circ_item_config.js +++ b/Open-ILS/src/javascript/backend/circ/circ_item_config.js @@ -410,23 +410,24 @@ function getItemConfig() { provided circ_modifier, use that config. Otherwise fall back on the MARC item type ----------------------------------------------------------------------------------- */ var marcType = getMARCItemType(); - var circMod = (copy.circ_modifier) ? copy.circ_modifier.toLowerCase() : ''; var itemForm = (marcXMLDoc) ? extractFixedField(marcXMLDoc,'Form') : ""; + //var circMod = (copy.circ_modifier) ? copy.circ_modifier.toLowerCase() : ''; + var circMod = copy.circ_modifier; - var config; - - if( circMod && CIRC_MOD_MAP[circMod] ) { - /* if we have a config for the given circ_modifier, use it */ - log_debug("a circ_mod config exists for the copy: " + circMod); - config = CIRC_MOD_MAP[circMod]; - - } else { + var config = null; + + if( circMod ) { + config = CIRC_MOD_MAP[circMod]; + if(!config) + config = CIRC_MOD_MAP[circMod.toLowerCase()] + if(config) + log_info("a circ_mod config exists for the copy with mod: " + circMod); + } + + if(!config) { /* otherwise, fall back on the MARC item type */ - - if( circMod ) { - log_debug("no circ_mod config found for " - +circMod+", falling back to MARC"); - } + if( circMod ) + log_info("no circ_mod config found for " +circMod+", falling back to MARC"); config = MARC_ITEM_TYPE_MAP[marcType]; } -- 2.11.0