from the Department of Redundancy Department
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Jul 2005 01:05:59 +0000 (01:05 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Jul 2005 01:05:59 +0000 (01:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1015 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS.js
Evergreen/staff_client/chrome/content/evergreen/main/app_shell.js
Evergreen/staff_client/chrome/content/evergreen/main/app_shell.xul
Evergreen/staff_client/chrome/content/evergreen/main/clam_shell.js
Evergreen/staff_client/chrome/content/evergreen/main/clam_shell.xul
Evergreen/staff_client/chrome/content/evergreen/opac/opac.js
Evergreen/staff_client/chrome/content/evergreen/opac/opac.xul
Evergreen/staff_client/chrome/content/evergreen/patron/patron_search_form.js
Evergreen/staff_client/chrome/content/evergreen/patron/patron_search_form.xul
Evergreen/staff_client/chrome/content/evergreen/util/shell.html
Evergreen/staff_client/chrome/content/evergreen/util/xuledit.xul

index be02d32..82c94ff 100644 (file)
@@ -11,7 +11,7 @@ function OpenILS_init(params) {
                        case 'PatronSearchForm' : patron_search_form_init(params); break;
                }
 
-               register_document(params.d);
+               register_document(params.w.document);
                register_window(params.w);
 
        } catch(E) { dump(js2JSON(E)+'\n'); }
@@ -31,7 +31,7 @@ function OpenILS_exit(params) {
                        case 'PatronSearchForm' : patron_search_form_exit(params); break;
                }
 
-               unregister_document(params.d);
+               unregister_document(params.w.document);
                unregister_window(params.w);
 
        } catch(E) { dump(js2JSON(E)+'\n'); }
