From dbb5bbc1f42c2bcfdba557a2452299447229e640 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 27 Oct 2010 05:11:14 +0000 Subject: [PATCH] View Source option for embedded browser (click on the Debug link) git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18486 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 ++ Open-ILS/xul/staff_client/chrome/content/util/browser.js | 8 ++++++++ Open-ILS/xul/staff_client/chrome/content/util/browser.xul | 2 ++ Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul | 2 ++ 4 files changed, 14 insertions(+) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 0f36c8b18a..4de2c3c2c9 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -68,6 +68,8 @@ + + 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 b91106da81..22652d6780 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/browser.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.js @@ -44,6 +44,14 @@ util.browser.prototype = { 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() { 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 01a10e64bb..d5df55d880 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/browser.xul +++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.xul @@ -107,6 +107,7 @@ + @@ -115,6 +116,7 @@ + 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 5099a4c32b..37700e532a 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul +++ b/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul @@ -110,6 +110,7 @@ + @@ -118,6 +119,7 @@ + -- 2.11.0