]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/patron/search_form.xul
LP2042879 Shelving Location Groups Admin accessibility
[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="/xul/server/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/patron_display.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/patron/search_form_overlay.xul"?>
21
22 <window id="patron_search_form_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 $(id) { return document.getElementById(id); }
36         
37         function my_init() {
38             try {
39                 if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
40                 JSAN.errorLevel = "die"; // none, warn, or die
41                 JSAN.addRepository('/xul/server/');
42                 JSAN.use('util.error'); g.error = new util.error();
43                 g.error.sdump('D_TRACE','my_init() for patron_search_form.xul');
44
45                 g.cgi = new CGI();
46                 var keys = g.cgi.keys();
47                 var query = {};
48                 for (var i = 0; i < keys.length; i++) {
49                     query[keys[i]] = g.cgi.param(keys[i]);
50                 }
51                 if (xulG.query) {
52                     for (var i in xulG.query) {
53                         if (typeof xulG.query[i] == 'object') { xulG.query[i] = xulG.query[i].value; }
54                         query[i] = xulG.query[i];
55                     }
56                 }
57
58                 JSAN.use('patron.search_form'); g.search_form = new patron.search_form();
59                 g.search_form.init( { 'query' : query } );
60
61                 if (g.cgi.param('doit')||xulG.doit) {
62                     g.search_form.submit();
63                 }
64     
65             } catch(E) {
66                 var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/search_form.xul', E]);
67                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
68                 alert(err_msg);
69             }
70         }
71         
72         function my_cleanup() {
73             try {
74                 g.search_form.cleanup();
75             } catch(E) {
76                 var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/search_form.xul', E]);
77                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
78                 alert(err_msg);
79             }
80         }
81
82         function default_focus() {
83             setTimeout(
84                 function() {
85                     try {
86                         document.getElementById('family_name').focus();
87                     } catch(E) {
88                         g.error.sdump('D_ERROR','default_focus(): ' + js2JSON(E));
89                     }
90                 }, 0
91             );
92         }
93
94
95     ]]>
96     </script>
97     
98     <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
99
100     <commandset id="patron_search_form_cmds">
101     </commandset>
102
103     <box id="patron_search_form_main" />
104
105 </window>
106