]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/main/data.xul
better. the window title here is more an id and independent of the real window title
[Evergreen.git] / Open-ILS / xul / staff_client / server / main / data.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Main, Authentication Window -->
4
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
6 <!-- PRESENTATION -->
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 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/auth.css" type="text/css"?>
10
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
12 <!-- LOCALIZATION -->
13 <!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
14
15 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
16 <!-- OVERLAYS -->
17 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
18
19 <window id="data_win" 
20         onload="try { data_init(); } catch(E) { alert(E); }"
21         title="&staff.auth.title;"
22         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
23
24
25         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
26         <!-- BEHAVIOR -->
27         <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
28         <scripts id="openils_util_scripts"/>
29
30         <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/lang.js"/>
31         <script type="text/javascript" src="/xul/server/main/lang.js"/>
32         <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
33         <script>
34         <![CDATA[
35                 dump("entities['lang.version'] = " + entities['lang.version'] + '\n');
36
37                 function data_init() {
38
39                         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
40
41                         if (typeof JSAN == 'undefined') {
42                                 throw(
43                                         "The JSAN library object is missing."
44                                 );
45                         }
46                         /////////////////////////////////////////////////////////////////////////////
47
48                         JSAN.errorLevel = "die"; // none, warn, or die
49                         JSAN.addRepository('/xul/server/');
50
51                         JSAN.use('OpenILS.data');
52                         g.data = new OpenILS.data()
53                         g.data.on_error = xulG.auth.logoff;
54                         g.data.entities = entities;
55                         g.data.stash('entities');
56
57                         g.data.session = xulG.auth.session.key;
58                         g.data.on_complete = function () {
59
60                                 g.data.stash('list','hash','tree','temp');
61                                 g.data._debug_stash();
62
63                                 xulG.window.open(urls.XUL_MENU_FRAME
64                                         + '?session='+window.escape(xulG.auth.session.key)
65                                         + '&authtime='+window.escape(xulG.auth.session.authtime)
66                                         + '&server='+window.escape(xulG.url),
67                                         'main'+xulG.window.window_name_increment(),'chrome,resizable'
68                                 );
69
70                         }
71
72                         g.data.init();
73                 }
74         ]]>
75         </script>
76
77         <groupbox id="data_groupbox" flex="1"> <caption label="Loading data..."/> </groupbox>
78
79 </window>
80