From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Fri, 13 Aug 2010 14:48:15 +0000 (+0000)
Subject: go ahead and expose the Find in Page functionality, but hide it under the Debug label... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=61ffc99b60dc116b4cce77a35758092de1bb871e;p=evergreen%2Fpines.git

go ahead and expose the Find in Page functionality, but hide it under the Debug label for now.  Other than being incomplete (no Find Next, etc.), the main problem I see are our dynamic dojo interfaces where the text one might be tempted to search for won't actually be rendered yet on the screen (say in a scrolling list)


git-svn-id: svn://svn.open-ils.org/ILS/trunk@17212 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 80fe25782b..62f84e9e08 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -64,6 +64,10 @@
 <!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">
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/browser.js b/Open-ILS/xul/staff_client/chrome/content/util/browser.js
index ed565f280e..16d6253ee3 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/browser.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.js
@@ -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);
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/browser.xul b/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
index 6cceebbd28..dc53621fdd 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
+++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
@@ -112,13 +112,20 @@
         <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>
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul b/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
index ce1d0e8c84..7148ebe21e 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
+++ b/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
@@ -115,13 +115,20 @@
         <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>