]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/patron/display.xul
default focus handler
[Evergreen.git] / Open-ILS / xul / staff_client / server / patron / display.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/patron_display.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/patron/display_overlay.xul"?>
22
23 <window id="patron_display_win" 
24         onload="try { my_init(); } 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">
30                 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
31         </script>
32         <scripts id="openils_util_scripts"/>
33
34         <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
35         <script>
36         <![CDATA[
37                 function my_init() {
38                         try {
39                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
40                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is 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 patron_display.xul');
45
46                                 g.cgi = new CGI();
47
48                                 JSAN.use('patron.display'); g.patron = new patron.display();
49                                 g.patron.init( { 
50                                         'session' : g.cgi.param('session') , 
51                                         'barcode' : g.cgi.param('barcode') ,
52                                         'id' : g.cgi.param('id') ,
53                                 } );
54
55                         } catch(E) {
56                                 var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
57                                         "system administrator or software developer the following:\n" 
58                                         + 'patron/display.xul\n' + E + '\n';
59                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
60                                 alert(err_msg);
61                         }
62                 }
63
64                 function default_focus() {
65                         setTimeout(
66                                 function() {
67                                         try {
68                                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
69                                                 var node = g.patron.right_deck.node.selectedPanel;
70                                                 if (node && node.contentWindow && typeof node.contentWindow.default_focus == 'function') {
71                                                         node.contentWindow.default_focus();
72                                                 }
73                                         } catch(E) {
74                                                 g.error.sdump('D_ERROR','default_focus(): ' + js2JSON(E));
75                                         }
76                                 }, 0
77                         );
78                 }
79
80         ]]>
81         </script>
82
83         <commandset id="patron_display_cmds">
84                 <command id="cmd_patron_refresh" />
85                 <command id="cmd_patron_checkout" />
86                 <command id="cmd_patron_items" />
87                 <command id="cmd_patron_holds" />
88                 <command id="cmd_patron_bills" />
89                 <command id="cmd_patron_edit" />
90                 <command id="cmd_patron_info" />
91                 <command id="cmd_patron_retrieve" />
92                 <command id="cmd_search_form" />
93         </commandset>
94
95         <box id="patron_display_main" />
96
97 </window>
98