From: Jason Etheridge Date: Fri, 20 Apr 2012 02:22:53 +0000 (-0400) Subject: Work Log entry for holds placed from "Search the Catalog" X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6c38641a3ae05975c1a4cb883f6cde6cfcf5bc21;p=working%2FEvergreen.git Work Log entry for holds placed from "Search the Catalog" Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index 14c4cd3fe5..70ddf36423 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -405,7 +405,40 @@ function set_opac() { } }, 'get_barcode' : xulG.get_barcode, - 'get_barcode_and_settings' : xulG.get_barcode_and_settings + 'get_barcode_and_settings' : xulG.get_barcode_and_settings, + 'opac_hold_placed' : function(hold) { + try { + var hold_id = typeof hold == 'object' ? hold.id() : hold; + g.network.simple_request('FM_AHR_BLOB_RETRIEVE.authoritative', [ ses(), hold_id ], + function(blob_req) { + try { + var blob = blob_req.getResultObject(); + if (typeof blob.ilsevent != 'undefined') throw(blob); + g.error.work_log( + $('offlineStrings').getFormattedString( + 'staff.circ.work_log_hold_placed.message', + [ + ses('staff_usrname'), + blob.patron_last, + blob.patron_barcode, + hold_id, + blob.hold.hold_type() + ] + ), { + 'au_id' : blob.hold.usr(), + 'au_family_name' : blob.patron_family_name, + 'au_barcode' : blob.patron_barcode + } + ); + } catch(E) { + g.error.standard_unexpected_error_alert('opac.js, opac_hold_placed(), work_log #2: ',E); + } + } + ); + } catch(F) { + g.error.standard_unexpected_error_alert('opac.js, opac_hold_placed(), work_log #1: ',F); + } + } }, 'on_url_load' : function(f) { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");