[open-ils-commits] r18486 - in branches/rel_2_0/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
Wed Oct 27 01:11:18 EDT 2010
Author: phasefx
Date: 2010-10-27 01:11:14 -0400 (Wed, 27 Oct 2010)
New Revision: 18486
Modified:
branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.js
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
Log:
View Source option for embedded browser (click on the Debug link)
Modified: branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-10-27 05:10:39 UTC (rev 18485)
+++ branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-10-27 05:11:14 UTC (rev 18486)
@@ -68,6 +68,8 @@
<!ENTITY common.browser.find.accesskey "i">
<!ENTITY common.browser.set_url.label "Modify URL">
<!ENTITY common.browser.set_url.accesskey "U">
+<!ENTITY common.browser.view_source.label "View Source">
+<!ENTITY common.browser.view_source.accesskey "V">
<!ENTITY common.textbox.cut "Cut">
<!ENTITY common.textbox.copy "Copy">
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.js 2010-10-27 05:10:39 UTC (rev 18485)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.js 2010-10-27 05:11:14 UTC (rev 18486)
@@ -44,6 +44,14 @@
if (url) { obj.get_content().location.href = url; }
}
],
+ 'cmd_view_source' : [
+ ['command'],
+ function() {
+ var curr_url = obj.get_content().location.href;
+ //obj.get_content().location.href = 'view-source:' + curr_url; // This works too, but the openDialog below is more feature-rich
+ window.openDialog("chrome://global/content/viewSource.xul", "", "all,dialog=no", curr_url);
+ }
+ ],
'cmd_print' : [
['command'],
function() {
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.xul 2010-10-27 05:10:39 UTC (rev 18485)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/browser.xul 2010-10-27 05:11:14 UTC (rev 18486)
@@ -107,6 +107,7 @@
<command id="cmd_broken" />
<command id="cmd_print" label="&common.browser.print.label;" accesskey="&common.browser.print.accesskey;" />
<command id="cmd_debug" />
+ <command id="cmd_view_source" />
<command id="cmd_find" />
<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;" />
@@ -115,6 +116,7 @@
<popupset>
<popup id="debug_popup">
+ <menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
<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>
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul 2010-10-27 05:10:39 UTC (rev 18485)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul 2010-10-27 05:11:14 UTC (rev 18486)
@@ -110,6 +110,7 @@
<command id="cmd_broken" />
<command id="cmd_print" label="&common.browser.print.label;" accesskey="&common.browser.print.accesskey;" />
<command id="cmd_debug" />
+ <command id="cmd_view_source" />
<command id="cmd_find" />
<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;" />
@@ -118,6 +119,7 @@
<popupset>
<popup id="debug_popup">
+ <menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
<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>
More information about the open-ils-commits
mailing list