]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/server/cat/z3950.xul
Improve Firefox/XULRunner Support
[working/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="/xul/server/skin/global.css" type="text/css"?>
9
10 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
11 <!-- LOCALIZATION -->
12 <!DOCTYPE window PUBLIC "" ""[
13     <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
14 ]>
15
16
17 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
18 <!-- OVERLAYS -->
19 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
20
21 <window id="cat_z3950_win2" 
22     onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
23     xmlns:html="http://www.w3.org/1999/xhtml"
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 $(id) { return document.getElementById(id); }
37         
38         function my_init() {
39             try {
40                 if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.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 cat_z3950.xul');
45
46                 JSAN.use('cat.z3950'); g.z3950 = new cat.z3950();
47
48                 g.z3950.init( 
49                     { 
50                         /* this guy grabs most things through the DOM, but I want to move JSAN libraries away from that,
51                         or at the very least, push node ID's in through here. */
52                     } 
53                 );
54
55                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
56                     try { window.xulG.set_tab_name('Z39.50'); } catch(E) { alert(E); }
57                 }
58
59             } catch(E) {
60                 var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/z3950.xul', E]);
61                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
62                 alert(err_msg);
63             }
64         }
65
66         function handle_enter(ev) {
67             g.z3950.handle_enter(ev);
68         }
69
70         function default_focus() {
71             setTimeout( function() { try { g.z3950.focus(); } catch(E) { alert(E); } }, 0 );
72         }
73
74     ]]>
75     </script>
76
77     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
78      <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
79
80     <commandset id="cat_z3950_cmds">
81         <command id="cmd_broken" />
82         <command id="sel_clip" disabled="true" />
83         <command id="cmd_z3950_csv_to_printer" disabled="true" />
84         <command id="cmd_z3950_csv_to_clipboard" disabled="true" />
85         <command id="cmd_z3950_csv_to_file" disabled="true" />
86         <command id="save_columns" />
87         <command id="mark_overlay" />
88         <command id="show_in_catalog" />
89         <command id="toggle_form" />
90         <command id="marc_view" />
91     </commandset>
92
93     <groupbox flex="1">
94         <caption label="&staff.cat.z3950.marc_import.label;"/>
95             <hbox id="top_pane" oils_persist="height" flex="1">
96                 <groupbox id="x_splitter1" oils_persist="width" flex="1">
97                     <caption label="&staff.cat.z3950.query.label;"/>
98                     <vbox>
99                         <spacer flex="1"/>
100                         <description>
101                         &staff.cat.z3950.query.description;
102                         </description>
103                         <spacer flex="1"/>
104                     </vbox>
105                     <grid flex="1">
106                         <columns><column /><column flex="1" /></columns>
107                         <rows id="query_inputs" class="my_overflow">
108                             <row>
109                                 <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"/>
110                                 <menulist id="item_type_input" mytype="search_class" search_class="item_type">
111                                     <menupopup>
112                                         <menuitem label="&staff.z39_50.search_class.item_type.all;" value=""/>
113                                         <menuitem label="&staff.z39_50.search_class.item_type.bks;" value="bks"/>
114                                         <menuitem label="&staff.z39_50.search_class.item_type.ser;" value="ser"/>
115                                         <menuitem label="&staff.z39_50.search_class.item_type.vis;" value="vis"/>
116                                         <menuitem label="&staff.z39_50.search_class.item_type.rec;" value="rec"/>
117                                         <menuitem label="&staff.z39_50.search_class.item_type.sco;" value="sco"/>
118                                         <menuitem label="&staff.z39_50.search_class.item_type.map;" value="map"/>
119                                         <menuitem label="&staff.z39_50.search_class.item_type.com;" value="com"/>
120                                         <menuitem label="&staff.z39_50.search_class.item_type.mix;" value="mix"/>
121                                         <menuitem label="&staff.z39_50.search_class.item_type.url;" value="url"/>
122                                         <menuitem label="&staff.z39_50.search_class.item_type.art;" value="art"/>
123                                     </menupopup>
124                                 </menulist>
125                             </row>
126                         </rows>
127                     </grid>
128                     <hbox>
129                         <button id="raw_search" label="&staff.cat.z3950.raw_search.label;" accesskey="&staff.cat.z3950.raw_search.accesskey;" disabled="true"/> 
130                         <spacer flex="1"/>
131                         <button id="clear" label="&staff.cat.z3950.clear.label;" accesskey="&staff.cat.z3950.clear.accesskey;"/>
132                         <button id="search" label="&staff.cat.z3950.search.label;" accesskey="&staff.cat.z3950.search.accesskey;" disabled="true"/>
133                     </hbox>
134                 </groupbox>
135                 <splitter id="x_splitter" collapse="after" oils_persist="state hidden" oils_persist_peers="x_splitter1 x_splitter2"><grippy id="splitter_grippy1"/></splitter>
136                 <groupbox id="x_splitter2" oils_persist="width" flex="1">
137                     <caption label="&staff.cat.z3950.service_credentials.label;"/>
138                     <grid flex="1">
139                         <columns>
140                         <column/>
141                         <column flex="1"/>
142                         <column flex="1"/>
143                         </columns>
144                         <rows id="service_rows" class="my_overflow">
145                             <row>
146                                 <label value="&staff.cat.z3950.service.label;"/>
147                                 <label value="&staff.cat.z3950.username.label;"/>
148                                 <label value="&staff.cat.z3950.password.label;"/>
149                             </row>
150                             <row>
151                                 <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;" /> 
152                                 <textbox id="native-evergreen-catalog_username" hidden="true" context="clipboard"/>
153                                 <textbox id="native-evergreen-catalog_password" type="password" hidden="true" context="clipboard"/>
154                             </row>
155                         </rows>
156                     </grid>
157                     <hbox>
158                         <button id="save_creds" label="&staff.cat.z3950.save_creds.label;" accesskey="&staff.cat.z3950.save_creds.accesskey;"/>
159                         <spacer flex="1"/>
160                     </hbox>
161                 </groupbox>
162             </hbox>
163             <splitter id="z_splitter" collapse="before" oils_persist="state hidden" oils_persist_peers="top_pane z_splitter2"><grippy id="splitter_grippy2"/></splitter>
164             <groupbox id="z_splitter2" oils_persist="height" flex="1">
165                 <caption label="&staff.cat.z3950.results_caption.label;"/>
166                 <hbox>
167                     <hbox id="result_message" />
168                     <spacer flex="1"/>
169                     <label id="overlay_tcn_indicator"/>
170                 </hbox>
171                 <hbox>
172                     <button id="page_next" label="&staff.cat.z3950.page_next.label;" accesskey="&staff.cat.z3950.page_next.accesskey;" disabled="true"/>
173                     <button id="z3950_list_actions" oncommand="this.firstChild.showPopup();"
174                         label="&staff.cat.z3950.list_actions.label;" 
175                         accesskey="&staff.cat.z3950.list_actions.accesskey;" 
176                         type="menu" allowevents="true">
177                         <menupopup id="z3950_list_actions_popup">
178                             <menuitem command="sel_clip" label="&staff.cat.z3950.menuitem.copy_to_clipboard.label;" disabled="true" />
179                             <menuitem command="cmd_z3950_csv_to_printer" label="&staff.cat.z3950.menuitem.csv_to_printer.label;" />
180                             <menuitem command="cmd_z3950_csv_to_clipboard" label="&staff.cat.z3950.menuitem.csv_to_clipboard.label;" />
181                             <menuitem command="cmd_z3950_csv_to_file" label="&staff.cat.z3950.menuitem.csv_to_file.label;" />
182                             <menuitem command="save_columns" label="&staff.cat.z3950.menuitem.save_columns.label;" />
183                         </menupopup>
184                     </button>
185                     <button id="mark_overlay_btn"
186                         command="mark_overlay"
187                         disabled="true"
188                         label="&staff.cat.z3950.mark_overlay.label;"
189                         accesskey="&staff.cat.z3950.mark_overlay.accesskey;"/>
190                     <button id="show_in_catalog_btn"
191                         command="show_in_catalog"
192                         disabled="true"
193                         label="&staff.server.admin.transit.list.show.label;"
194                         accesskey="&staff.server.admin.transit.list.show.accesskey;"/>
195                     <spacer flex="1"/>
196                     <button id="marc_view_btn" command="marc_view" disabled="true"/>
197                     <checkbox id="marc_editor" label="&staff.cat.z3950.marc_editor.label;" accesskey="&staff.cat.z3950.marc_editor.accesskey;" oils_persist="checked" checked="true"/> 
198                     <button id="marc_import_overlay" label="&staff.cat.z3950.marc_import_overlay.label;" accesskey="&staff.cat.z3950.marc_import_overlay.accesskey;" disabled="true"/>
199                     <button id="marc_import" label="&staff.cat.z3950.result_message.marc_import.label;" accesskey="&staff.cat.z3950.result_message.marc_import.accesskey;" disabled="true"/>
200                     <button id="toggle_form_btn" command="toggle_form"/>
201                 </hbox>
202                 <hbox flex="1">
203                     <image id="jacket_image" oils_persist="width"/>
204                     <splitter id="jacket_splitter" collapse="before" oils_persist="state hidden" oils_persist_peers="jacket_image deck"><grippy id="jacket_splitter_grippy" /></splitter>
205                     <deck id="deck" flex="1" oils_persist="width">
206                         <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
207                         <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1" oils_force_external="true"/>
208                     </deck>
209                 </hbox>
210             </groupbox>
211     </groupbox>
212
213 </window>
214