]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/checkout.xul
Improve Firefox/XULRunner Support
[Evergreen.git] / Open-ILS / xul / staff_client / server / circ / checkout.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Patron Display -->
4
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
6 <!-- STYLESHEETS -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
10
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
12 <!-- LOCALIZATION -->
13 <!DOCTYPE window PUBLIC "" ""[
14     <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
15 ]>
16
17 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
18 <!-- OVERLAYS -->
19 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
20 <?xul-overlay href="/xul/server/circ/checkout_overlay.xul"?>
21
22 <window id="checkout_win" 
23     onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
24     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
25
26     <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
27     <!-- BEHAVIOR -->
28         <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
29         <scripts id="openils_util_scripts"/>
30
31     <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
32     <script>
33     <![CDATA[
34         function my_init() {
35             try {
36                 if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.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 checkout.xul');
41
42                 var patron_id = xul_param('patron_id');
43
44                 JSAN.use('circ.checkout'); g.checkout = new circ.checkout();
45                 g.checkout.init( 
46                     { 
47                         'patron_id' : patron_id,
48                     } 
49                 );
50         
51                 default_focus();
52     
53             } catch(E) {
54                 try {
55                     g.error.standard_unexpected_error_alert('circ/checkout.xul',E);
56                 } catch(F) {
57                     dump('FIXME: circ/checkout.xul -> ' + E + ' -> ' + F + '\n');
58                 }
59             }
60         }
61
62         function default_focus() {
63             try {
64                 var x = document.getElementById('checkout_barcode_entry_textbox');
65                 if (!x) return;
66                 if (x.disabled) {
67                     document.getElementById('checkout_duedate_menu').inputField.focus();
68                 } else {
69                  x.focus();
70                 }
71             } catch(E) {
72                 try { g.error.sdump('D_ERROR','checkout default_focus(): ' + js2JSON(E)); } catch(F) { dump('FIXME: circ/checkout.xul default_focus() -> ' + E + ' -> ' + F) }
73             }
74         }
75
76         function refresh() {
77             g.checkout.check_disable();
78         }
79
80     ]]>
81     </script>
82
83     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
84
85     <commandset id="checkout_cmds">
86         <command id="cmd_checkout_submit" />
87         <command id="cmd_checkout_print" />
88         <command id="cmd_checkout_export" />
89         <command id="cmd_checkout_reprint" />
90         <command id="cmd_checkout_done" />
91         <command id="sel_clip" />
92         <command id="save_columns" />
93     </commandset>
94
95     <box id="checkout_main" />
96
97 </window>
98