]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/server/circ/copy_status.xul
Acq: Find PO from which copy originated
[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                 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
76                 window.xulG.fetched_copy_details = {};
77
78                 if (window.xulG.from_item_details_new) {
79                     // Switch item status display to "alternate view"
80                     g.copy_status.controller.control_map.cmd_alt_view[1](0);
81                 }
82
83                 JSAN.use('util.exec'); var exec = new util.exec();
84                 var funcs = [];
85                 for (var i = 0; i < g.barcodes.length; i++) {
86                     funcs.push(
87                         function(b){
88                             return function() {
89                                 window.xulG.fetched_copy_details[b] =
90                                     g.copy_status.copy_status(b);
91                             }
92                         }(g.barcodes[i])
93                     );
94                 }
95                 exec.chain(funcs);
96             } catch(E) {
97                 var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ.copy_status.xul', E]);
98                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
99                 alert(err_msg);
100             }
101         }
102
103         function default_focus() { try { setTimeout( function() { document.getElementById('copy_status_barcode_entry_textbox').focus(); }, 0); } catch(E) {} }
104     ]]>
105     </script>
106
107     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
108     <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
109
110     <commandset id="copy_status_cmds">
111         <command id="cmd_copy_status_submit_barcode" />
112         <command id="cmd_copy_status_upload_file" />
113         <command id="cmd_copy_status_print" />
114         <command id="cmd_alt_view" />
115         <command id="cmd_triggered_events" />
116         <command id="save_columns" />
117         <command id="cmd_find_acq_po" disabled="true"/>
118         <command id="cmd_create_brt" disabled="true"/>
119         <command id="cmd_book_item_now" disabled="true"/>
120         <command id="sel_copy_details" disabled="true"/>
121         <command id="sel_mark_items_damaged" disabled="true"/>
122         <command id="sel_mark_items_missing" disabled="true"/>
123         <command id="cmd_replace_barcode" disabled="true"/>
124         <command id="sel_patron" disabled="true"/>
125         <command id="sel_checkin" disabled="true"/>
126         <command id="sel_renew" disabled="true"/>
127         <command id="sel_edit" disabled="true"/>
128         <command id="sel_opac" disabled="true"/>
129         <command id="sel_bucket" disabled="true"/>
130         <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;" />
131         <command id="sel_spine" disabled="true"/>
132         <command id="sel_transit_abort" disabled="true"/>
133         <command id="sel_clip" disabled="true"/>
134         
135         <command id="cmd_add_items" disabled="true"/>
136         <command id="cmd_delete_items" disabled="true"/>
137         <command id="cmd_transfer_items" disabled="true"/>
138         <command id="cmd_add_volumes" disabled="true"/>
139         <command id="cmd_edit_volumes" disabled="true"/>
140         <command id="cmd_delete_volumes" disabled="true"/>
141         <command id="cmd_mark_volume" disabled="true"/>
142         <command id="cmd_mark_library" disabled="true"/>
143         <command id="cmd_transfer_volume" disabled="true"/>
144
145     </commandset>
146
147     <popupset id="copy_status_popupset"/>
148     <popupset id="copy_cat_status_popupset"/>
149
150     <box id="copy_status_main" />
151
152 </window>
153