From 608f4a9259a35b941c2da6283ec1006b2557f46e Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 27 Oct 2010 05:10:39 +0000 Subject: [PATCH] View Source option for embedded browser (click on the Debug link) git-svn-id: svn://svn.open-ils.org/ILS/trunk@18485 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 3855672d26..a1d3dc3145 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 822aa1f1fd..1f0983c5fc 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul +++ b/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul @@ -114,6 +114,7 @@ + @@ -122,6 +123,7 @@ + -- 2.11.0