From: pines Date: Sat, 26 Aug 2006 04:59:38 +0000 (+0000) Subject: public/private wording with notes, and note printing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=de9415873aa30612ff55b2bf2b90f5ac90c38138;p=evergreen%2Fpines.git public/private wording with notes, and note printing git-svn-id: svn://svn.open-ils.org/ILS/trunk@5699 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/info_notes.xul b/Open-ILS/xul/staff_client/server/patron/info_notes.xul index ce4227d96f..cbf58f9b35 100644 --- a/Open-ILS/xul/staff_client/server/patron/info_notes.xul +++ b/Open-ILS/xul/staff_client/server/patron/info_notes.xul @@ -100,7 +100,7 @@ function(n){n.setAttribute("tooltiptext","Note ID: " + g.notes[i].id() + " Creator ID: " + g.notes[i].creator());} ); apply(node,'title',g.notes[i].title()); - apply(node,'pub',get_bool(g.notes[i].pub()) ? "Public" : "Private"); + apply(node,'pub',get_bool(g.notes[i].pub()) ? "Patron Visible" : "Staff Only"); apply(node,'value',g.notes[i].value()); apply(node,'id',g.notes[i].id()); apply(node,'creator',g.notes[i].creator()); @@ -123,6 +123,35 @@ } }(i), false ); + var btn2 = document.createElement('button'); hb.appendChild(btn2); + btn2.setAttribute('label','Print'); + btn2.setAttribute('image',"/xul/server/skin/media/images/up_arrow.gif"); + + btn2.addEventListener( + 'command', + function(id){ return function() { + try { + JSAN.use('patron.util'); + var patron_obj = patron.util.retrieve_fleshed_au_via_id(ses(),g.patron_id); + var staff_obj = patron.util.retrieve_name_via_id( ses(), g.notes[id].creator() ); + JSAN.use('util.print'); var p = new util.print(); + p.simple( + '
' + + '

Pertaining to ' + patron_obj.family_name() + ', ' + patron_obj.first_given_name() + ' ' + patron_obj.second_given_name() + ' : ' + + patron_obj.card().barcode() + '

' + + '

"' + + g.notes[id].title() + '" created on ' + g.notes[id].create_date().toString().substr(0,10) + + ' by ' + staff_obj[0] + ' @ ' + g.data.hash.aou[ staff_obj[3] ].shortname() + + '

' + + g.notes[id].value() + + '


' + ); + } catch(E) { + g.error.standard_unexpected_error_alert('printing note #' + g.notes[id].id(), E); + } + } }(i), + false + ); } } @@ -130,7 +159,7 @@ function new_note() { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite"); - var xml = '