From: phasefx Date: Wed, 8 Sep 2010 06:49:34 +0000 (+0000) Subject: give OpenILS.data.lookup the ability to handle actor stat cats X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=44bb68257116716c227ab0e916cc4452e9399ba8;p=evergreen%2Fbjwebb.git give OpenILS.data.lookup the ability to handle actor stat cats git-svn-id: svn://svn.open-ils.org/ILS/trunk@17508 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index ad7459375..7ec636d26 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -184,6 +184,9 @@ OpenILS.data.prototype = { case 'acpl': found = obj.network.simple_request('FM_ACPL_RETRIEVE_VIA_ID.authoritative',[ value ]); break; + case 'actsc': + found = obj.network.simple_request('FM_ACTSC_RETRIEVE_VIA_PCRUD',[ ses(), { 'id' : { '=' : value } }]); + break; default: return undefined; break; } if (typeof found.ilsevent != 'undefined') throw(found); diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index 38a612c09..36e62febb 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -131,15 +131,7 @@ patron.summary.prototype = { for (var i = 0; i < entries.length; i++) { var stat_cat = obj.OpenILS.data.hash.my_actsc[ entries[i].stat_cat() ]; if (!stat_cat) { - stat_cat = obj.OpenILS.data.hash.actsc[ entries[i].stat_cat() ]; - } - if (!stat_cat) { - var robj = obj.network.simple_request('FM_ACTSC_RETRIEVE_VIA_PCRUD',[ ses(), { 'id' : { '=' : entries[i].stat_cat() } }]); - if (typeof robj == 'object' && typeof robj.ilsevent != 'undefined') { - obj.OpenILS.data.hash.actsc[ entries[i].stat_cat() ] = robj; - obj.OpenILS.data.stash( 'hash' ); - stat_cat = robj; - } + stat_cat = obj.OpenILS.data.lookup('actsc',entries[i].stat_cat()); } if (!stat_cat) { continue; } if (get_bool( stat_cat.usr_summary() )) {