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(); font_helper(); } 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 if (g.cgi.param('caption')) $('caption').setAttribute('label',g.cgi.param('caption'));
50 if (g.cgi.param('no_border')) $('gb').setAttribute('style','border: none');
52 JSAN.use('util.network'); g.network = new util.network();
53 JSAN.use('util.date');
54 JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
56 function circ_callback(req) {
58 var r_circ = req.getResultObject();
59 $('circ_lib').value = r_circ.circ_lib() ? g.data.hash.aou[ r_circ.circ_lib() ].shortname() : '';
60 $('xact_start').value = r_circ.xact_start() ? r_circ.xact_start().toString().substr(0,16).replace(/T/,' ') : '';
61 $('due_date').value = r_circ.due_date() ? r_circ.due_date().toString().substr(0,10) : '';
62 $('circ_lib').setAttribute('tooltiptext','Check Out Staff ID = ' + 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).replace(/T/,' ') : '';
65 $('checkin_lib').setAttribute('tooltiptext','Check In Staff ID = ' + 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() : '';
68 $('stop_fines_time').value = r_circ.stop_fines_time() ? r_circ.stop_fines_time().toString().substr(0,16).replace(/T/,' ') : '';
70 if (get_bool( r_circ.desk_renewal() ) ) r += 'DESK ';
71 if (get_bool(r_circ.opac_renewal() ) ) r += 'OPAC ';
72 if (get_bool(r_circ.phone_renewal() ) ) r += 'PHONE ';
73 $('renewal').value = r || 'No';
74 g.patron_id = r_circ.usr(); $('add_billing').disabled = false;
75 g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ ses(), r_circ.usr() ], function(preq) {
76 var r_au = preq.getResultObject();
77 $('patron_name').value = r_au.family_name() + ', ' + r_au.first_given_name() + ' ' + (r_au.second_given_name() ? r_au.second_given_name() + ' : ' + r_au.card().barcode() : '');
78 JSAN.use('patron.util'); patron.util.set_penalty_css(r_au);
82 g.error.standard_unexpected_error_alert('Failure rendering circ.',E);
87 g.network.simple_request( 'FM_CIRC_RETRIEVE_VIA_ID', [ ses(), g.circ_id ], circ_callback);
89 g.circ = g.data.temp_circ; g.data.temp_circ = null; g.data.stash('temp_circ');
90 g.circ_id = g.circ.id();
91 circ_callback( { 'getResultObject' : function() { return g.circ; } } );
95 var err_msg = "!! This software has encountered an error. Please tell your friendly " +
96 "system administrator or software developer the following:\ncirc/circ_brief.xul\n" + E + '\n';
97 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
102 function $(id) { return document.getElementById(id); }
104 g.add_billing = function() {
105 JSAN.use('util.window');
106 var win = new util.window();
108 urls.XUL_PATRON_BILL_WIZARD
109 + '?patron_id=' + window.escape(g.patron_id)
110 + '&xact_id=' + window.escape( g.circ_id ),
112 'chrome,resizable,modal'
119 <groupbox id="gb" flex="1" style="overflow: auto;">
120 <caption id="caption"/>
122 <label id="patron_name" class="patronNameLarge" flex="1"/>
123 <label value="Circ ID: "/><label id="id"/>
124 <button id="add_billing" disabled="true" label="Add Billing" oncommand="g.add_billing();"/>
139 <label style="font-weight: bold" value="Check Out Time"/><label id="xact_start"/>
140 <label style="font-weight: bold" value="Due Date"/><label id="due_date"/>
141 <label style="font-weight: bold" value="Stop Fines Time"/><label id="stop_fines_time"/>
142 <label style="font-weight: bold" value="Check In Time"/><label id="checkin_time"/>
145 <label style="font-weight: bold" value="Check Out Lib"/><label id="circ_lib"/>
146 <label style="font-weight: bold" value="Renewal"/><label id="renewal"/>
147 <label style="font-weight: bold" value="Stop Fines Reason"/><label id="stop_fines"/>
148 <label style="font-weight: bold" value="Check In Lib"/><label id="checkin_lib"/>