fix nav buttons
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 10 Jan 2006 04:42:05 +0000 (04:42 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 10 Jan 2006 04:42:05 +0000 (04:42 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2667 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/browser.js
Open-ILS/xul/staff_client/chrome/content/evergreen/util/browser.xul

index f5dc07a..08dfe93 100644 (file)
@@ -86,20 +86,9 @@ util.browser.prototype = {
 
                try {
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       /*
-                       var cw = this.controller.view.browser_browser.contentWindow.wrappedJSObject; 
-                       var cd = this.controller.view.browser_browser.contentDocument; 
-                       dump('contentWindow.wrappedJSObject = ' + cw + '\n');
-                       dump('contentWindow.wrappedJSObject.wrappedJSObject = ' + cw.wrappedJSObject + '\n');
-                       dump('contentDocument = ' + cd + '\n');
-                       dump('contentWindow.wrappedJSObject.document = ' + cw.document + '\n');
-                       dump('contentWindow.wrappedJSObject.document.ownerDocument = ' + cw.document.ownerDocument + '\n');
-                       dump('contentWindow.wrappedJSObject.document.parentNode = ' + cw.document.parentNode + '\n');
-                       */
                        this.controller.view.browser_browser.contentWindow.wrappedJSObject.IAMXUL = true;
                        if (window.xulG) {
                                this.controller.view.browser_browser.contentWindow.wrappedJSObject.xulG = window.xulG;
-                               dump('xulG = ' + js2JSON(xulG) + '\n');
                                dump('xulG = ' + js2JSON(this.controller.view.browser_browser.contentWindow.wrappedJSObject.xulG) + '\n');
                        }
                } catch(E) {
@@ -112,6 +101,7 @@ util.browser.prototype = {
        },
 
        'updateNavButtons' : function() {
+               var obj = this; var s = '';
                try {
                        var n = obj.getWebNavigation();
                        s += ('webNavigation = ' + n + '\n');
@@ -132,8 +122,9 @@ util.browser.prototype = {
                                obj.controller.view.cmd_back.setAttribute('disabled','true');
                        }
                } catch(E) {
-                       s += E;
+                       s += E + '\n';
                }
+               dump(s);
        },
 
        'buildProgressListener' : function() {
@@ -152,7 +143,6 @@ util.browser.prototype = {
                                        var s = '';
                                        const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
                                        const nsIChannel = Components.interfaces.nsIChannel;
-                                       //obj.push_variables(); obj.updateNavButtons();
                                        if (stateFlags == 65540 || stateFlags == 65537 || stateFlags == 65552) { return; }
                                        s = ('onStateChange: stateFlags = ' + stateFlags + ' status = ' + status + '\n');
                                        if (stateFlags & nsIWebProgressListener.STATE_IS_REQUEST) {
index ead7fca..ce6edc2 100644 (file)
@@ -77,8 +77,8 @@
 
        <vbox flex="1">
                <hbox>
-                       <button id="back" label="Go Back" command="cmd_back" accesskey="b"/>
-                       <button id="forward" label="Go Forward" command="cmd_forward" accesskey="d"/>
+                       <button id="back" label="Go Back" command="cmd_back" accesskey="b" disabled="true"/>
+                       <button id="forward" label="Go Forward" command="cmd_forward" accesskey="d" disabled="true"/>
                        <spacer flex="1"/>
                        <button id="browser_print" label="Print Page" command="cmd_print"/>
                </hbox>