]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/cat/z3950.xul
new way of handling entities for remote xul
[Evergreen.git] / Open-ILS / xul / staff_client / server / cat / z3950.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Example Template for remote xul -->
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
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
12 <!-- LOCALIZATION -->
13 <!DOCTYPE window PUBLIC "" ""[
14         <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
15 ]>
16
17
18 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
19 <!-- OVERLAYS -->
20 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
21
22 <window id="cat_z3950_win" 
23         onload="try { my_init(); } catch(E) { alert(E); }"
24         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
25
26         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
27         <!-- BEHAVIOR -->
28         <script type="text/javascript">
29                 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
30         </script>
31         <scripts id="openils_util_scripts"/>
32
33         <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
34         <script>
35         <![CDATA[
36                 function my_init() {
37                         try {
38                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
39                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is 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 cat_z3950.xul');
44
45                                 g.cgi = new CGI();
46                                 var session = g.cgi.param('session');
47
48                                 JSAN.use('cat.z3950'); g.z3950 = new cat.z3950();
49
50                                 g.z3950.init( 
51                                         { 
52                                                 'session' : session,
53                                         } 
54                                 );
55
56                                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
57                                         try { window.xulG.set_tab_name('Z39.50'); } catch(E) { alert(E); }
58                                 }
59
60                         } catch(E) {
61                                 var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
62                                         "system administrator or software developer the following:\ncat/z3950.xul\n" + E + '\n';
63                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
64                                 alert(err_msg);
65                         }
66                 }
67
68         ]]>
69         </script>
70
71         <commandset id="cat_z3950_cmds">
72                 <command id="cmd_broken" />
73         </commandset>
74
75         <groupbox flex="1">
76                 <caption label="MARC Import via Z39.50"/>
77                 <description>This interface is very minimal at the moment, but may evolve into a federated z39.50 search client.</description>
78                 <hbox>
79                         <groupbox>
80                                 <caption id="c1" label="Sessions" class="shrinkable_groupbox"/>
81                                 <hbox id="menu_placeholder">
82                                 </hbox>
83                                 <hbox>
84                                         <button id="new_menu_option" label="New" command="cmd_broken"/>
85                                         <button id="save_menu_option" label="Save" command="cmd_broken"/>
86                                 </hbox>
87                         </groupbox>
88                         <groupbox>
89                                 <caption id="c2" label="Server Details" class="shrinkable_groupbox"/>
90                                 <grid>
91                                         <columns><column /><column flex="1" /><column /><column flex="1"/></columns>
92                                         <rows>
93                                                 <row>
94                                                         <label value="Server:" control="server"/><textbox id="server" value="" disabled="false"/>
95                                                         <label value="Username:" control="username"/><textbox id="username" value="" disabled="false"/>
96                                                 </row>
97                                                 <row>
98                                                         <label value="Database:" control="database"/><textbox id="database" value="" disabled="false"/>
99                                                         <label value="Password:" control="password"/><textbox id="password" value="" disabled="false"/>
100                                                 </row>
101                                                 <row>
102                                                         <label value="Port:" control="port"/><textbox id="port" value="" disabled="false"/>
103                                                 </row>
104                                         </rows>
105                                 </grid>
106                         </groupbox>
107                 </hbox>
108                 <groupbox>
109                         <caption label="Query" />
110                         <grid>
111                                 <columns><column /><column flex="1" /><column /></columns>
112                                 <rows>
113                                         <row>
114                                                 <label value="Accession ID:" control="asc_id" accesskey="A"/>
115                                                 <textbox id="asc_id"/>
116                                                 <button id="asc_search" label="Submit" accesskey="S"/>
117                                         </row>
118                                         <row>
119                                                 <label value="Raw Z39.50:" control="raw_string" accesskey="R"/>
120                                                 <textbox id="raw_string"/>
121                                                 <button id="raw_search" label="Submit" />
122                                         </row>
123                                 </rows>
124                         </grid>
125                 </groupbox>
126                 <groupbox flex="1">
127                         <caption label="Results" />
128                         <description id="result_message" />
129                         <hbox><spacer flex="1"/><button id="marc_import" label="Import" disabled="true"/></hbox>
130                         <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
131                 </groupbox>
132         </groupbox>
133
134 </window>
135