back to a more traditional z-client look. The Local Catalog service won't work until...
[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/${locale}/lang.dtd"-->
15 ]>
16
17
18 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
19 <!-- OVERLAYS -->
20 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
21
22 <window id="cat_z3950_win2" 
23         onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
24         xmlns:html="http://www.w3.org/1999/xhtml"
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 $(id) { return document.getElementById(id); }
38                 
39                 function my_init() {
40                         try {
41                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
42                                 if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
43                                 JSAN.errorLevel = "die"; // none, warn, or die
44                                 JSAN.addRepository('/xul/server/');
45                                 JSAN.use('util.error'); g.error = new util.error();
46                                 g.error.sdump('D_TRACE','my_init() for cat_z3950.xul');
47
48                                 JSAN.use('cat.z3950'); g.z3950 = new cat.z3950();
49
50                                 g.z3950.init( 
51                                         { 
52                                                 /* this guy grabs most things through the DOM, but I want to move JSAN libraries away from that,
53                                                 or at the very least, push node ID's in through here. */
54                                         } 
55                                 );
56
57                                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
58                                         try { window.xulG.set_tab_name('Z39.50'); } catch(E) { alert(E); }
59                                 }
60
61                         } catch(E) {
62                                 var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/z3950.xul', E]);
63                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
64                                 alert(err_msg);
65                         }
66                 }
67
68                 function handle_enter(ev) {
69                         g.z3950.handle_enter(ev);
70                 }
71
72                 function default_focus() {
73                         setTimeout( function() { try { document.getElementById("username").focus(); g.z3950.focus(g.service); } catch(E) { } }, 0 );
74                 }
75
76         ]]>
77         </script>
78
79     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
80      <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
81      <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
82
83         <commandset id="cat_z3950_cmds">
84                 <command id="cmd_broken" />
85                 <command id="cmd_export" />
86                 <command id="sel_clip" />
87                 <command id="save_columns" />
88                 <command id="toggle_form" />
89                 <command id="marc_view" />
90         </commandset>
91
92         <groupbox flex="1">
93                 <caption label="&staff.cat.z3950.marc_import.label;"/>
94             <hbox id="top_pane">
95                 <groupbox flex="1">
96                     <caption label="&staff.cat.z3950.query.label;"/>
97                     <hbox>
98                         <spacer flex="1"/>
99                         <description>
100                         &staff.cat.z3950.query.description;
101                         </description>
102                         <spacer flex="1"/>
103                     </hbox>
104                     <grid>
105                         <columns><column /><column flex="1" /></columns>
106                         <rows id="query_inputs">
107                             <row>
108                                 <label id="item_type_label" value="&staff.z39_50.search_class.item_type;" control="item_type_input" onclick="g.z3950.default_attr = 'item_type'" style="-moz-user-focus: ignore"/>
109                                 <menulist id="item_type_input" mytype="search_class" search_class="item_type">
110                                     <menupopup>
111                                         <menuitem label="&staff.z39_50.search_class.item_type.all;" value=""/>
112                                         <menuitem label="&staff.z39_50.search_class.item_type.bks;" value="bks"/>
113                                         <menuitem label="&staff.z39_50.search_class.item_type.ser;" value="ser"/>
114                                         <menuitem label="&staff.z39_50.search_class.item_type.vis;" value="vis"/>
115                                         <menuitem label="&staff.z39_50.search_class.item_type.rec;" value="rec"/>
116                                         <menuitem label="&staff.z39_50.search_class.item_type.sco;" value="sco"/>
117                                         <menuitem label="&staff.z39_50.search_class.item_type.map;" value="map"/>
118                                         <menuitem label="&staff.z39_50.search_class.item_type.com;" value="com"/>
119                                         <menuitem label="&staff.z39_50.search_class.item_type.mix;" value="mix"/>
120                                         <menuitem label="&staff.z39_50.search_class.item_type.url;" value="url"/>
121                                         <menuitem label="&staff.z39_50.search_class.item_type.art;" value="art"/>
122                                     </menupopup>
123                                 </menulist>
124                             </row>
125                         </rows>
126                     </grid>
127                     <hbox>
128                         <spacer flex="1"/>
129                         <button id="clear" label="&staff.cat.z3950.clear.label;" accesskey="&staff.cat.z3950.clear.accesskey;"/>
130                         <button id="search" label="&staff.cat.z3950.search.label;" accesskey="&staff.cat.z3950.search.accesskey;"/>
131                     </hbox>
132                 </groupbox>
133                 <groupbox flex="1">
134                     <caption label="&staff.cat.z3950.service_credentials.label;"/>
135                     <grid flex="1">
136                         <columns>
137                         <column/>
138                         <column/>
139                         <column/>
140                         </columns>
141                         <rows id="service_rows">
142                             <row>
143                                 <label value="&staff.cat.z3950.service.label;"/>
144                                 <label value="&staff.cat.z3950.username.label;"/>
145                                 <label value="&staff.cat.z3950.password.label;"/>
146                             </row>
147                             <row>
148                                 <checkbox id="native-evergreen-catalog_service" mytype="service_class" service="native-evergreen-catalog" label="&staff.cat.z3950.catalog_service.label;" tooltiptext="&staff.cat.z3950.catalog_service.tooltiptext;" /> 
149                                 <textbox id="native-evergreen-catalog_username" hidden="true"/>
150                                 <textbox id="native-evergreen-catalog_password" type="password" hidden="true"/>
151                             </row>
152                         </rows>
153                     </grid>
154                     <hbox>
155                         <button id="save_creds" label="&staff.cat.z3950.save_creds.label;" accesskey="&staff.cat.z3950.save_creds.accesskey;"/>
156                         <spacer flex="1"/>
157                     </hbox>
158                 </groupbox>
159             </hbox>
160             <splitter id="z_splitter" persist="height"/>
161             <groupbox flex="1">
162                 <caption label="&staff.cat.z3950.results_caption.label;"/>
163                 <hbox id="result_message" />
164                 <hbox>
165                     <button id="page_next" label="&staff.cat.z3950.page_next.label;" accesskey="&staff.cat.z3950.page_next.accesskey;" disabled="true"/>
166                     <button id="export" label="&staff.cat.z3950.export.label;" command="cmd_export" accesskey=""/>
167                     <button id="clip_button" command="sel_clip" label="&staff.cat.z3950.clip_button.label;" disabled="true"/>
168                     <button id="save_cols_btn" command="save_columns" label="&staff.cat.z3950.save_cols_btn.label;"/>
169                     <spacer flex="1"/>
170                     <button id="marc_view_btn" command="marc_view" disabled="true"/>
171                     <button id="marc_import_overlay" label="&staff.cat.z3950.marc_import_overlay.label;" accesskey="&staff.cat.z3950.marc_import_overlay.accesskey;" disabled="true"/>
172                     <button id="marc_import" label="&staff.cat.z3950.result_message.marc_import.label;" accesskey="&staff.cat.z3950.result_message.marc_import.accesskey;" disabled="true"/>
173                         <button id="toggle_form_btn" command="toggle_form"/>
174                 </hbox>
175                 <deck id="deck" flex="1">
176                     <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
177                     <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1"/>
178                 </deck>
179             </groupbox>
180     </groupbox>
181
182 </window>
183