]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul
Except in certain cases (like chrome://global/skin/), we can no longer reference...
[Evergreen.git] / Open-ILS / xul / staff_client / server / circ / pre_cat_fields.xul
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Patron Display -->
4 <!--
5  vim:noet:sw=4:ts=4:
6 -->
7
8 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
9 <!-- STYLESHEETS -->
10 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
11 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
12
13 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
14 <!-- LOCALIZATION -->
15 <!DOCTYPE window PUBLIC "" ""[
16         <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
17 ]>
18
19 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
20 <!-- OVERLAYS -->
21 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
22
23 <window id="pre_cat_fields" title="&staff.circ.pre_cat.window.title;"
24         orient="vertical" style="overflow: auto"
25         onload="try{my_init();font_helper(); }catch(E){alert(E);}"
26         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
27
28         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
29         <!-- BEHAVIOR -->
30         <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
31         <scripts id="openils_util_scripts"/>
32
33         <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
34
35         <script>
36         <![CDATA[
37
38                 function my_init() {
39                         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
40                         if (typeof JSAN == 'undefined') {
41                                 throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
42                         }
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 pre_cat_fields.xul');
47                         JSAN.use('OpenILS.data'); g.data = new OpenILS.data();
48                         g.data.init({'via':'stash'});
49
50             g.data.precat_dummy_title = '';
51             g.data.precat_dummy_author = '';
52             g.data.precat_dummy_isbn = '';
53             g.data.precat_submit = 'cancel';
54             g.data.stash('precat_submit');
55
56             JSAN.use('util.widgets'); JSAN.use('util.functional');
57             var x = util.widgets.make_menulist( 
58                 [ [ $("catStrings").getString("staff.cat.copy_editor.field.unset_or_null"), "<HACK:KLUDGE:NULL>" ] ].concat( 
59                     util.functional.map_list( g.data.list.circ_modifier, function(obj) { return [ obj, obj ]; } ).sort() 
60                 ) 
61             );
62             x.setAttribute('id','dummy_circ_modifier');
63             document.getElementById('placeholder').appendChild(x);
64             if (g.data.precat_circ_modifier) {
65                 x.setAttribute('value', g.data.precat_circ_modifier);
66                 x.value = g.data.precat_circ_modifier;
67             }
68                         document.getElementById('dummy_title').focus();
69                 }
70
71                 function my_finish() {
72             g.data.precat_dummy_title = document.getElementById('dummy_title').value;
73             g.data.precat_dummy_author = document.getElementById('dummy_author').value;
74             g.data.precat_dummy_isbn = document.getElementById('dummy_isbn').value;
75             var cm = document.getElementById('dummy_circ_modifier').value;
76             if (cm == '<HACK:KLUDGE:NULL>') cm = null;
77             g.data.precat_circ_modifier = cm;
78             g.data.precat_submit = 'go';
79                         g.data.stash('precat_dummy_title','precat_dummy_author','precat_dummy_isbn','precat_circ_modifier','precat_submit');
80             window.close();
81                 }
82
83         ]]>
84         </script>
85
86         <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
87         <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
88
89         <groupbox>
90                 <caption label="&staff.circ.pre_cat.caption.label;"/>
91                 <grid>
92                         <columns><column /><column flex="1"/></columns>
93                         <rows>
94                                 <row>
95                                         <label value="&staff.circ.pre_cat.dummy_title.label;" accesskey="&staff.circ.pre_cat.dummy_title.accesskey;" control="dummy_title"/>
96                                         <textbox id="dummy_title" context="clipboard"/>
97                                 </row>
98                                 <row>
99                                         <label value="&staff.circ.pre_cat.dummy_author.label;" accesskey="&staff.circ.pre_cat.dummy_author.accesskey;" control="dummy_author"/>
100                                         <textbox id="dummy_author" context="clipboard"/>
101                                 </row>
102                                 <row>
103                                         <label value="&staff.circ.pre_cat.dummy_isbn.label;" accesskey="&staff.circ.pre_cat.dummy_isbn.accesskey;" control="dummy_isbn"/>
104                                         <textbox id="dummy_isbn" context="clipboard"/>
105                                 </row>
106                                 <row>
107                                         <label value="&staff.circ.pre_cat.dummy_circ_modifier.label;" accesskey="&staff.circ.pre_cat.dummy_circ_modifier.accesskey;" control="dummy_circ_modifier"/>
108                     <box id="placeholder" />
109                                 </row>
110                         </rows>
111                 </grid>
112                 <hbox>
113                         <spacer flex="1"/>
114                         <button label="&staff.circ.pre_cat.cancel.label;" oncommand="window.close()" accesskey="&staff.circ.pre_cat.cancel.accesskey;"/>
115                         <button label="&staff.circ.pre_cat.checkout.label;" oncommand="my_finish();" accesskey="&staff.circ.pre_cat.checkout.accesskey;"/>
116                 </hbox>
117         </groupbox>
118
119 </window>
120
121