From 89420eb104cdecd3b9c05e9f96f3269715b56fbd Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 21 Oct 2009 08:12:16 +0000 Subject: [PATCH] use batch api call for post-checkin backdating git-svn-id: svn://svn.open-ils.org/ILS/trunk@14513 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/chrome/content/main/constants.js | 1 + .../staff_client/server/circ/backdate_post_checkin.js | 12 ++++++++++-- .../staff_client/server/circ/backdate_post_checkin.xul | 2 +- Open-ILS/xul/staff_client/server/circ/checkin.js | 4 +++- Open-ILS/xul/staff_client/server/circ/util.js | 18 +++++++++++------- 5 files changed, 26 insertions(+), 11 deletions(-) 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 8c5f85fba4..b7f7745818 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -191,6 +191,7 @@ const api = { 'FM_CIRC_IMPROVED_COUNT_VIA_COPY' : { 'app' : 'open-ils.pcrud', 'method' : 'open-ils.pcrud.search.circbyyr.atomic' }, 'FM_CIRC_EDIT_DUE_DATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.circulation.due_date.update' }, 'FM_CIRC_BACKDATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.post_checkin_backdate' }, + 'FM_CIRC_BACKDATE_BATCH' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.post_checkin_backdate.batch.atomic' }, 'FM_CIT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.ident_types.retrieve', 'secure' : false }, 'FM_CITM_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.item_type_map.retrieve.all', 'secure' : false }, 'FM_CNAL_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.net_access_level.retrieve.all', 'secure' : false }, diff --git a/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.js b/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.js index aab214c49d..cf40bb1399 100644 --- a/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.js @@ -27,8 +27,16 @@ function backdate_post_checkin_init() { $('checkin_effective_datepicker').value = util.date.formatted_date(new Date(),'%F'); - $('circ_brief').setAttribute('src', urls.XUL_CIRC_BRIEF); - get_contentWindow($('circ_brief')).xulG = { 'circ_id' : xul_param('circ_id',{'modal_xulG':true}) }; + var x = $('circ_brief_area'); + var circ_ids = xul_param('circ_ids',{'modal_xulG':true}); + dojo.forEach( + circ_ids, + function(element,idx,list) { + var iframe = document.createElement('iframe'); x.appendChild(iframe); + iframe.setAttribute('src', urls.XUL_CIRC_BRIEF); + get_contentWindow(iframe).xulG = { 'circ_id' : element }; + } + ); /* set widget behavior */ $('cancel_btn').addEventListener( diff --git a/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.xul b/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.xul index ffed058da0..103dd22c50 100644 --- a/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.xul +++ b/Open-ILS/xul/staff_client/server/circ/backdate_post_checkin.xul @@ -36,7 +36,7 @@ -