]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/cat/z3950.xul
rethinking record bucket interface
[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(); 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 my_init() {
38                         try {
39                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
40                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is 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 = "!! This software has encountered an error.  Please tell your friendly " +
61                                         "system administrator or software developer the following:\ncat/z3950.xul\n" + E + '\n';
62                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
63                                 alert(err_msg);
64                         }
65                 }
66
67                 function handle_enter(ev) {
68                         g.z3950.handle_enter(ev);
69                 }
70
71                 function default_focus() {
72                         setTimeout( function() { try { document.getElementById("username").focus(); g.z3950.focus(g.service); } catch(E) { } }, 0 );
73                 }
74
75         ]]>
76         </script>
77
78     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
79
80         <commandset id="cat_z3950_cmds">
81                 <command id="cmd_broken" />
82                 <command id="cmd_export" />
83                 <command id="sel_clip" />
84                 <command id="save_columns" />
85         </commandset>
86
87         <groupbox flex="1">
88                 <caption label="MARC Import via Z39.50"/>
89         <deck id="z3950_deck" flex="1">
90             <hbox id="top_pane" persist="height" flex="1">
91                 <vbox id="top_left_pane" persist="width" flex="1">
92                     <groupbox id="first_pane" flex="1" class="my_overflow">
93                         <caption id="c2" label="Service and Credentials" class="shrinkable_groupbox"/>
94                         <grid flex="1">
95                             <columns>
96                                 <column/>
97                                 <column/>
98                                 <column/>
99                             </columns>
100                             <rows id="service_rows">
101                                 <row>
102                                     <label value="Service"/>
103                                     <label value="Username"/>
104                                     <label value="Password"/>
105                                 </row>
106                                 <row>
107                                     <checkbox id="native-evergreen-catalog_service" mytype="service_class" service="native-evergreen-catalog" label="Local Catalog" tooltiptext="Evergreen Native Catalog" /> 
108                                     <textbox id="native-evergreen-catalog_username" hidden="true"/>
109                                     <textbox id="native-evergreen-catalog_password" type="password" hidden="true"/>
110                                 </row>
111                             </rows>
112                         </grid>
113                     </groupbox>
114                     <hbox>
115                         <button id="save_creds" label="Save as Default" accesskey="D"/>
116                     </hbox>
117                 </vbox>
118                 <splitter collapse="before"><grippy/></splitter>
119                 <vbox id="top_right_pane" persist="width" flex="1">
120                     <groupbox id="second_pane" flex="1" class="my_overflow">
121                         <caption label="Query" class="shrinkable_groupbox"/>
122                         <hbox>
123                             <spacer flex="1"/>
124                             <description>
125                                 Tip: Click a search field label and then the "Save as Default" button to have that field focused by default.
126                             </description>
127                             <spacer flex="1"/>
128                         </hbox>
129                         <grid>
130                             <columns><column /><column flex="1" /></columns>
131                             <rows id="query_inputs">
132                             <!--
133                                 <row>
134                                     <label id="tcn_label" value="&staff.z39_50.search_class.tcn;" control="tcn_input" onclick="g.z3950.default_attr = 'tcn'" accesskey="0" style="-moz-user-focus: ignore"/>
135                                     <textbox id="tcn_input" mytype="search_class" search_class="tcn" onkeypress="handle_enter(event)"/>
136                                 </row><row>
137                                     <label id="isbn_label" value="&staff.z39_50.search_class.isbn;" control="isbn_input" onclick="g.z3950.default_attr = 'isbn'" style="-moz-user-focus: ignore"/>
138                                     <textbox id="isbn_input" mytype="search_class" search_class="isbn" onkeypress="handle_enter(event)"/>
139                                 </row><row>
140                                     <label id="issn_label" value="&staff.z39_50.search_class.issn;" control="issn_input" onclick="g.z3950.default_attr = 'issn'" style="-moz-user-focus: ignore"/>
141                                     <textbox id="issn_input" mytype="search_class" search_class="issn" onkeypress="handle_enter(event)"/>
142                                 </row><row>
143                                     <label id="title_label" value="&staff.z39_50.search_class.title;" control="title_input" onclick="g.z3950.default_attr = 'title'" style="-moz-user-focus: ignore"/>
144                                     <textbox id="title_input" mytype="search_class" search_class="title" onkeypress="handle_enter(event)"/>
145                                 </row><row>
146                                     <label id="author_label" value="&staff.z39_50.search_class.author;" control="author_input" onclick="g.z3950.default_attr = 'author'" style="-moz-user-focus: ignore"/>
147                                     <textbox id="author_input" mytype="search_class" search_class="author" onkeypress="handle_enter(event)"/>
148                                 </row><row>
149                                     <label id="lccn_label" value="&staff.z39_50.search_class.lccn;" control="lccn_input" onclick="g.z3950.default_attr = 'lccn'" style="-moz-user-focus: ignore"/>
150                                     <textbox id="lccn_input" mytype="search_class" search_class="lccn" onkeypress="handle_enter(event)"/>
151                                 </row><row>
152                                     <label id="pubdate_label" value="&staff.z39_50.search_class.pubdate;" control="pubdate_input" onclick="g.z3950.default_attr = 'pubdate'" style="-moz-user-focus: ignore"/>
153                                     <textbox id="pubdate_input" mytype="search_class" search_class="pubdate" onkeypress="handle_enter(event)"/>
154                                 </row><row>
155                                     <label id="publisher_label" value="&staff.z39_50.search_class.publisher;" control="publisher_input" onclick="g.z3950.default_attr = 'publisher'" style="-moz-user-focus: ignore"/>
156                                     <textbox id="publisher_input" mytype="search_class" search_class="publisher" onkeypress="handle_enter(event)"/>
157                                 </row>
158                             -->
159                                 <row>
160                                     <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"/>
161                                     <menulist id="item_type_input" mytype="search_class" search_class="item_type">
162                                         <menupopup>
163                                             <menuitem label="&staff.z39_50.search_class.item_type.all;" value=""/>
164                                             <menuitem label="&staff.z39_50.search_class.item_type.bks;" value="bks"/>
165                                             <menuitem label="&staff.z39_50.search_class.item_type.ser;" value="ser"/>
166                                             <menuitem label="&staff.z39_50.search_class.item_type.vis;" value="vis"/>
167                                             <menuitem label="&staff.z39_50.search_class.item_type.rec;" value="rec"/>
168                                             <menuitem label="&staff.z39_50.search_class.item_type.sco;" value="sco"/>
169                                             <menuitem label="&staff.z39_50.search_class.item_type.map;" value="map"/>
170                                             <menuitem label="&staff.z39_50.search_class.item_type.com;" value="com"/>
171                                             <menuitem label="&staff.z39_50.search_class.item_type.mix;" value="mix"/>
172                                             <menuitem label="&staff.z39_50.search_class.item_type.url;" value="url"/>
173                                             <menuitem label="&staff.z39_50.search_class.item_type.art;" value="art"/>
174                                         </menupopup>
175                                     </menulist>
176                                 </row>
177                             </rows>
178                         </grid>
179                     </groupbox>
180                     <hbox>
181                         <button id="clear" label="Clear Form" accesskey="C"/>
182                         <button id="search" label="Search" accesskey="S"/>
183                         <spacer flex="1"/>
184                         <button id="results_page" label="Results Page" accesskey="P"/>
185                     </hbox>
186                 </vbox>
187             </hbox>
188             <groupbox flex="1" id="third_pane" persist="height">
189                 <caption label="Results" />
190                 <hbox id="result_message" />
191                 <hbox>
192                     <button id="search_form" label="Search Form" accesskey="F" />
193                     <button id="page_next" label="Fetch More Results" accesskey="M" disabled="true"/>
194                     <button id="export" label="CSV to Clipboard" command="cmd_export" accesskey=""/>
195                     <button id="clip_button" command="sel_clip" label="Copy to Clipboard" disabled="true"/>
196                     <button id="save_cols_btn" command="save_columns" label="Save Columns" />
197                     <spacer flex="1"/>
198                     <button id="marc_view" label="MARC View" accesskey="V" disabled="true"/>
199                     <button id="marc_import_overlay" label="MARC Editor for Overlay" accesskey="O" disabled="true"/>
200                     <button id="marc_import" label="MARC Editor for Import" accesskey="I" disabled="true"/>
201                 </hbox>
202                 <deck id="deck" flex="1">
203                     <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
204                     <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1"/>
205                 </deck>
206             </groupbox>
207         </deck>
208     </groupbox>
209
210 </window>
211