]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/cat/z3950.xul
d2cd0a0583b38b50158c812d0167b75edce7e822
[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: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                                 g.cgi = new CGI();
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 = "!! This software has encountered an error.  Please tell your friendly " +
63                                         "system administrator or software developer the following:\ncat/z3950.xul\n" + E + '\n';
64                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
65                                 alert(err_msg);
66                         }
67                 }
68
69                 function handle_enter(ev) {
70                         g.z3950.handle_enter(ev);
71                 }
72
73                 function default_focus() {
74                         setTimeout( function() { try { document.getElementById("username").focus(); g.z3950.focus(g.service); } catch(E) { alert(E); } }, 0 );
75                 }
76
77         ]]>
78         </script>
79
80         <commandset id="cat_z3950_cmds">
81                 <command id="cmd_broken" />
82                 <command id="sel_clip" />
83                 <command id="save_columns" />
84         </commandset>
85
86         <groupbox flex="1">
87                 <caption label="MARC Import via Z39.50"/>
88                 <groupbox orient="horizontal">
89                         <caption id="c2" label="Service and Credentials" class="shrinkable_groupbox"/>
90                         <label value="Service:" />
91                         <hbox id="menu_placeholder" flex="1"/>
92                         <label value="Username:" control="username" accesskey="U"/>
93                         <textbox id="username" />
94                         <label value="Password:" control="password"/>
95                         <textbox id="password" />
96                         <button id="save_creds" label="Save as Default" accesskey="D"/>
97                 </groupbox>
98                 <groupbox>
99                         <caption label="Query" class="shrinkable_groupbox"/>
100                         <hbox>
101                                 <spacer flex="1"/>
102                                 <description>
103                                         Tip: Click a search field label and then the "Save as Default" button to have that field focused by default.
104                                 </description>
105                                 <spacer flex="1"/>
106                         </hbox>
107                         <grid>
108                                 <columns><column /><column flex="1" /><column /><column flex="1"/><column /><column flex="1"/></columns>
109                                 <rows id="query_inputs">
110                                         <row>
111                                                 <label value="&staff.z39_50.search_class.tcn;" control="tcn_input" onclick="g.z3950.default_attr = 'tcn'" accesskey="0" style="-moz-user-focus: ignore"/>
112                                                 <textbox id="tcn_input" mytype="search_class" search_class="tcn" onkeypress="handle_enter(event)"/>
113                                                 <label value="&staff.z39_50.search_class.isbn;" control="isbn_input" onclick="g.z3950.default_attr = 'isbn'" style="-moz-user-focus: ignore"/>
114                                                 <textbox id="isbn_input" mytype="search_class" search_class="isbn" onkeypress="handle_enter(event)"/>
115                                                 <label value="&staff.z39_50.search_class.issn;" control="issn_input" onclick="g.z3950.default_attr = 'issn'" style="-moz-user-focus: ignore"/>
116                                                 <textbox id="issn_input" mytype="search_class" search_class="issn" onkeypress="handle_enter(event)"/>
117                                         </row>
118                                         <row>
119                                                 <label value="&staff.z39_50.search_class.title;" control="title_input" onclick="g.z3950.default_attr = 'title'" style="-moz-user-focus: ignore"/>
120                                                 <textbox id="title_input" mytype="search_class" search_class="title" onkeypress="handle_enter(event)"/>
121                                                 <label value="&staff.z39_50.search_class.author;" control="author_input" onclick="g.z3950.default_attr = 'author'" style="-moz-user-focus: ignore"/>
122                                                 <textbox id="author_input" mytype="search_class" search_class="author" onkeypress="handle_enter(event)"/>
123                                                 <label value="&staff.z39_50.search_class.lccn;" control="lccn_input" onclick="g.z3950.default_attr = 'lccn'" style="-moz-user-focus: ignore"/>
124                                                 <textbox id="lccn_input" mytype="search_class" search_class="lccn" onkeypress="handle_enter(event)"/>
125                                         </row>
126                                         <row>
127                                                 <label value="&staff.z39_50.search_class.pubdate;" control="pubdate_input" onclick="g.z3950.default_attr = 'pubdate'" style="-moz-user-focus: ignore"/>
128                                                 <textbox id="pubdate_input" mytype="search_class" search_class="pubdate" onkeypress="handle_enter(event)"/>
129                                                 <label value="&staff.z39_50.search_class.publisher;" control="publisher_input" onclick="g.z3950.default_attr = 'publisher'" style="-moz-user-focus: ignore"/>
130                                                 <textbox id="publisher_input" mytype="search_class" search_class="publisher" onkeypress="handle_enter(event)"/>
131                                                 <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"/>
132                                                 <menulist id="item_type_input" mytype="search_class" search_class="item_type">
133                                                         <menupopup>
134                                                                 <menuitem label="&staff.z39_50.search_class.item_type.all;" value=""/>
135                                                                 <menuitem label="&staff.z39_50.search_class.item_type.bks;" value="bks"/>
136                                                                 <menuitem label="&staff.z39_50.search_class.item_type.ser;" value="ser"/>
137                                                                 <menuitem label="&staff.z39_50.search_class.item_type.vis;" value="vis"/>
138                                                                 <menuitem label="&staff.z39_50.search_class.item_type.rec;" value="rec"/>
139                                                                 <menuitem label="&staff.z39_50.search_class.item_type.sco;" value="sco"/>
140                                                                 <menuitem label="&staff.z39_50.search_class.item_type.map;" value="map"/>
141                                                                 <menuitem label="&staff.z39_50.search_class.item_type.com;" value="com"/>
142                                                                 <menuitem label="&staff.z39_50.search_class.item_type.mix;" value="mix"/>
143                                                                 <menuitem label="&staff.z39_50.search_class.item_type.url;" value="url"/>
144                                                                 <menuitem label="&staff.z39_50.search_class.item_type.art;" value="art"/>
145                                                         </menupopup>
146                                                 </menulist>
147                                         </row>
148                                 </rows>
149                         </grid>
150                         <spacer flex="1"/>
151                         <hbox>
152                                 <button id="raw_search" label="Raw Search" accesskey="w"/>
153                                 <spacer flex="1"/>
154                                 <button id="clear" label="Clear Form" accesskey="C"/>
155                                 <button id="search" label="Search" accesskey="S"/>
156                         </hbox>
157                 </groupbox>
158                 <splitter><grippy/></splitter>
159                 <groupbox flex="1">
160                         <caption label="Results" />
161                         <vbox id="result_message" />
162                         <hbox>
163                                 <button id="page_next" label="Fetch More Results" accesskey="M" disabled="true"/>
164                                 <button id="clip_button" command="sel_clip" label="Copy to Clipboard" disabled="true"/>
165                                 <button id="save_cols_btn" command="save_columns" label="Save Columns" />
166                                 <spacer flex="1"/>
167                                 <button id="marc_view" label="MARC View" accesskey="V" disabled="true"/>
168                                 <button id="marc_import_overlay" label="MARC Editor for Overlay" accesskey="O" disabled="true"/>
169                                 <button id="marc_import" label="MARC Editor for Import" accesskey="I" disabled="true"/>
170                         </hbox>
171                         <deck id="deck" flex="1">
172                                 <tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
173                                 <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1"/>
174                         </deck>
175                 </groupbox>
176         </groupbox>
177
178 </window>
179