]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/checkout.xul
LP1125471 - Use label instead of id in recording in-house use prompt
[working/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     onunload="try { my_cleanup(); persist_helper_cleanup(); } catch(E) { alert(E); }"
25     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
26
27     <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
28     <!-- BEHAVIOR -->
29         <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
30         <scripts id="openils_util_scripts"/>
31
32     <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
33     <script>
34     <![CDATA[
35         function my_init() {
36             try {
37                 if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
38                 JSAN.errorLevel = "die"; // none, warn, or die
39                 JSAN.addRepository('/xul/server/');
40                 JSAN.use('util.error'); g.error = new util.error();
41                 g.error.sdump('D_TRACE','my_init() for checkout.xul');
42
43                 var patron_id = xul_param('patron_id');
44
45                 JSAN.use('circ.checkout'); g.checkout = new circ.checkout();
46                 g.checkout.init( 
47                     { 
48                         'patron_id' : patron_id,
49                     } 
50                 );
51         
52                 default_focus();
53     
54             } catch(E) {
55                 try {
56                     g.error.standard_unexpected_error_alert('circ/checkout.xul',E);
57                 } catch(F) {
58                     dump('FIXME: circ/checkout.xul -> ' + E + ' -> ' + F + '\n');
59                 }
60             }
61         }
62
63         function my_cleanup() {
64             try {
65                 g.checkout.cleanup();
66             } catch(E) {
67                 try {
68                     g.error.standard_unexpected_error_alert('circ/checkout.xul',E);
69                 } catch(F) {
70                     dump('FIXME: circ/checkout.xul -> ' + E + ' -> ' + F + '\n');
71                 }
72             }
73         }
74
75         function default_focus() {
76             try {
77                 var x = document.getElementById('checkout_barcode_entry_textbox');
78                 if (!x) return;
79                 if (x.disabled) {
80                     document.getElementById('checkout_duedate_menu').inputField.focus();
81                 } else {
82                  x.focus();
83                 }
84             } catch(E) {
85                 try { g.error.sdump('D_ERROR','checkout default_focus(): ' + js2JSON(E)); } catch(F) { dump('FIXME: circ/checkout.xul default_focus() -> ' + E + ' -> ' + F) }
86             }
87         }
88
89         function refresh() {
90             g.checkout.check_disable();
91         }
92
93     ]]>
94     </script>
95
96     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
97
98     <commandset id="checkout_cmds">
99         <command id="cmd_checkout_submit" />
100         <command id="cmd_checkout_print" />
101         <command id="cmd_checkout_export" />
102         <command id="cmd_checkout_reprint" />
103         <command id="cmd_checkout_done" />
104         <command id="sel_clip" />
105         <command id="save_columns" />
106     </commandset>
107
108     <box id="checkout_main" />
109
110 </window>
111