From f944607711769650f3ecff61e1c5a6f6d0c54d37 Mon Sep 17 00:00:00 2001 From: pines Date: Wed, 6 Sep 2006 03:42:34 +0000 Subject: [PATCH] handle object or id for mbts git-svn-id: svn://svn.open-ils.org/ILS/trunk@5970 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../server/patron/bill_history.xul | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill_history.xul b/Open-ILS/xul/staff_client/server/patron/bill_history.xul index 4502182c5f..a8f2661a07 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_history.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill_history.xul @@ -66,7 +66,27 @@ function gen_func(r) { return function() { - g.bill_list.append( { 'retrieve_id' : r, 'row' : {} } ); + if (typeof r == 'object') { + g.bill_list.append( + { + 'retrieve_id' : r.id(), + 'row' : { + 'my' : { + 'mbts' : r + } + } + } + ); + } else { + g.bill_list.append( + { + 'retrieve_id' : r, + 'row' : { + 'my' : {} + } + } + ); + } } } @@ -186,9 +206,11 @@ var id = params.retrieve_id; var row = params.row; if (id) { - var mbts_obj = g.network.simple_request('FM_MBTS_RETRIEVE',[ses(),id]); if (typeof row.my == 'undefined') row.my = {}; - row.my.mbts = mbts_obj; + if ( typeof row.my.mbts == 'undefined' ) { + var mbts_obj = g.network.simple_request('FM_MBTS_RETRIEVE',[ses(),id]); + row.my.mbts = mbts_obj; + } } if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); -- 2.43.2