]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/copy_status.xul
Add "Show Holds on Bib" menu items
[working/Evergreen.git] / Open-ILS / xul / staff_client / server / circ / copy_status.xul
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Patron Display -->
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 <?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
10
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
12 <!-- LOCALIZATION -->
13 <!DOCTYPE window PUBLIC "" ""[
14     <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
15 ]>
16
17 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
18 <!-- OVERLAYS -->
19 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
20 <?xul-overlay href="/xul/server/circ/copy_status_overlay.xul"?>
21
22 <window id="copy_status_win" active="true" 
23     onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
24     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
25
26     <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
27     <!-- BEHAVIOR -->
28         <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
29         <scripts id="openils_util_scripts"/>
30
31     <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
32     <script>
33     <![CDATA[
34         function my_init() {
35             try {
36                 if (typeof JSAN == 'undefined') {
37                     throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
38                 }
39                 JSAN.errorLevel = "die"; // none, warn, or die
40                 JSAN.addRepository('/xul/server/');
41                 JSAN.use('util.error'); g.error = new util.error();
42                 g.error.sdump('D_TRACE','my_init() for copy_status.xul');
43
44                 JSAN.use('circ.copy_status'); g.copy_status = new circ.copy_status();
45                 g.copy_status.init( 
46                     { 
47                     } 
48                 );
49
50                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
51                     try {
52                         window.xulG.set_tab_name(document.getElementById('circStrings').getString('staff.circ.copy_status.tab_name'));
53                     } catch(E) {
54                         alert(E);
55                     }
56                 }
57
58                 JSAN.use('OpenILS.data');
59                 g.data = new OpenILS.data();
60                 g.data.stash_retrieve();
61
62                 if (window.xulG.barcodes && window.xulG.barcodes.length) {
63                     g.barcodes = window.xulG.barcodes;
64                 } else {
65                     g.barcodes = xul_param(
66                         'barcodes',{
67                             'concat' : true,
68                             'JSON2js_if_cgi' : true,
69                             'stash_name':'temp_barcodes_for_copy_status',
70                             'clear_xpcom' : true,
71                         }
72                     ) || [];
73                 }
74                 if (xulG.copy_ids) {
75                     JSAN.use('util.functional');
76                     JSAN.use('util.network');
77                     var net = new util.network();
78                     g.barcodes = g.barcodes.concat(
79                         util.functional.map_list(
80                             net.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE',[xulG.copy_ids]),
81                             function(o) {
82                                 return o.barcode();
83                             }
84                         )
85                     );
86                 }
87
88                 window.xulG.fetched_copy_details = {};
89
90                 if (window.xulG.from_item_details_new) {
91                     // Switch item status display to "alternate view"
92                     g.copy_status.controller.control_map.cmd_alt_view[1](0);
93                 }
94
95                 JSAN.use('util.exec'); var exec = new util.exec();
96                 var funcs = [];
97                 for (var i = 0; i < g.barcodes.length; i++) {
98                     funcs.push(
99                         function(b){
100                             return function() {
101                                 window.xulG.fetched_copy_details[b] =
102                                     g.copy_status.copy_status(b);
103                             }
104                         }(g.barcodes[i])
105                     );
106                 }
107                 exec.chain(funcs);
108             } catch(E) {
109                 var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ.copy_status.xul', E]);
110                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
111                 alert(err_msg);
112             }
113         }
114
115         function default_focus() { try { setTimeout( function() { document.getElementById('copy_status_barcode_entry_textbox').focus(); }, 0); } catch(E) {} }
116     ]]>
117     </script>
118
119     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
120     <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
121
122     <commandset id="copy_status_cmds">
123         <command id="cmd_copy_status_submit_barcode" />
124         <command id="cmd_copy_status_upload_file" />
125         <command id="cmd_copy_status_print" />
126         <command id="cmd_alt_view" />
127         <command id="cmd_triggered_events" />
128         <command id="save_columns" />
129         <command id="cmd_find_acq_po" disabled="true"/>
130         <command id="cmd_create_brt" disabled="true"/>
131         <command id="cmd_book_item_now" disabled="true"/>
132         <command id="cmd_request_items" disabled="true"/>
133         <command id="sel_copy_details" disabled="true"/>
134         <command id="sel_mark_items_damaged" disabled="true"/>
135         <command id="sel_mark_items_missing" disabled="true"/>
136         <command id="cmd_replace_barcode" disabled="true"/>
137         <command id="sel_patron" disabled="true"/>
138         <command id="sel_checkin" disabled="true"/>
139         <command id="sel_renew" disabled="true"/>
140         <command id="sel_edit" disabled="true"/>
141         <command id="sel_vol_copy_edit" disabled="true"/>
142         <command id="sel_opac" disabled="true"/>
143         <command id="sel_opac_holds" disabled="true"/>
144         <command id="sel_bucket" disabled="true"/>
145         <command id="sel_record_bucket" disabled="true" label="&staff.circ.copy_status_overlay.sel_record_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_record_bucket.accesskey;" />
146         <command id="sel_spine" disabled="true"/>
147         <command id="sel_transit_abort" disabled="true"/>
148         <command id="sel_clip" disabled="true"/>
149         
150         <command id="cmd_add_items" disabled="true"/>
151         <command id="cmd_delete_items" disabled="true"/>
152         <command id="cmd_transfer_items" disabled="true"/>
153         <command id="cmd_add_volumes" disabled="true"/>
154         <command id="cmd_edit_volumes" disabled="true"/>
155         <command id="cmd_delete_volumes" disabled="true"/>
156         <command id="cmd_mark_volume" disabled="true"/>
157         <command id="cmd_mark_library" disabled="true"/>
158         <command id="cmd_transfer_volume" disabled="true"/>
159
160     </commandset>
161
162     <popupset id="copy_status_popupset"/>
163     <popupset id="copy_cat_status_popupset"/>
164
165     <box id="copy_status_main" />
166
167 </window>
168