2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Retrieve Patron By Barcode -->
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"?>
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
13 <!DOCTYPE window PUBLIC "" ""[
14 <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
17 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
19 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
21 <window id="patron_barcode_entry_win"
23 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
25 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
27 <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
28 <scripts id="openils_util_scripts"/>
30 <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
35 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
36 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
37 JSAN.errorLevel = "die"; // none, warn, or die
38 JSAN.addRepository('/xul/server/');
39 JSAN.use('util.error'); g.error = new util.error();
40 g.error.sdump('D_TRACE','my_init() for patron/barcode_entry.xul');
43 var session = g.cgi.param('session');
45 g.error.sdump('D_ERROR','session = ' + session + '\n'
46 + 'g.cgi._keys = ' + g.cgi._keys + '\n'
47 + 'g.cgi.param("session") = ' + g.cgi.param('session') + '\n'
48 + 'location = ' + location + '\n'
49 + 'location.href = ' + location.href + '\n'
51 alert('pause. session is ' + session );
54 var tb = document.getElementById('barcode_tb');
58 if (ev.keyCode == 13 || ev.keyCode == 77) {
70 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
71 try { window.xulG.set_tab_name('Patron Scan'); } catch(E) { alert(E); }
74 if (g.cgi.param('error')) {
75 var error = g.cgi.param('error');
76 var E = JSON2js( error );
79 case -1: g.error.standard_network_error_alert(); break;
80 case 1002: alert('No user was found with this barcode.'); break;
81 default: g.error.standard_unexpected_error_alert('',E); break;
84 g.error.standard_unexpected_error_alert('',E);
89 var err_msg = "!! This software has encountered an error. Please tell your friendly " +
90 "system administrator or software developer the following:\n" + E + '\n';
91 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
98 JSAN.use('util.sound'); var sound = new util.sound(); sound.good();
99 var tb = document.getElementById('barcode_tb');
100 var barcode = tb.value;
102 if (!barcode) return;
104 var loc = urls.XUL_PATRON_DISPLAY + '?session=' +
105 window.escape(g.cgi.param('session')) + '&barcode=' + window.escape(barcode);
107 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab == 'function') {
109 window.xulG.set_tab( loc );
115 var err_msg = "!! This software has encountered an error. Please tell your friendly " +
116 "system administrator or software developer the following:\n" + E + '\n';
117 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
125 <vbox flex="1" class="my_overflow">
126 <groupbox orient="vertical" flex="1">
127 <caption label="Retrieve Patron" />
129 <label value="Barcode:" accesskey="B" control="barcode_tb"/>
130 <textbox id="barcode_tb" />
131 <button label="Submit" accesskey="S" oncommand="spawn();"/>