1 dump('entering main/main.js\n');
4 const Simple=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
5 var simple=new Simple( );
6 for (var list in simple) { dump(list + '\n'); }
8 simple.wrappedJSObject.OpenILS.prototype.data = { 'hello' : 'world' };
9 dump( 'simple.wrappedJSObject.OpenILS.prototype.data : ' + js2JSON(simple.wrappedJSObject.OpenILS.prototype.data) + '\n');
13 const Simple=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
14 var simple=new Simple( );
15 dump( 'simple.wrappedJSObject.OpenILS.prototype.data : ' + js2JSON(simple.wrappedJSObject.OpenILS.prototype.data) + '\n');
19 function main_init() {
20 dump('entering main_init()\n');
25 var pref = Components.classes["@mozilla.org/preferences-service;1"]
26 .getService(Components.interfaces.nsIPrefBranch);
28 pref.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead");
29 pref.setCharPref("capability.principal.codebase.p0.id", "http://dev.gapines.org");
32 if (typeof JSAN == 'undefined') {
34 "The JSAN library object is missing."
37 /////////////////////////////////////////////////////////////////////////////
39 JSAN.errorLevel = "die"; // none, warn, or die
40 JSAN.addRepository('..');
42 //JSAN.use('test.test'); test.test.hello_world();
49 JSAN.use('util.error');
50 G.error = new util.error();
51 G.error.sdump('D_ERROR','Testing');
53 JSAN.use('main.window');
54 G.window = new main.window();
56 JSAN.use('auth.controller');
57 G.auth = new auth.controller( mw );
59 G.auth.on_login = function() {
61 JSAN.use('OpenILS.data');
62 G.OpenILS.data = new OpenILS.data( G.auth );
63 G.OpenILS.data.on_complete = function () {
65 G.window.open('http://dev.gapines.org/xul/server/main/menu_frame.xul?session='+mw.escape(G.auth.session.key),'test','chrome');
67 G.OpenILS.data.init();
72 /////////////////////////////////////////////////////////////////////////////
75 var error = "!! This software has encountered an error. Please tell your friendly " +
76 "system administrator or software developer the following:\n" + E + '\n';
77 try { G.error.sdump('D_ERROR',error); } catch(E) { dump(error); }
80 dump('exiting main_init()\n');
83 dump('exiting main/main.js\n');