1 <?xml version="1.0" encoding="UTF-8"?>
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/${locale}/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( document.getElementById("commonStrings").getString('common.jsan.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');
46 g.circ_id = xul_param('circ_id');
48 var caption = xul_param('caption'); if (caption) $('caption').setAttribute('label',caption);
49 if (xul_param('no_border')) $('gb').setAttribute('style','border: none');
51 JSAN.use('util.network'); g.network = new util.network();
52 JSAN.use('util.date');
53 JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
55 function circ_callback(req) {
57 var r_circ = req.getResultObject();
58 $('circ_lib').value = r_circ.circ_lib() ? g.data.hash.aou[ r_circ.circ_lib() ].shortname() : '';
59 $('xact_start').value = r_circ.xact_start() ? r_circ.xact_start().toString().substr(0,16).replace(/T/,' ') : '';
60 $('due_date').value = r_circ.due_date() ? r_circ.due_date().toString().substr(0,10) : '';
61 $('circ_lib').setAttribute('tooltiptext', document.getElementById('circStrings').getFormattedString('staff.circ.circ_brief.staff_out_id', [r_circ.circ_staff()]) );
62 $('checkin_lib').value = r_circ.checkin_lib() ? g.data.hash.aou[ r_circ.checkin_lib() ].shortname() : '';
63 $('checkin_time').value = r_circ.checkin_time() ? r_circ.checkin_time().toString().substr(0,16).replace(/T/,' ') : '';
64 $('checkin_lib').setAttribute('tooltiptext', document.getElementById('circStrings').getFormattedString('staff.circ.circ_brief.staff_in_id', [r_circ.checkin_staff()]) );
65 $('id').value = r_circ.id() ? r_circ.id() : '';
66 $('stop_fines').value = r_circ.stop_fines() ? r_circ.stop_fines() : '';
67 $('stop_fines_time').value = r_circ.stop_fines_time() ? r_circ.stop_fines_time().toString().substr(0,16).replace(/T/,' ') : '';
69 if (get_bool( r_circ.desk_renewal() ) ) r += 'DESK ';
70 if (get_bool(r_circ.opac_renewal() ) ) r += 'OPAC ';
71 if (get_bool(r_circ.phone_renewal() ) ) r += 'PHONE ';
72 $('renewal').value = r || document.getElementById('circStrings').getString('staff.circ.checkout.no.btn');
73 g.patron_id = r_circ.usr(); $('add_billing').disabled = false;
74 g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ ses(), r_circ.usr() ], function(preq) {
75 var r_au = preq.getResultObject();
76 $('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() : '');
77 JSAN.use('patron.util'); patron.util.set_penalty_css(r_au);
81 g.error.standard_unexpected_error_alert(document.getElementById('circStrings').getString('staff.circ.circ_brief.failure'), E);
86 g.network.simple_request( 'FM_CIRC_RETRIEVE_VIA_ID', [ ses(), g.circ_id ], circ_callback);
88 g.circ = g.data.temp_circ; g.data.temp_circ = null; g.data.stash('temp_circ');
89 g.circ_id = g.circ.id();
90 circ_callback( { 'getResultObject' : function() { return g.circ; } } );
94 var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ/circ_brief.xul', E]);
95 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
100 function $(id) { return document.getElementById(id); }
102 g.add_billing = function() {
103 JSAN.use('util.window');
104 var win = new util.window();
106 urls.XUL_PATRON_BILL_WIZARD,
107 //+ '?patron_id=' + window.escape(g.patron_id)
108 //+ '&xact_id=' + window.escape( g.circ_id ),
110 'chrome,resizable,modal',
111 { 'patron_id' : g.patron_id, 'xact_id' : g.circ_id }
118 <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
120 <groupbox id="gb" flex="1" style="overflow: auto;">
121 <caption id="caption"/>
123 <label id="patron_name" class="patronNameLarge" flex="1"/>
124 <label value="&staff.circ.circ_brief.patron_id.label;"/><label id="id"/>
125 <button id="add_billing" disabled="true" label="&staff.circ.circ_brief.add_billing.label;" oncommand="g.add_billing();"/>
140 <label style="font-weight: bold" value="&staff.circ.circ_brief.xact_start.label;"/><label id="xact_start"/>
141 <label style="font-weight: bold" value="&staff.circ.circ_brief.due_date.label;"/><label id="due_date"/>
142 <label style="font-weight: bold" value="&staff.circ.circ_brief.stop_fines_time.label;"/><label id="stop_fines_time"/>
143 <label style="font-weight: bold" value="&staff.circ.circ_brief.checkin_time.label;"/><label id="checkin_time"/>
146 <label style="font-weight: bold" value="&staff.circ.circ_brief.circ_lib.label;"/><label id="circ_lib"/>
147 <label style="font-weight: bold" value="&staff.circ.circ_brief.renewal.label;"/><label id="renewal"/>
148 <label style="font-weight: bold" value="&staff.circ.circ_brief.stop_fines.label;"/><label id="stop_fines"/>
149 <label style="font-weight: bold" value="&staff.circ.circ_brief.checkin_lib.label;"/><label id="checkin_lib"/>