[open-ils-commits] r15806 - trunk/Open-ILS/xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 11 16:02:23 EST 2010
Author: phasefx
Date: 2010-03-11 16:02:18 -0500 (Thu, 11 Mar 2010)
New Revision: 15806
Modified:
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:
debug link in staff client browser framework now lets you change the URL
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js 2010-03-11 19:40:40 UTC (rev 15805)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.js 2010-03-11 21:02:18 UTC (rev 15806)
@@ -35,6 +35,14 @@
['command'],
function() { alert('Not Yet Implemented'); }
],
+ 'cmd_debug' : [
+ ['command'],
+ function() {
+ var curr_url = obj.get_content().location.href;
+ var url = window.prompt('Original URL: ' + obj.url + '\nCurrent URL: ' + curr_url + '\nEnter new URL:',curr_url);
+ if (url) { obj.get_content().location.href = url; }
+ }
+ ],
'cmd_print' : [
['command'],
function() {
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul 2010-03-11 19:40:40 UTC (rev 15805)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/browser.xul 2010-03-11 21:02:18 UTC (rev 15806)
@@ -58,7 +58,7 @@
'url' : url,
'push_xulG' : push_xulG,
'alt_print' : alt_print,
- 'debug_label' : 'debug',
+ 'debug_label' : 'debug'
};
if (typeof window.xulG == 'object' && typeof window.xulG.passthru_content_params == 'object') {
p.passthru_content_params = window.xulG.passthru_content_params;
@@ -99,6 +99,7 @@
<commandset id="util_browser_cmds">
<command id="cmd_broken" />
<command id="cmd_print" />
+ <command id="cmd_debug" />
<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;" />
@@ -110,7 +111,7 @@
<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);"/>
+ <label id="debug" value="Debug" disabled="true" command="cmd_debug" onclick="this.doCommand();" />
<button id="browser_print" label="Print Page" command="cmd_print" hidden="true"/>
</hbox>
<browser id="browser_browser" flex="1" type="content"/>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul 2010-03-11 19:40:40 UTC (rev 15805)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul 2010-03-11 21:02:18 UTC (rev 15806)
@@ -59,6 +59,7 @@
'url' : url,
'push_xulG' : push_xulG,
'alt_print' : alt_print,
+ 'debug_label' : 'debug'
}
if (typeof window.xulG == 'object' && typeof window.xulG.passthru_content_params == 'object') {
p.passthru_content_params = window.xulG.passthru_content_params;
@@ -99,6 +100,7 @@
<commandset id="util_browser_cmds">
<command id="cmd_broken" />
<command id="cmd_print" />
+ <command id="cmd_debug" />
<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;" />
@@ -110,10 +112,10 @@
<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();" />
<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(); }"
/>
-
</hbox>
<browser id="browser_browser" flex="1" type="content"/>
</vbox>
More information about the open-ils-commits
mailing list