From ea27fde5470d45bdbd73bf4ff8b0af2dfa0d8516 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Wed, 1 Jun 2011 03:21:06 -0400 Subject: [PATCH] for the Circulate as Type column in xul lists, display the actual citm value instead of the code Signed-off-by: Jason Etheridge Signed-off-by: Galen Charlton --- Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js | 8 +++++++- Open-ILS/xul/staff_client/server/circ/util.js | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js index e3effb52a6..bfb015c023 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js @@ -178,7 +178,13 @@ function load_item() { set("call_number", acn_obj.label()); }); } - set("circ_as_type", details.copy.circ_as_type()); + set("circ_as_type", details.copy.circ_as_type() != null && details.copy.circ_as_type() == 'object' + ? details.copy.circ_as_type() + : ( typeof data.hash.citm[ details.copy.circ_as_type() ] != 'undefined' + ? data.hash.citm[ details.copy.circ_as_type() ].value + : '' + ) + ); set("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().shortname() : data.hash.aou[ details.copy.circ_lib() ].shortname()); set_tooltip("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().name() : data.hash.aou[ details.copy.circ_lib() ].name()); var cm = details.copy.circ_modifier(); diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 062665c1fc..5351da149f 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1074,7 +1074,14 @@ circ.util.columns = function(modify,params) { 'flex' : 1, 'primary' : false, 'hidden' : true, - 'editable' : false, 'render' : function(my) { return my.acp.circ_as_type(); } + 'editable' : false, 'render' : function(my) { + return my.acp.circ_as_type() != null && my.acp.circ_as_type() == 'object' + ? my.acp.circ_as_type() + : ( typeof data.hash.citm[ my.acp.circ_as_type() ] != 'undefined' + ? data.hash.citm[ my.acp.circ_as_type() ].value + : '' + ); + } }, { 'persist' : 'hidden width ordinal', -- 2.11.0