index 9e91769..6e60403 100644 (file)
@@ -3,11 +3,11 @@ sdump('D_TRACE','Loading app_shell.js\n');
 function app_shell_init(p) {
        dump("TESTING: app_shell.js: " + mw.G['main_test_variable'] + '\n');
 
-       p.w.close_tab = function (t1,t2) { return close_tab(p.d,t1,t2); };
+       p.w.close_tab = function (t1,t2) { return close_tab(p.w.document,t1,t2); };
        p.w.find_free_tab = function (tabs) { return find_free_tab(tabs); };
-       p.w.new_tab = function () { return new_tab(p.d,p.tabbox); };
-       p.w.replace_tab = function (label,chrome,params) { return replace_tab(p.d,p.tabbox,label,chrome,params); };
-       p.w.get_frame_in_tab = function (idx, all_or_vis) { return get_frame_in_tab( p.d, p.tabbox, idx, all_or_vis ); }; 
+       p.w.new_tab = function () { return new_tab(p.w.document,p.tabbox); };
+       p.w.replace_tab = function (label,chrome,params) { return replace_tab(p.w.document,p.tabbox,label,chrome,params); };
+       p.w.get_frame_in_tab = function (idx, all_or_vis) { return get_frame_in_tab( p.w.document, p.tabbox, idx, all_or_vis ); }; 
        
        //p.w.replace_tab('Tab','chrome://evergreen/content/main/about.xul');
        spawn_javascript_shell(p.w.document,'replace_tab','main_tabbox',{});
index 2cd7e2c..334b5d4 100644 (file)
@@ -7,7 +7,7 @@
 <window id="app_shell_win"
        orient="vertical" style="overflow: auto" width="800" height="500"
        sizemode="maximized" persist="width height" 
-       onload="params.tabbox = 'main_tabbox'; params.w = window; params.d = document; params.app = 'AppShell'; mw.OpenILS_init(params);"
+       onload="params.tabbox = 'main_tabbox'; params.w = window; params.app = 'AppShell'; mw.OpenILS_init(params);"
        onunload="mw.OpenILS_exit(params);"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
index 81b0d7c..fadc223 100644 (file)
@@ -4,9 +4,9 @@ function clam_shell_init(p) {
        dump("TESTING: clam_shell.js: " + mw.G['main_test_variable'] + '\n');
        if (p) {
                if (p.horizontal) {
-                       get_widget(p.d,p.clamshell).orient = 'horizontal';
+                       get_widget(p.w.document,p.clamshell).orient = 'horizontal';
                } else if (p.vertical) {
-                       get_widget(p.d,p.clamshell).orient = 'vertical';
+                       get_widget(p.w.document,p.clamshell).orient = 'vertical';
                }
        }
        var nl = get_widget(p.clamshell).getElementsByTagName('deck');
@@ -27,19 +27,19 @@ function clam_shell_init(p) {
                else
                        return second_deck.selectedPanel;
        }
-       p.w.set_first_deck = function (idx) { return set_deck(p.d,first_deck,idx); };
-       p.w.set_second_deck = function (idx) { return set_deck(p.d,second_deck,idx); };
+       p.w.set_first_deck = function (idx) { return set_deck(p.w.document,first_deck,idx); };
+       p.w.set_second_deck = function (idx) { return set_deck(p.w.document,second_deck,idx); };
        p.w.replace_card_in_first_deck = function (idx,chrome,params) {
-               return replace_card_in_deck(p.d,first_deck,idx,chrome,params);
+               return replace_card_in_deck(p.w.document,first_deck,idx,chrome,params);
        };
        p.w.replace_card_in_second_deck = function (idx,chrome,params) {
-               return replace_card_in_deck(p.d,second_deck,idx,chrome,params);
+               return replace_card_in_deck(p.w.document,second_deck,idx,chrome,params);
        };
        p.w.new_card_in_first_deck = function (chrome,params) {
-               return new_card_in_deck(p.d,first_deck,chrome,params);
+               return new_card_in_deck(p.w.document,first_deck,chrome,params);
        };
        p.w.new_card_in_second_deck = function (chrome,params) {
-               return new_card_in_deck(p.d,second_deck,chrome,params);
+               return new_card_in_deck(p.w.document,second_deck,chrome,params);
        };
 
 }
index 441e3a0..6eebeb8 100644 (file)
@@ -7,7 +7,7 @@
 <page id="clam_shell_win"
        orient="vertical" style="overflow: auto" width="800" height="500"
        sizemode="maximized" persist="width height" 
-       onload="params.clamshell = 'ClamShell_main'; params.w = window; params.d = document; params.app = 'ClamShell'; mw.OpenILS_init(params);"
+       onload="params.clamshell = 'ClamShell_main'; params.w = window; params.app = 'ClamShell'; mw.OpenILS_init(params);"
        onunload="mw.OpenILS_exit(params);"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
index e338b95..a3fbe1a 100644 (file)
@@ -10,10 +10,10 @@ var opac_appframe; /* i hold the actual opac iframe */
 
 
 /* init the opac */
-function opac_init(params) {
+function opac_init(p) {
        sdump('D_OPAC',"Initing OPAC\n");
 
-       var box = params.d.getElementById('opac_vbox');
+       var box = p.w.document.getElementById('opac_vbox');
        opac_iframe = box.appendChild(document.createElement("browser"));
 
        opac_iframe.setAttribute("type", "content-primary");
index 5a958c4..016dcd4 100644 (file)
@@ -2,7 +2,7 @@
 <!-- Application: Evergreen Staff Client -->
 
 <page id="opac_win" orient="vertical" style="overflow: auto;" persist="width height"
-       onload="params.w = window; params.d = document; params.app = 'Opac'; mw.OpenILS_init(params);" 
+       onload="params.w = window; params.app = 'Opac'; mw.OpenILS_init(params);" 
        onunload="mw.OpenILS_exit(params);" 
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
index 55d6b86..15460c1 100644 (file)
@@ -4,22 +4,21 @@ function patron_search_form_init(p) {
        dump("TESTING: patron_search_form.js: " + mw.G['main_test_variable'] + '\n');
        dump('p.w          = ' + p.w + '\n');
        dump('p.w.document = ' + p.w.document + '\n');
-       dump('p.d          = ' + p.d + '\n');
        p.w.crazy_search_hash = {}; // hash[ field ] = { 'value' : ???, 'group' : ??? }
 
-       var nl = p.d.getElementsByTagName('textbox');
+       var nl = p.w.document.getElementsByTagName('textbox');
        for (var i = 0; i < nl.length; i++) 
                nl[i].addEventListener(
                        'change',
                        function (ev) {
                                return patron_search_form_textbox_handler(
-                                       p.d,
+                                       p.w.document,
                                        ev.target,
                                        p.w.crazy_search_hash); },
                        false);
 
-       var search_command = p.d.getElementById('cmd_search');
-       var clear_command = p.d.getElementById('cmd_clear');
+       var search_command = p.w.document.getElementById('cmd_search');
+       var clear_command = p.w.document.getElementById('cmd_clear');
 
        p.w.register_search_callback = function (f) { search_command.addEventListener( 'command',f,false ); };
 
@@ -27,7 +26,7 @@ function patron_search_form_init(p) {
                clear_command.addEventListener(
                        'command',
                        function (ev) {
-                               var nl = p.d.getElementsByTagName('textbox');
+                               var nl = p.w.document.getElementsByTagName('textbox');
                                for (var i = 0; i < nl.length; i++) 
                                        nl[i].value = '';
                                p.w.crazy_search_hash = {}; },
index 23513e0..f7dce0f 100644 (file)
@@ -7,7 +7,7 @@
 <page id="patron_search_form_win"
        orient="vertical" style="overflow: auto" width="800" height="500"
        sizemode="maximized" persist="width height" 
-       onload="params.w = window; params.d = document; params.app = 'PatronSearchForm'; mw.OpenILS_init(params);"
+       onload="params.w = window; params.app = 'PatronSearchForm'; mw.OpenILS_init(params);"
        onunload="mw.OpenILS_exit(params);"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
index c662c41..1c3fc36 100644 (file)
@@ -674,7 +674,7 @@ form { margin: 0; padding: 0; }
 </style>
 </head>
 
-<body onload="params.w = window; params.d = document; params.app = 'Shell'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
+<body onload="params.w = window; params.app = 'Shell'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
 
  <div id="output"><h3>JavaScript Shell 1.3.1</h3><div>Features: autocompletion of property names with Tab, multiline input with Shift+Enter, input history with (Ctrl+) Up/Down, <a accesskey=M href="javascript:go('scope(Math); mathHelp();');">Math</a>, <a accesskey=H href="http://www.squarefree.com/shell/?ignoreReferrerFrom=shell1.3.1">help</a></div><div>Values and functions: ans, print(string), <a accesskey=P href="javascript:go('props(ans)')">props(object)</a>, <a accesskey=B href="javascript:go('blink(ans)')">blink(node)</a>, load(scriptURL), scope(object)</div></div>
 
index 1ee9396..79ade3f 100644 (file)
@@ -3,7 +3,7 @@
 <!-- Edited by Jason for Evergreen -->
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <window id="xuledit" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="Live XUL Editor"
-onload="params.w = window; params.d = document; params.app = 'Xuledit'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
+onload="params.w = window; params.app = 'Xuledit'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
 <script type="application/x-javascript" src="xuledit.js"/>
 <vbox flex="1">
 <textbox id="ta" multiline="true" wrap="true" flex="1" onkeydown="resetTimeout()"