]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/external/dojo_template.js
remove references to SVN now that we're using Git
[working/Evergreen.git] / Open-ILS / xul / staff_client / external / dojo_template.js
1 var error;
2
3 function my_init() {
4     try {
5         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
6         if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
7         JSAN.errorLevel = "die"; // none, warn, or die
8         JSAN.addRepository('/xul/server/');
9         JSAN.use('util.error'); error = new util.error();
10         error.sdump('D_TRACE','my_init() for main_test.xul');
11
12         dojo.require('openils.PermaCrud');
13
14         var types = new openils.PermaCrud(
15             {
16                 authtoken :ses()
17             }
18         ).retrieveAll('coust');
19
20         dojo.forEach(types,
21             function(type) {
22                 alert( js2JSON(type) );
23             }
24         );
25
26         if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
27             try { window.xulG.set_tab_name('Test'); } catch(E) { alert(E); }
28         }
29
30     } catch(E) {
31         try { error.standard_unexpected_error_alert('main/test.xul',E); } catch(F) { alert(E); }
32     }
33 }
34
35