]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/patron/search_form.xul
80f2eeb5dd4b0f3e34f43e3c8da048058622df22
[Evergreen.git] / Open-ILS / xul / staff_client / server / patron / search_form.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/search_form_overlay.xul"?>
22
23 <window id="patron_search_form_win" 
24         onload="my_init()"
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 patron_search_form.xul');
43
44                                 g.cgi = new CGI();
45                                 var keys = g.cgi.keys();
46                                 var query = {};
47                                 for (var i = 0; i < keys.length; i++) {
48                                         query[keys[i]] = g.cgi.param(keys[i]);
49                                 }
50                                 if (xulG.query) {
51                                         for (var i in xulG.query) {
52                                                 query[i] = xulG.query[i];
53                                         }
54                                 }
55
56                                 JSAN.use('patron.search_form'); g.search_form = new patron.search_form();
57                                 g.search_form.init( { 'query' : query } );
58
59                                 if (g.cgi.param('doit')) {
60                                         g.search_form.submit();
61                                 }
62         
63                         } catch(E) {
64                                 var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
65                                         "system administrator or software developer the following:\n" 
66                                         'patron/search_form.xul\n' + E + '\n';
67                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
68                                 alert(err_msg);
69                         }
70                 }
71                 
72                 function default_focus() {
73                         setTimeout(
74                                 function() {
75                                         try {
76                                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
77                                                 document.getElementById('family_name').focus();
78                                         } catch(E) {
79                                                 g.error.sdump('D_ERROR','default_focus(): ' + js2JSON(E));
80                                         }
81                                 }, 0
82                         );
83                 }
84
85
86         ]]>
87         </script>
88
89         <commandset id="patron_search_form_cmds">
90         </commandset>
91
92         <box id="patron_search_form_main" />
93
94 </window>
95