]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/checkout.xul
xul_param and modal xulG conversion
[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="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/circ.css" type="text/css"?>
11
12 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
13 <!-- LOCALIZATION -->
14 <!DOCTYPE window PUBLIC "" ""[
15         <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
16 ]>
17
18 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
19 <!-- OVERLAYS -->
20 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
21 <?xul-overlay href="/xul/server/circ/checkout_overlay.xul"?>
22
23 <window id="checkout_win" 
24         onload="try { my_init(); font_helper(); } 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                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
38                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
39                                 JSAN.errorLevel = "die"; // none, warn, or die
40                                 JSAN.addRepository('/xul/server/');
41                                 JSAN.use('util.error'); g.error = new util.error();
42                                 g.error.sdump('D_TRACE','my_init() for checkout.xul');
43
44                                 var patron_id = xul_param('patron_id');
45
46                                 JSAN.use('circ.checkout'); g.checkout = new circ.checkout();
47                                 g.checkout.init( 
48                                         { 
49                                                 'patron_id' : patron_id,
50                                         } 
51                                 );
52                 
53                                 default_focus();
54         
55                         } catch(E) {
56                                 try {
57                                         g.error.standard_unexpected_error_alert('circ/checkout.xul',E);
58                                 } catch(F) {
59                                         dump('FIXME: circ/checkout.xul -> ' + E + ' -> ' + F + '\n');
60                                 }
61                         }
62                 }
63
64                 function default_focus() {
65                         try {
66                                 var x = document.getElementById('checkout_barcode_entry_textbox');
67                                 if (!x) return;
68                                 if (x.disabled) {
69                                         document.getElementById('checkout_duedate_menu').inputField.focus();
70                                 } else {
71                                  x.focus();
72                                 }
73                         } catch(E) {
74                                 try { g.error.sdump('D_ERROR','checkout default_focus(): ' + js2JSON(E)); } catch(F) { dump('FIXME: circ/checkout.xul default_focus() -> ' + E + ' -> ' + F) }
75                         }
76                 }
77
78                 function refresh() {
79                         g.checkout.check_disable();
80                 }
81
82         ]]>
83         </script>
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