]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/chrome/content/circ/offline.xul
Improve Firefox/XULRunner Support
[Evergreen.git] / Open-ILS / xul / staff_client / chrome / content / circ / offline.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Example Template for remote xul -->
4
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
6 <!-- STYLESHEETS -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
9
10 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
11 <!-- LOCALIZATION -->
12 <!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
13
14 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
15 <!-- OVERLAYS -->
16 <?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay_offline.xul"?>
17
18 <window id="offline_win" sizemode="maximized"
19     onload="try { my_init(); } catch(E) { alert(E); }"
20     windowtype="eg_offline"
21     xmlns:html="http://www.w3.org/1999/xhtml"
22     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
23
24     <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
25     <!-- BEHAVIOR -->
26         <script type="text/javascript">
27         var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
28     </script>
29         <scripts id="openils_util_scripts"/>
30
31     <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
32     <script>
33     <![CDATA[
34         var offlineStrings;
35
36         function my_init() {
37             try {
38                 offlineStrings = document.getElementById('offlineStrings');
39
40                         if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); }
41                 JSAN.errorLevel = "die"; // none, warn, or die
42                 JSAN.addRepository('..');
43                 JSAN.use('util.error'); g.error = new util.error();
44                 g.error.sdump('D_TRACE','my_init() for offline.xul');
45
46                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
47                     try { window.xulG.set_tab_name(offlineStrings.getString('circ.standalone')); } catch(E) { alert(E); }
48                 }
49
50                 g.cgi = new CGI();
51
52                 JSAN.use('circ.offline'); g.offline = new circ.offline();
53
54                 g.offline.init();
55
56
57                 JSAN.use('util.date');
58                 
59                 function update_clock() {
60                     /* I18N to-do: enable localized date formats */
61                     var today = util.date.formatted_date(new Date(),"%F %H:%M:%s");
62                     document.getElementById('today').setAttribute('label',today);
63                     setTimeout(update_clock,1);
64                 }
65
66                 update_clock();
67
68             } catch(E) {
69                 var err_msg = offlineStrings.getFormattedString('common.exception', ["circ/offline.xul", E]);
70                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
71                 alert(err_msg);
72             }
73         }
74
75     ]]>
76     </script>
77
78     <messagecatalog id="offlineStrings" src="chrome://open_ils_staff_client/locale/offline.properties"/>
79
80     <groupbox flex="1" class="my_overflow">
81         <caption label="&staff.circ.offline.main.label;"/>
82         <hbox id="nav">
83             <button id="today" onclick="alert('&common.unimplemented;');" tooltiptext="&staff.circ.offline.server_time.tooltiptext;"/>
84             <spacer flex="1"/>
85             <button id="cmd_checkout" label="&staff.circ.offline.cmd_checkout.label;" accesskey="&staff.circ.offline.cmd_checkout.accesskey;"/>
86             <button id="cmd_renew" label="&staff.circ.offline.cmd_renew.label;" accesskey="&staff.circ.offline.cmd_renew.accesskey;"/>
87             <button id="cmd_in_house_use" label="&staff.circ.offline.cmd_in_house_use.label;" accesskey="&staff.circ.offline.cmd_in_house_use.accesskey;"/>
88             <button id="cmd_checkin" label="&staff.circ.offline.cmd_checkin.label;" accesskey="&staff.circ.offline.cmd_checkin.accesskey;"/>
89             <button id="cmd_register_patron" label="&staff.circ.offline.cmd_register_patron.label;" accesskey="&staff.circ.offline.cmd_register_patron.accesskey;"/>
90             <button id="cmd_print_last_receipt" label="&staff.circ.offline.cmd_print_last_receipt.label;" accesskey="&staff.circ.offline.cmd_print_last_receipt.accesskey;"/>
91             <button id="cmd_exit" label="&staff.circ.offline.cmd_exit.label;" accesskey="&staff.circ.offline.cmd_exit.accesskey;"/>
92         </hbox>
93         <deck id="main" style="border: solid thin red; background-color: #FFAAAA;" flex="1">
94             <vbox flex="1">
95             </vbox>
96         </deck>
97     </groupbox>
98
99 </window>
100