[open-ils-commits] r15643 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/util (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Feb 25 15:58:15 EST 2010


Author: phasefx
Date: 2010-02-25 15:58:10 -0500 (Thu, 25 Feb 2010)
New Revision: 15643

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js
   trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
   trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
Log:
Reload button for staff client's browser, and some missing DTD entities

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-02-25 20:37:21 UTC (rev 15642)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-02-25 20:58:10 UTC (rev 15643)
@@ -52,6 +52,13 @@
 <!ENTITY common.true "True">
 <!ENTITY common.false "False">
 
+<!ENTITY common.browser.forward.label "Go Forward">
+<!ENTITY common.browser.forward.accesskey "d">
+<!ENTITY common.browser.backward.label "Go Back">
+<!ENTITY common.browser.backward.accesskey "B">
+<!ENTITY common.browser.reload.label "Reload">
+<!ENTITY common.browser.reload.accesskey "l">
+
 <!ENTITY common.textbox.cut "Cut">
 <!ENTITY common.textbox.copy "Copy">
 <!ENTITY common.textbox.paste "Paste">

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js	2010-02-25 20:37:21 UTC (rev 15642)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js	2010-02-25 20:58:10 UTC (rev 15643)
@@ -72,6 +72,19 @@
                                     obj.error.sdump('D_ERROR',err);
                                 }
                             }
+                        ],
+                        'cmd_reload' : [
+                            ['command'],
+                            function() {
+                                try {
+                                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                                    var n = obj.getWebNavigation();
+                                    n.reload( Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE );
+                                } catch(E) {
+                                    var err = 'cmd_reload: ' + E;
+                                    obj.error.sdump('D_ERROR',err);
+                                }
+                            }
                         ]
                     }
                 }
@@ -99,6 +112,7 @@
 
     'get_content' : function() {
         try {
+            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
             if (this.controller.view.browser_browser.contentWindow.wrappedJSObject) {
                 return this.controller.view.browser_browser.contentWindow.wrappedJSObject;
             } else {
@@ -133,6 +147,7 @@
 
     'getWebNavigation' : function() {
         try {
+            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
             var wn = this.controller.view.browser_browser.webNavigation;
             var s = this.url + '\n' + this.get_content().location.href + '\n';
             s += ('getWebNavigation() = ' + wn + '\n');
@@ -144,6 +159,7 @@
     },
 
     'updateNavButtons' : function() {
+        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
         var obj = this; 
         var s = obj.url + '\n' + obj.get_content().location.href + '\n';
         try {

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul	2010-02-25 20:37:21 UTC (rev 15642)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul	2010-02-25 20:58:10 UTC (rev 15643)
@@ -99,14 +99,16 @@
     <commandset id="util_browser_cmds">
         <command id="cmd_broken" />
         <command id="cmd_print" />
-        <command id="cmd_back" />
-        <command id="cmd_forward" />
+        <command id="cmd_back" label="&common.browser.backward.label;" accesskey="&common.browser.backward.accesskey;" />
+        <command id="cmd_reload" label="&common.browser.reload.label;" accesskey="&common.browser.reload.accesskey;" />
+        <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
     </commandset>
 
     <vbox flex="1">
         <hbox>
-            <button id="back" label="Go Back" command="cmd_back" accesskey="b" disabled="true" hidden="true"/>
-            <button id="forward" label="Go Forward" command="cmd_forward" accesskey="d" disabled="true" hidden="true"/>
+            <button id="back" command="cmd_back" disabled="true" hidden="true"/>
+            <button id="reload" command="cmd_reload" disabled="false" hidden="false"/>
+            <button id="forward" command="cmd_forward" disabled="true" hidden="true"/>
             <spacer flex="1"/>
             <label id="debug" value="Debug" disabled="true" onclick="var m = (this.getAttribute('tooltiptext')+'\n'); dump(m); alert(m);"/>
             <button id="browser_print" label="Print Page" command="cmd_print" hidden="true"/>

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul	2010-02-25 20:37:21 UTC (rev 15642)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul	2010-02-25 20:58:10 UTC (rev 15643)
@@ -99,14 +99,16 @@
     <commandset id="util_browser_cmds">
         <command id="cmd_broken" />
         <command id="cmd_print" />
-        <command id="cmd_back" />
-        <command id="cmd_forward" />
+        <command id="cmd_back" label="&common.browser.backward.label;" accesskey="&common.browser.backward.accesskey;" />
+        <command id="cmd_reload" label="&common.browser.reload.label;" accesskey="&common.browser.reload.accesskey;" />
+        <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
     </commandset>
 
     <vbox flex="1">
         <hbox>
-            <button id="back" label="Go Back" command="cmd_back" accesskey="b" disabled="true" hidden="true"/>
-            <button id="forward" label="Go Forward" command="cmd_forward" accesskey="d" disabled="true" hidden="true"/>
+            <button id="back" command="cmd_back" disabled="true" hidden="true"/>
+            <button id="reload" command="cmd_reload" disabled="false" hidden="false"/>
+            <button id="forward" command="cmd_forward" disabled="true" hidden="true"/>
             <spacer flex="1"/>
             <button id="browser_print" label="Print Page" oldcommand="cmd_print" hidden="true"
                 oncommand="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (g.browser.alt_print) { JSAN.use('util.print'); var p = new util.print(); p.NSPrint(g.browser.get_content(),false,{}); } else { g.browser.get_content().print(); }"



More information about the open-ils-commits mailing list