]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/external/template.xul
Merge branch 'master' of git.evergreen-ils.org:Evergreen-DocBook into doc_consolidati...
[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/global.css" type="text/css"?>
9
10 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
11 <!-- LOCALIZATION -->
12 <!DOCTYPE window PUBLIC "" ""[
13     <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
14 ]>
15
16 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
17 <!-- OVERLAYS -->
18 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
19
20 <window id="example_template_win" 
21     onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
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="/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') { throw( "The JSAN library object is missing."); }
38                 JSAN.errorLevel = "die"; // none, warn, or die
39                 JSAN.addRepository('/xul/server/');
40                 JSAN.use('util.error'); g.error = new util.error();
41                 g.error.sdump('D_TRACE','my_init() for example_template.xul');
42
43                 g.cgi = new CGI();
44                 var session = g.cgi.param('session');
45
46                 JSAN.use('example.template'); g.template = new example.template();
47
48                 g.template.init( 
49                     { 
50                         'session' : session,
51                     } 
52                 );
53
54                 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
55                     try { window.xulG.set_tab_name('Template'); } catch(E) { alert(E); }
56                 }
57
58             } catch(E) {
59                 try { g.error.standard_unexpected_error_alert('example/template.xul',E); } catch(F) { alert(E); }
60             }
61         }
62
63     ]]>
64     </script>
65
66     <commandset id="example_template_cmds">
67         <command id="cmd_broken" />
68     </commandset>
69
70     <browser id="template_browser" flex="1"/>
71
72 </window>
73