browser wrapper without xulG
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 12 Mar 2006 07:12:01 +0000 (07:12 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 12 Mar 2006 07:12:01 +0000 (07:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3337 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index dbea41e..67bd300 100644 (file)
@@ -21,6 +21,7 @@ util.browser.prototype = {
 
                        obj.session = params['session'];
                        obj.url = params['url'];
+                       obj.push_xulG = params['push_xulG'];
 
                        JSAN.use('util.controller'); obj.controller = new util.controller();
                        obj.controller.init(
@@ -96,6 +97,8 @@ util.browser.prototype = {
 
        'push_variables' : function() {
                try {
+                       var obj = this;
+                       if (!obj.push_xulG) return;
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        var cw = this.get_content();
                        cw.IAMXUL = true;
@@ -124,7 +127,6 @@ util.browser.prototype = {
                        var n = obj.getWebNavigation();
                        s += ('webNavigation = ' + n + '\n');
                        s += ('webNavigation.canGoForward = ' + n.canGoForward + '\n');
-                       s += ('webNavigation.canGoBack = ' + n.canGoBack + '\n');
                        if (n.canGoForward) {
                                obj.controller.view.cmd_forward.disabled = false;
                                obj.controller.view.cmd_forward.setAttribute('disabled','false');
@@ -132,6 +134,13 @@ util.browser.prototype = {
                                obj.controller.view.cmd_forward.disabled = true;
                                obj.controller.view.cmd_forward.setAttribute('disabled','true');
                        }
+               } catch(E) {
+                       s += E + '\n';
+               }
+               try {
+                       var n = obj.getWebNavigation();
+                       s += ('webNavigation = ' + n + '\n');
+                       s += ('webNavigation.canGoBack = ' + n.canGoBack + '\n');
                        if (n.canGoBack) {
                                obj.controller.view.cmd_back.disabled = false;
                                obj.controller.view.cmd_back.setAttribute('disabled','false');
@@ -139,9 +148,11 @@ util.browser.prototype = {
                                obj.controller.view.cmd_back.disabled = true;
                                obj.controller.view.cmd_back.setAttribute('disabled','true');
                        }
+
                } catch(E) {
                        s += E + '\n';
                }
+
                dump(s);
        },
 
index ac4ece4..2be1fbb 100644 (file)
 
                                JSAN.use('util.browser'); g.browser = new util.browser();
 
+                               var push_xulG = true;
+                               if (g.cgi.param('no_xulG') || xulG.no_xulG) push_xulG = false;
+
                                g.browser.init( 
                                        { 
                                                'url' : xulG.url_prefix(url),
                                                'session' : session,
+                                               'push_xulG' : push_xulG,
                                        } 
                                );
 
index 85a7f47..9ef46ca 100644 (file)
 
                                JSAN.use('util.browser'); g.browser = new util.browser();
 
+                               var push_xulG = true;
+                               if (g.cgi.param('no_xulG') || xulG.no_xulG) push_xulG = false;
+
                                g.browser.init( 
                                        { 
                                                'url' : url,
                                                'session' : session,
+                                               'push_xulG' : push_xulG,
                                        } 
                                );