var G = {}; // the master Global variable
+
+var debug_ignore_auth_failures = false;
+
G['main_window'] = self;
-G['win_list'] = new Object();
-G['doc_list'] = new Object();
+G['win_list'] = [];
+G['appshell_list'] = [];
+G['doc_list'] = [];
G['window_name_increment'] = 0;
G['auth_ses'] = '';
G['user_ou'] = '';
G['actsc_hash']; // actor::stat_cat
var mw = G['main_window'];
-var auth_meter_incr = 8;
+var auth_meter_incr = 10;
function auth_init() {
sdump('D_AUTH','TESTING: auth.js: ' + mw.G['main_test_variable'] + '\n');
auth_init = request.getResultObject();
if (!auth_init) { throw('null result'); }
} catch(E) {
- alert('Login failed on auth_init: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on auth_init: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
sdump( 'D_AUTH', 'D_AUTH_INIT: ' + typeof(auth_init) + ' : ' + auth_init + '\n');
if (!auth_ses) { throw('null result'); }
if (auth_ses == 0) { throw('0 result'); }
} catch(E) {
- alert('Login failed on auth_ses: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on auth_ses: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.auth_ses = [ auth_ses ];
sdump( 'D_AUTH', 'D_AUTH_SES: ' + typeof(mw.G['auth_ses'][0]) + ' : ' + mw.G['auth_ses'][0] + '\n');
if (!ap_list) { throw('null result'); }
if (ap_list.length == 0) { throw('zero length result'); }
} catch(E) {
- alert('Login failed on ap_list: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on ap_list: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.ap_list = ap_list;
mw.G.ap_hash = convert_object_list_to_hash( ap_list );
if (!cit_list) { throw('null result'); }
if (cit_list.length == 0) { throw('zero length result'); }
} catch(E) {
- alert('Login failed on cit_list: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on cit_list: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.cit_list = cit_list;
mw.G.cit_hash = convert_object_list_to_hash( cit_list );
if (!cst_list) { throw('null result'); }
if (cst_list.length == 0) { throw('zero length result'); }
} catch(E) {
- alert('Login failed on cst_list: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on cst_list: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.cst_list = cst_list;
mw.G.cst_hash = convert_object_list_to_hash( cst_list );
if (!acpl_list) { throw('null result'); }
if (acpl_list.length == 0) { throw('zero length result'); }
} catch(E) {
- alert('Login failed on acpl_list: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on acpl_list: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.acpl_list = acpl_list;
mw.G.acpl_hash = convert_object_list_to_hash( acpl_list );
if (!ccs_list) { throw('null result'); }
if (ccs_list.length == 0) { throw('zero length result'); }
} catch(E) {
- alert('Login failed on ccs_list: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on ccs_list: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.ccs_list = ccs_list;
mw.G.ccs_hash = convert_object_list_to_hash( ccs_list );
if (!user) { throw('null result'); }
if (typeof(user) != 'object') { throw('result not an object' + user); }
} catch(E) {
- alert('Login failed on user: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on user: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.user = user;
mw.G.user_ou = user.home_ou();
if (typeof(my_orgs) != 'object') { throw('result not an object' + my_orgs); }
if (my_orgs.length == 0) { throw('empty my_orgs'); }
} catch(E) {
- alert('Login failed on my_orgs: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on my_orgs: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.my_orgs = my_orgs;
if (!actsc_list) { throw('null result'); }
if (actsc_list.length == 0) { throw('zero length result'); }
} catch(E) {
- alert('Login failed on asc_list: ' + js2JSON(E)); enable_login_prompts(); return;
+ alert('Login failed on asc_list: ' + js2JSON(E));
+ if (!debug_ignore_auth_failures) {
+ enable_login_prompts(); return;
+ }
}
mw.G.actsc_list = actsc_list;
mw.G.actsc_hash = convert_object_list_to_hash( actsc_list );
spawn_main();
+ mw.minimize();
+
}