clean this up later. Main problem is that I was trying to js2JSON things like chrome...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Aug 2005 16:45:39 +0000 (16:45 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Aug 2005 16:45:39 +0000 (16:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1708 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/Makefile
Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS.js
Evergreen/staff_client/chrome/content/evergreen/auth/auth.js
Evergreen/staff_client/chrome/content/evergreen/util/error.js
Evergreen/staff_client/chrome/content/evergreen/util/fm_utils.js
Evergreen/staff_client/chrome/content/evergreen/util/util_overlay.xul
Evergreen/staff_client/chrome/content/evergreen/util/win.js

index f725594..b53e9df 100644 (file)
@@ -3,8 +3,9 @@ PACKAGE=Evergreen
 DESCRIPTION=Evergreen Staff Client 
 BUILD=2005072719
 
-RETRIEVE_FIELDMAPPER=wget -N http://gapines.org/js/util/fieldmapper.js
-RETRIEVE_ORG_TREE=wget -N http://gapines.org/js/util/OrgTree.js
+RETRIEVE_FIELDMAPPER=wget -N http://spacely.georgialibraries.org:8080/opac/common/js/util/fieldmapper.js
+RETRIEVE_FM_ALL=wget -N http://spacely.georgialibraries.org:8080/opac/common/js/fmall.js
+RETRIEVE_ORG_TREE=wget -N http://spacely.georgialibraries.org:8080/opac/common/js/OrgTree.js
 RETRIEVE_CLIENT_CONFIG=cp ../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml .
 
 all: build package
@@ -36,9 +37,10 @@ stamp:
 generated:
        @echo
        @echo These things are installation specific.  The staff client is the last thing you should try to build.
-       (cd chrome/content/evergreen/util ; ${RETRIEVE_FIELDMAPPER} );
+       #(cd chrome/content/evergreen/util ; ${RETRIEVE_FIELDMAPPER} );
        (cd chrome/content/evergreen/util ; ${RETRIEVE_ORG_TREE} );
        (cd chrome/content/evergreen/conf ; ${RETRIEVE_CLIENT_CONFIG} );
+       (cd chrome/content/evergreen/Open-ILS/util/ ; ${RETRIEVE_FM_ALL} );
 
 open-ils:
        cp ../../OpenSRF/src/javascript/*.js chrome/content/evergreen/OpenSRF/
index 2f4a13c..afc208e 100644 (file)
@@ -4,7 +4,7 @@ function OpenILS_init(params) {
        try {
 
                switch(params.app) {
-                       case 'Auth' : auth_init(params); break;
+                       case 'Auth' : auth_init(params); dump('after auth_init\n'); break;
                        case 'AppShell' : app_shell_init(params); register_AppShell(params.w); break;
                        case 'Opac' : opac_init(params); break;
                        case 'PatronSearch' : patron_search_init(params); break;
@@ -18,7 +18,9 @@ function OpenILS_init(params) {
        try {
 
                //register_document(params.w.document);
+               dump('before register_window\n');
                register_window(params.w);
+               dump('after register_window\n');
 
        } catch(E) { sdump('D_ERROR',js2JSON(E)+'\n'); }
        sdump('D_TRACE_EXIT',arg_dump(arguments));
index 53c8b21..e5044ff 100644 (file)
@@ -47,15 +47,25 @@ var auth_meter_incr = 10;
 function auth_init() {
        sdump('D_AUTH','TESTING: auth.js: ' + mw.G['main_test_variable'] + '\n');
        sdump('D_AUTH',arg_dump(arguments));
+dump('a1\n');
        var np = document.getElementById('name_prompt');
+dump('a2\n');
        np.addEventListener("keypress",handle_keypress,false);
+dump('a3\n');
        np.focus();
+dump('a4\n');
        var pp = document.getElementById('password_prompt');
+dump('a5\n');
        pp.addEventListener("keypress",handle_keypress,false);
+dump('a6\n');
        self.addEventListener("unload",nice_shutdown,false);
+dump('a7\n');
        G['sound'] = xp_sound_init(); 
+dump('a8\n');
        //G.sound.beep();
+dump('a9\n');
        snd_logon();
+dump('a10\n');
 }
 
 function handle_keypress(ev) {
@@ -337,10 +347,15 @@ function org_type_callback(request) {
                alert('Login failed on aout_list: ' + js2JSON(E)); enable_login_prompts(); return;
        }*/
        mw.G.aout_list = aout_list;
+       dump('auth 0\n');
        mw.G.aout_hash = convert_object_list_to_hash( aout_list );
+       dump('auth 1\n');
        mw.G.org_tree = globalOrgTree;
+       dump('auth 2\n');
        mw.G.org_tree_hash = convert_object_list_to_hash( flatten_ou_branch( globalOrgTree ) );
+       dump('auth 3\n');
        mw.G.user_ou = find_ou( mw.G.org_tree, mw.G.user_ou );
+       dump('auth 4\n');
 
        user_async_request(
                'open-ils.actor',
index a567137..7ac7c48 100644 (file)
@@ -8,7 +8,7 @@ var debugDump = true;
 var arg_dump_full = false;
 
 var sdump_levels = {
-       'D_NONE' : false,
+       'D_NONE' : true,
        'D_ALL' : false,
        'D_ERROR' : true,
        'D_TRACE' :  false,
@@ -155,7 +155,8 @@ function arg_dump(args,dump_these) {
                                } else {
                                        s += '\targ #' + i + ' = ';
                                        try {
-                                               s += js2JSON( arg );
+                                               //s += js2JSON( arg );
+                                               s += arg;
                                        } catch(E) {
                                                s += arg;
                                        }
index 01cbd17..7936453 100644 (file)
@@ -61,6 +61,12 @@ function flatten_ou_branch(branch) {
        return my_array;
 }
 
+/*
+function findOrgUnit(id) {
+       return find_ou(globalOrgTree, id);
+}
+*/
+
 function find_ou(tree,id) {
        if (typeof(id)=='object') { id = id.id(); }
        if (tree.id()==id) {
index e3b3b67..0841c75 100644 (file)
        <script src="validate.js" />    <!-- some validation functions -->
        <script src="widgets.js" />     <!-- some convenience functions for XUL/HTML elements.  want to eliminate overlap with webutils -->
        <script src="populate.js" />    <!-- populate widgets (like menus) with values -->
-       <script src="fieldmapper.js" /> <!-- our Objects for things like patrons, books, etc.  This is generated. -->
        <!--
-       <script src="OrgTree.js" />
-       --><!-- our Organization Hierarchy.  This is generated. -->
+       <script src="fieldmapper.js" /> 
+       -->     <!-- our Objects for things like patrons, books, etc.  This is generated. -->
 
        <!--
-       -->
        <script src="chrome://evergreen/content/Open-ILS/util/utils.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/config.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/CGI.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/OrgTree.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/dtree.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/fmcore.js" />
-       <script src="chrome://evergreen/content/Open-ILS/util/fmgen.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/RemoteRequest.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/opac_utils.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/init.js" />
        <script src="chrome://evergreen/content/Open-ILS/util/added_content.js" />
+       -->
+       <script src="chrome://evergreen/content/Open-ILS/util/md5.js" />
+       <script src="chrome://evergreen/content/Open-ILS/util/JSON.js" />
+       <script>dump('fmall LOADING++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script src="chrome://evergreen/content/Open-ILS/util/fmall.js" />
+       <script>dump('fmgen LOADING++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script src="chrome://evergreen/content/Open-ILS/util/fmgen.js" />
+       <script>dump('remoterequest LOADING++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script src="chrome://evergreen/content/Open-ILS/util/RemoteRequest.js" />
+       <script>dump('ORGTREE LOADING++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script src="chrome://evergreen/content/Open-ILS/util/OrgTree.js" />
+       <script>dump('ORGTREE FINISHED++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script>dump('ORG_utilS LOADING++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script src="chrome://evergreen/content/Open-ILS/util/org_utils.js" />
+       <script>dump('ORG_utilS FINISHED++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
+       <script>dump('orgtree = ' + js2JSON( globalOrgTree ) + '\n');</script>
+       <script>dump('0++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n');</script>
        <script>IAMXUL = true;</script>
 
        <script src="ses.js" />         <!-- my wrapper over the OpenSRF communication layer.. Jabber and XMLHttpRequest -->
        <script src="print.js" />       <!-- some xpcom for printing -->
        <script src="sound.js" />       <!-- some xpcom for sound -->
 
-       <!--<script src="chrome://evergreen/content/Open-ILS/util/browser.js" />-->     <!-- browser detection.. am I not using Mozilla? doh :) -->
+       <!--
+       <script src="chrome://evergreen/content/Open-ILS/util/browser.js" />
+       -->     <!-- browser detection.. am I not using Mozilla? doh :) -->
 
-       <!--<script src="chrome://evergreen/content/Open-ILS/widgets/Box.js" />-->              <!-- shared code between OPAC and staff client for surveys -->
-       <!--<script src="chrome://evergreen/content/Open-ILS/widgets/ListBox.js" />-->
-       <!--<script src="chrome://evergreen/content/Open-ILS/widgets/Survey.js" />-->
+       <!--
+       <script src="chrome://evergreen/content/Open-ILS/widgets/Box.js" />
+       -->             <!-- shared code between OPAC and staff client for surveys -->
+       <!--
+       <script src="chrome://evergreen/content/Open-ILS/widgets/ListBox.js" />
+       -->
+       <!--
+       <script src="chrome://evergreen/content/Open-ILS/widgets/Survey.js" />
+       -->
 
+       <script>
+               dump('Finished all the js in the util overlay...\n');
+       </script>
 </util>
 
 </overlay>
index 7df98dd..059b5e0 100644 (file)
@@ -148,7 +148,7 @@ function unregister_AppShell(w) {
 }
 
 function register_window(w) {
-       sdump('D_WIN',arg_dump(arguments,{0:true}));
+       sdump('D_WIN',arg_dump(arguments,{0:false}));
        mw.G.win_list.push(w);
        mw.G.last_win = w;
        sdump('D_TRACE_EXIT',arg_dump(arguments));