return dojo.query('[name='+name+']', context)[0];
}
+// for caching linked users. e.g. lineitem_detail.receiver
+var userCache = {};
var liDetailBatchFields = ['fund', 'owning_lib', 'location', 'collection_code', 'circ_modifier', 'cn_label'];
var liDetailFields = liDetailBatchFields.concat(['barcode', 'note']);
acqLitCopyCountInput.attr('value', self.copyCount()+'');
+ var rcvr = copy.receiver();
+ if (rcvr) {
+ if (!userCache[rcvr]) {
+ if(rcvr == openils.User.user.id()) {
+ userCache[rcvr] = openils.User.user;
+ } else {
+ userCache[rcvr] = fieldmapper.standardRequest(
+ ['open-ils.actor', 'open-ils.actor.user.retrieve'],
+ {params: [openils.User.authtoken, rcvr]}
+ );
+ }
+ }
+ dojo.query('[name=receiver]', row)[0].innerHTML = userCache[rcvr].usrname();
+ }
+
dojo.forEach(liDetailFields,
function(field) {
var searchFilter;
readOnly = true;
}
+
var widget = new openils.widget.AutoFieldWidget({
fmObject : copy,
fmField : field,
<td>Callnumber</td>
<td>Barcode</td>
<td>Notes</td>
+ <td>Receiver</td>
<td colspan='0'></td>
</tr>
</tbody>
<td><div name='cn_label'></div></td>
<td><div name='barcode'></div></td>
<td><div name='note'></div></td>
+ <td><div name='receiver'></div></td>
<td><a href="javascript:void(0);" name="receive">Mark Received</a><a href="javascript:void(0);" name="unreceive">Un-Receive</a> <a href="javascript:void(0);" name="cancel">Cancel</a><span class="hidden" name="cancel_reason"></span> <a href="javascript:void(0);" name="claim">Claim</a></td>
<td><div name='delete' dojoType='dijit.form.Button' style='color:red;' scrollOnFocus='false'>X</div></td>
</tr>