]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/external/template.xul
skeleton files
[Evergreen.git] / Open-ILS / xul / staff_client / external / template.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="/xul/server/skin/evergreen.css" type="text/css"?>
9
10 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
11 <!-- LOCALIZATION -->
12 <!DOCTYPE window SYSTEM "chrome://evergreen/locale/lang.dtd">
13
14 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
15 <!-- OVERLAYS -->
16 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
17
18 <window id="example_template_win" 
19         onload="my_init()"
20         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
21
22         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
23         <!-- BEHAVIOR -->
24         <script type="text/javascript">
25                 var myPackageDir = 'evergreen'; var IAMXUL = true; var g = {};
26         </script>
27         <scripts id="openils_util_scripts"/>
28
29         <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
30         <script>
31         <![CDATA[
32                 function my_init() {
33                         try {
34                                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
35                                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
36                                 JSAN.errorLevel = "die"; // none, warn, or die
37                                 JSAN.addRepository('/xul/server/');
38                                 JSAN.use('util.error'); g.error = new util.error();
39                                 g.error.sdump('D_TRACE','my_init() for example_template.xul');
40
41                                 g.cgi = new CGI();
42                                 var session = g.cgi.param('session');
43
44                                 JSAN.use('example.template'); g.template = new example.template();
45
46                                 g.template.init( 
47                                         { 
48                                                 'session' : session,
49                                         } 
50                                 );
51
52                                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
53                                         try { window.xulG.set_tab_name('Template'); } catch(E) { alert(E); }
54                                 }
55
56                         } catch(E) {
57                                 var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
58                                         "system administrator or software developer the following:\nexample/template.xul\n" + E + '\n';
59                                 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
60                                 alert(err_msg);
61                         }
62                 }
63
64         ]]>
65         </script>
66
67         <commandset id="example_template_cmds">
68                 <command id="cmd_broken" />
69         </commandset>
70
71         <browser id="template_browser" flex="1"/>
72
73 </window>
74