From: erickson Date: Mon, 28 Aug 2006 18:30:46 +0000 (+0000) Subject: fleshing copy location on fetch instead of fetching all copy locations X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a91576645217ce946ab9c0f55b52d3a92a66fb36;p=Evergreen.git fleshing copy location on fetch instead of fetching all copy locations fleshing less data on the user object for speed git-svn-id: svn://svn.open-ils.org/ILS/trunk@5735 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.js b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.js index 948e275866..54cb3d2215 100644 --- a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.js +++ b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.js @@ -1,7 +1,6 @@ var FETCH_HOLD_LIST = 'open-ils.circ:open-ils.circ.hold_pull_list.retrieve'; -var FETCH_COPY_LOCATIONS = 'open-ils.circ:open-ils.circ.copy_location.retrieve.all'; -var FETCH_COPY = 'open-ils.search:open-ils.search.asset.copy.retrieve'; +var FETCH_COPY = 'open-ils.search:open-ils.search.asset.copy.fleshed.custom'; var FETCH_USER = 'open-ils.actor:open-ils.actor.user.fleshed.retrieve'; var FETCH_VOLUME = 'open-ils.search:open-ils.search.callnumber.retrieve'; @@ -10,8 +9,6 @@ var HOLD_LIST_LIMIT = 50; var numHolds = 0; var listOffset = 0; -var copyLocations = null; - function pullListInit() { fetchUser(); @@ -19,17 +16,10 @@ function pullListInit() { $('pl_org').appendChild(text(findOrgUnit(USER.ws_ou()).name())); setTimeout( function() { fetchHighestPermOrgs( SESSION, USER.id(), myPerms ); - pullListFetchCopyLocations(); pullListFetchHolds(); }, 20 ); } -function pullListFetchCopyLocations() { - var req = new Request(FETCH_COPY_LOCATIONS); - req.send(true); - copyLocations = req.result(); -} - function pullListFetchHolds() { var req = new Request(FETCH_HOLD_LIST, SESSION, HOLD_LIST_LIMIT, listOffset ); req.callback(pullListDrawHolds); @@ -71,13 +61,13 @@ function pullListDrawHold( tbody, row, hold, idx ) { pullListDrawTitle( tbody, row, hold, idx, r.getResultObject() ); }); treq.send(); - var creq = new Request( FETCH_COPY, hold.current_copy() ); + var creq = new Request( FETCH_COPY, hold.current_copy(), ['location'] ); creq.callback( function(r) { pullListDrawCopy( tbody, row, hold, idx, r.getResultObject() ); }); creq.send(); - var ureq = new Request( FETCH_USER, SESSION, hold.usr() ); + var ureq = new Request( FETCH_USER, SESSION, hold.usr(), ['card'] ); ureq.callback( function(r) { pullListDrawUser( tbody, row, hold, idx, r.getResultObject() ); }); @@ -96,14 +86,9 @@ function pullListDrawTitle( tbody, row, hold, idx, record ) { function pullListDrawCopy( tbody, row, hold, idx, copy ) { + $n(row, 'barcode').appendChild(text(copy.barcode())); - for( var l in copyLocations ) { - var loc = copyLocations[l]; - if( loc.id() == copy.location() ) { - $n(row, 'copy_location').appendChild(text(loc.name())); - break; - } - } + $n(row, 'copy_location').appendChild(text(copy.location().name())); $n(row, 'copy_number').appendChild(text(copy.copy_number())); var vreq = new Request(FETCH_VOLUME, copy.call_number());