]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/copy_status.xul
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
[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                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
37                 if (typeof JSAN == 'undefined') {
38                     throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
39                 }
40                 JSAN.errorLevel = "die"; // none, warn, or die
41                 JSAN.addRepository('/xul/server/');
42                 JSAN.use('util.error'); g.error = new util.error();
43                 g.error.sdump('D_TRACE','my_init() for copy_status.xul');
44
45                 JSAN.use('circ.copy_status'); g.copy_status = new circ.copy_status();
46                 g.copy_status.init( 
47                     { 
48                     } 
49                 );
50
51                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
52                     try {
53                         window.xulG.set_tab_name(document.getElementById('circStrings').getString('staff.circ.copy_status.tab_name'));
54                     } catch(E) {
55                         alert(E);
56                     }
57                 }
58
59                 JSAN.use('OpenILS.data');
60                 g.data = new OpenILS.data();
61                 g.data.stash_retrieve();
62
63                 if (window.xulG.barcodes && window.xulG.barcodes.length) {
64                     g.barcodes = window.xulG.barcodes;
65                 } else {
66                     g.barcodes = xul_param(
67                         'barcodes',{
68                             'concat' : true,
69                             'JSON2js_if_cgi' : true,
70                             'stash_name':'temp_barcodes_for_copy_status',
71                             'clear_xpcom' : true,
72                         }
73                     ) || [];
74                 }
75                 if (xulG.copy_ids) {
76                     JSAN.use('util.functional');
77                     JSAN.use('util.network');
78                     var net = new util.network();
79                     g.barcodes = g.barcodes.concat(
80                         util.functional.map_list(
81                             net.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE',[xulG.copy_ids]),
82                             function(o) {
83                                 return o.barcode();
84                             }
85                         )
86                     );
87                 }
88
89                 window.xulG.fetched_copy_details = {};
90
91                 if (window.xulG.from_item_details_new) {
92                     // Switch item status display to "alternate view"
93                     g.copy_status.controller.control_map.cmd_alt_view[1](0);
94                 }
95
96                 JSAN.use('util.exec'); var exec = new util.exec();
97                 var funcs = [];
98                 for (var i = 0; i < g.barcodes.length; i++) {
99                     funcs.push(
100                         function(b){
101                             return function() {
102                                 window.xulG.fetched_copy_details[b] =
103                                     g.copy_status.copy_status(b);
104                             }
105                         }(g.barcodes[i])
106                     );
107                 }
108                 exec.chain(funcs);
109             } catch(E) {
110                 var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ.copy_status.xul', E]);
111                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
112                 alert(err_msg);
113             }
114         }
115
116         function default_focus() { try { setTimeout( function() { document.getElementById('copy_status_barcode_entry_textbox').focus(); }, 0); } catch(E) {} }
117     ]]>
118     </script>
119
120     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
121     <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
122
123     <commandset id="copy_status_cmds">
124         <command id="cmd_copy_status_submit_barcode" />
125         <command id="cmd_copy_status_upload_file" />
126         <command id="cmd_copy_status_print" />
127         <command id="cmd_alt_view" />
128         <command id="cmd_triggered_events" />
129         <command id="save_columns" />
130         <command id="cmd_find_acq_po" disabled="true"/>
131         <command id="cmd_create_brt" disabled="true"/>
132         <command id="cmd_book_item_now" disabled="true"/>
133         <command id="cmd_request_items" disabled="true"/>
134         <command id="sel_copy_details" disabled="true"/>
135         <command id="sel_mark_items_damaged" disabled="true"/>
136         <command id="sel_mark_items_missing" disabled="true"/>
137         <command id="cmd_replace_barcode" disabled="true"/>
138         <command id="sel_patron" disabled="true"/>
139         <command id="sel_checkin" disabled="true"/>
140         <command id="sel_renew" disabled="true"/>
141         <command id="sel_edit" disabled="true"/>
142         <command id="sel_vol_copy_edit" disabled="true"/>
143         <command id="sel_opac" 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