1 dump('entering main/main.js\n');
4 dump('entering main_init()\n');
6 var pref = Components.classes["@mozilla.org/preferences-service;1"]
7 .getService(Components.interfaces.nsIPrefBranch);
9 pref.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead");
10 pref.setCharPref("capability.principal.codebase.p0.id", "http://dev.gapines.org");
13 if (typeof JSAN == 'undefined') {
15 "The JSAN library object is missing."
18 /////////////////////////////////////////////////////////////////////////////
20 JSAN.errorLevel = "die"; // none, warn, or die
21 JSAN.addRepository('..');
23 //JSAN.use('test.test'); test.test.hello_world();
30 JSAN.use('util.error');
31 G.error = new util.error();
32 G.error.sdump('D_ERROR','Testing');
34 JSAN.use('main.window');
35 G.window = new main.window();
37 JSAN.use('auth.controller');
38 G.auth = new auth.controller( { 'window' : mw } );
40 JSAN.use('OpenILS.data');
41 G.OpenILS.data = new OpenILS.data()
42 G.OpenILS.data.on_error = G.auth.logoff;
43 G.OpenILS.data.entities = entities;
44 G.OpenILS.data.stash('entities');
46 G.auth.on_login = function() {
48 G.OpenILS.data.session = G.auth.session.key;
49 G.OpenILS.data.on_complete = function () {
51 G.OpenILS.data.stash('list','hash');
52 G.OpenILS.data._debug_stash();
54 G.window.open(urls.opac + urls.remote_menu_frame
55 + '?session='+mw.escape(G.auth.session.key),'test','chrome');
57 G.OpenILS.data.init();
62 /////////////////////////////////////////////////////////////////////////////
65 var error = "!! This software has encountered an error. Please tell your friendly " +
66 "system administrator or software developer the following:\n" + E + '\n';
67 try { G.error.sdump('D_ERROR',error); } catch(E) { dump(error); }
70 dump('exiting main_init()\n');
73 dump('exiting main/main.js\n');