From 1ea6b7b62d73673501fb3b04d54d7322e842c9a4 Mon Sep 17 00:00:00 2001 From: pines Date: Tue, 13 Feb 2007 19:37:03 +0000 Subject: [PATCH] bug 448, let record editor/creator be clickable in record summaries.. then can re-visited for network efficiency git-svn-id: svn://svn.open-ils.org/ILS/trunk@6949 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/bib_brief.xul | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/bib_brief.xul b/Open-ILS/xul/staff_client/server/cat/bib_brief.xul index 529d27e712..2032ce1663 100644 --- a/Open-ILS/xul/staff_client/server/cat/bib_brief.xul +++ b/Open-ILS/xul/staff_client/server/cat/bib_brief.xul @@ -101,12 +101,30 @@ document.getElementById('tcn_source').appendChild( document.createTextNode(meta.tcn_source()) ); + g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ses(),meta.creator().id()], + function(rreq) { + var creator_au = rreq.getResultObject(); + document.getElementById('creator_bc').appendChild( + document.createTextNode(creator_au.card().barcode()) + ); + } + ); + g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ses(),meta.editor().id()], + function(rreq) { + var editor_au = rreq.getResultObject(); + document.getElementById('editor_bc').appendChild( + document.createTextNode(editor_au.card().barcode()) + ); + } + ); document.getElementById('creator').appendChild( - document.createTextNode(meta.creator().usrname()) + document.createTextNode('('+data.hash.aou[meta.creator().home_ou()].shortname()+') ') ); + document.getElementById('creator_bc').setAttribute('au_id',meta.creator().id()); document.getElementById('editor').appendChild( - document.createTextNode(meta.editor().usrname()) + document.createTextNode('('+data.hash.aou[meta.editor().home_ou()].shortname()+') ') ); + document.getElementById('editor_bc').setAttribute('au_id',meta.editor().id()); document.getElementById('edit_date').appendChild( document.createTextNode( util.date.formatted_date(meta.edit_date(),"%D") @@ -154,6 +172,20 @@ } } + function spawn_patron(span) { + try { + var loc = urls.XUL_PATRON_DISPLAY; // + '?barcode=' + window.escape(barcode); + + if (typeof window.xulG == 'object' && typeof window.xulG.set_tab == 'function') { + window.xulG.set_tab( loc, {}, { 'id' : span.getAttribute('au_id') } ); + } else { + copy_to_clipboard( span.textContent ); + } + } catch(E) { + g.error.standard_unexpected_error_alert('spawning patron display',E); + } + } + ]]> @@ -185,9 +217,11 @@ Created By: + Last Edited By: + Last Edited On: -- 2.11.0