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