2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Brief Bib Display -->
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
10 <?xml-stylesheet href="/xul/server/skin/patron_display.css" type="text/css"?>
12 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
14 <!DOCTYPE window PUBLIC "" ""[
15 <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
18 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
20 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
22 <window id="circ_circ_brief_win"
23 onload="try { my_init(); } catch(E) { alert(E); }"
24 xmlns:html="http://www.w3.org/1999/xhtml"
25 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
27 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
29 <script type="text/javascript">
30 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
32 <scripts id="openils_util_scripts"/>
34 <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
39 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
40 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
41 JSAN.errorLevel = "die"; // none, warn, or die
42 JSAN.addRepository('/xul/server/');
43 JSAN.use('util.error'); g.error = new util.error();
44 g.error.sdump('D_TRACE','my_init() for circ_circ_brief.xul');
47 g.circ_id = g.cgi.param('circ_id');
49 JSAN.use('util.network'); g.network = new util.network();
50 JSAN.use('util.date');
51 JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
54 api.FM_CIRC_RETRIEVE_VIA_ID.app,
55 api.FM_CIRC_RETRIEVE_VIA_ID.method,
59 var r_circ = req.getResultObject();
60 $('circ_lib').value = r_circ.circ_lib() ? g.data.hash.aou[ r_circ.circ_lib() ].shortname() : '';
61 $('xact_start').value = r_circ.xact_start() ? r_circ.xact_start().toString().substr(0,16) : '';
62 $('circ_staff').value = r_circ.circ_staff() ? r_circ.circ_staff() : '';
63 $('checkin_lib').value = r_circ.checkin_lib() ? g.data.hash.aou[ r_circ.checkin_lib() ].shortname() : '';
64 $('checkin_time').value = r_circ.checkin_time() ? r_circ.checkin_time().toString().substr(0,16) : '';
65 $('checkin_staff').value = r_circ.checkin_staff() ? r_circ.checkin_staff() : '';
66 $('id').value = r_circ.id() ? r_circ.id() : '';
67 $('stop_fines').value = r_circ.stop_fines() ? r_circ.stop_fines() : '';
69 if (r_circ.desk_renewal() == 't' || r_circ.desk_renewal() == '1') r += 'DESK ';
70 if (r_circ.opac_renewal() == 't' || r_circ.opac_renewal() == '1') r += 'OPAC ';
71 if (r_circ.phone_renewal() == 't' || r_circ.phone_renewal() == '1') r += 'PHONE ';
72 $('renewal').value = r || 'No';
74 g.error.standard_unexpected_error_alert('Failure rendering circ.',E);
76 g.patron_id = r_circ.usr(); $('add_billing').disabled = false;
77 g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ ses(), r_circ.usr() ], function(preq) {
78 var r_au = preq.getResultObject();
79 $('barcode').value = r_au.card().barcode();
80 $('patron_name').value = r_au.family_name() + ', ' + r_au.first_given_name() + ' ' + (r_au.second_given_name() ? r_au.second_given_name() : '');
81 JSAN.use('patron.util'); patron.util.set_penalty_css(r_au);
89 var err_msg = "!! This software has encountered an error. Please tell your friendly " +
90 "system administrator or software developer the following:\ncirc/circ_brief.xul\n" + E + '\n';
91 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
96 function $(id) { return document.getElementById(id); }
98 g.add_billing = function() {
99 JSAN.use('util.window');
100 var win = new util.window();
102 urls.XUL_PATRON_BILL_WIZARD
103 + '?patron_id=' + window.escape(g.patron_id)
104 + '&xact_id=' + window.escape( g.circ_id ),
106 'chrome,resizable,modal'
113 <groupbox flex="1" style="overflow: auto;">
115 <label id="patron_name" class="patronNameLarge"/>
116 <textbox id="barcode" class="plain" readonly="true" onclick="this.select()"/>
118 <button id="add_billing" disabled="true" label="Add Billing" oncommand="g.add_billing();"/>
131 <label style="font-weight: bold" value="Circ Id"/><label id="id"/>
132 <label style="font-weight: bold" value="Renewal"/><label id="renewal"/>
133 <label style="font-weight: bold" value="Stop Fines Reason"/><label id="stop_fines"/>
136 <label style="font-weight: bold" value="Check Out Lib"/><label id="circ_lib"/>
137 <label style="font-weight: bold" value="Check Out Time"/><label id="xact_start"/>
138 <label style="font-weight: bold" value="Check Out Staff ID"/><label id="circ_staff"/>
141 <label style="font-weight: bold" value="Check In Lib"/><label id="checkin_lib"/>
142 <label style="font-weight: bold" value="Check In Time"/><label id="checkin_time"/>
143 <label style="font-weight: bold" value="Check In Staff ID"/><label id="checkin_staff"/>