go ahead and expose the Find in Page functionality, but hide it under the Debug label...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Aug 2010 14:48:15 +0000 (14:48 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Aug 2010 14:48:15 +0000 (14:48 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17212 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
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 80fe257..62f84e9 100644 (file)
 <!ENTITY common.browser.print.accesskey "P">
 <!ENTITY common.browser.help.label "Help">
 <!ENTITY common.browser.help.accesskey "H">
+<!ENTITY common.browser.find.label "Find in Page">
+<!ENTITY common.browser.find.accesskey "i">
+<!ENTITY common.browser.set_url.label "Modify URL">
+<!ENTITY common.browser.set_url.accesskey "U">
 
 <!ENTITY common.textbox.cut "Cut">
 <!ENTITY common.textbox.copy "Copy">
index ed565f2..16d6253 100644 (file)
@@ -200,7 +200,7 @@ util.browser.prototype = {
                 endPt.setStart(body, count);
                 endPt.setEnd(body, count);
             var retRange = finder.Find(text, searchRange, startPt, endPt);
-            alert('retRange = ' + retRange );
+            dump('retRange = ' + retRange + '\n');
             setSelection(retRange);
         } catch(E) {
             alert('Error in browser.js, find(): ' + E);
index 6cceebb..dc53621 100644 (file)
         <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
     </commandset>
 
+    <popupset>
+        <popup id="debug_popup">
+            <menuitem label="&common.browser.set_url.label;" accesskey="&common.browser.set_url.accesskey;" command="cmd_debug" />
+            <menuitem label="&common.browser.find.label;" accesskey="&common.browser.find.accesskey;" command="cmd_find" />
+        </popup>
+    </popupset>
+
     <vbox flex="1">
         <hbox>
             <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" command="cmd_debug" onclick="this.doCommand();" />
+            <label id="debug" value="Debug" disabled="true" popup="debug_popup" />
             <button id="browser_print" command="cmd_print" hidden="true"/>
             <button id="browser_find" label="Find in Page" command="cmd_find" hidden="false"/>
         </hbox>
index ce1d0e8..7148ebe 100644 (file)
         <command id="cmd_forward" label="&common.browser.forward.label;" accesskey="&common.browser.forward.accesskey;" />
     </commandset>
 
+    <popupset>
+        <popup id="debug_popup">
+            <menuitem label="&common.browser.set_url.label;" accesskey="&common.browser.set_url.accesskey;" command="cmd_debug" />
+            <menuitem label="&common.browser.find.label;" accesskey="&common.browser.find.accesskey;" command="cmd_find" />
+        </popup>
+    </popupset>
+
     <vbox flex="1">
         <hbox>
             <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" command="cmd_debug" onclick="this.doCommand();" />
+            <label id="debug" value="Debug" disabled="true" popup="debug_popup" />
             <button id="browser_print" command="cmd_print" hidden="true"/>
             <button id="browser_find" label="Find in Page" command="cmd_find" hidden="false"/>
         </hbox>