Add a window.open compatible "browser" file for unsecured calls.
Add "chrome" to most window.open calls to bypass the wrapper.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
*/
openils.Util.printHtmlString = function(html, callback) {
- var win = window.open('', 'Print Window', 'resizable,width=800,height=600,scrollbars=1');
+ var win = window.open('', 'Print Window', 'resizable,width=800,height=600,scrollbars=1,chrome');
// force the new window to the background
win.blur();
to true in about:config */
if(openils.XUL.isXUL()) {
- win = window.open('/xul/' + openils.XUL.buildId() + '/server/cat/marcedit.xul');
+ win = window.open('/xul/' + openils.XUL.buildId() + '/server/cat/marcedit.xul','','chrome');
} else {
- win = window.open('/xul/server/cat/marcedit.xul');
+ win = window.open('/xul/server/cat/marcedit.xul','','chrome');
}
var self = this;
win.xulG = {
win = window.open(
oilsBasePath + '/acq/lineitem/findbib?query=' + escape(query),
- '', 'resizable,scrollbars=1');
+ '', 'resizable,scrollbars=1,chrome');
win.window.recordFound = function(bibId) {
win.close();
function openClaimVoucherWindow() {
var win = window.open(
- "", "", "resizable,width=800,height=600,scrollbars=1"
+ "", "", "resizable,width=800,height=600,scrollbars=1,chrome"
);
/* XXX i18n - also, the reason this isn't loaded from a server-side page
* has to do with problems of knowing when the page has loaded, so we
/* XXX i18n and/or template */
try {
var win = window.open(
- "","","resizeable,width=600,height=400,scrollbars=1"
+ "","","resizeable,width=600,height=400,scrollbars=1,chrome"
);
win.document.body.innerHTML =
"<h1>Transit Slip</h1>\n" +
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ win = window.open('/xul/server/cat/marcedit.xul','','chrome'); // XXX version?
win.xulG = {
"record": {"marc": rec.marc(), "rtype": "are"},
SelfCheckManager.prototype.printData = function(data, numItems, callback) {
- var win = window.open('', '', 'resizable,width=700,height=500,scrollbars=1');
+ var win = window.open('', '', 'resizable,width=700,height=500,scrollbars=1,chrome');
win.document.body.innerHTML = data;
win.print();
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ win = window.open('/xul/server/cat/marcedit.xul','','chrome'); // XXX version?
var type;
if (currentType == 'bib') {
'chrome,resizable,width=700,height=500');
} else {
- win = window.open('','', 'resizable,width=700,height=500,scrollbars=1');
+ win = window.open('','', 'resizable,width=700,height=500,scrollbars=1,chrome');
win.document.body.innerHTML = data;
}
}
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ win = window.open('/xul/server/cat/marcedit.xul','','chrome'); // XXX version?
dojo.require('openils.PermaCrud');
win.xulG = {
/*
if(!oilsRptDebugWindow)
- oilsRptDebugWindow = window.open('','Debug','resizable,width=700,height=500,scrollbars=1');
+ oilsRptDebugWindow = window.open('','Debug','resizable,width=700,height=500,scrollbars=1,chrome');
oilsRptDebugWindow.document.body.innerHTML = oilsRpt.toHTMLString();
*/
}
}
function open_marc_editor(rec, label) {
- win = window.open( xulG.url_prefix('XUL_MARC_EDIT') );
+ win = window.open( xulG.url_prefix('XUL_MARC_EDIT'), '', 'chrome' );
win.xulG = {
record : {marc : rec.marc()},
}
} else {
if (params.content_type == 'text/plain') {
- w = window.open('data:text/plain,'+escape(params.msg));
+ w = window.open('data:text/plain,'+escape(params.msg),'','chrome');
} else {
- w = window.open('data:text/html,'+escape(params.msg));
+ w = window.open('data:text/html,'+escape(params.msg),'','chrome');
}
setTimeout(
function() {
obj._NSPrint_webBrowserPrint(w,silent,params);
} else {
if (params.content_type == 'text/plain') {
- w = window.open('data:text/plain,'+escape(params.msg));
+ w = window.open('data:text/plain,'+escape(params.msg),'','chrome');
} else {
- w = window.open('data:text/html,'+escape(params.msg));
+ w = window.open('data:text/html,'+escape(params.msg),'','chrome');
}
setTimeout(
function() {
--- /dev/null
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Window.Open compatible simple browser wrapper for untrusted pages -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<window id="util_window_open_browser_win"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <browser id="browser_browser" flex="1" autoscroll="false" type="content-primary" oils_force_external="true" />
+
+</window>
+
pref("general.useragent.locale", "en-US");
// We need something like this to get window.open to work in some places (where it complains about
-// navigator.xul not being registered. But is about:blank the best value to use here?
-pref("browser.chromeURL","about:blank");
+// navigator.xul not being registered). The untrusted_window file provided the minimum required elements.
+pref("browser.chromeURL","chrome://open_ils_staff_client/content/util/untrusted_window.xul");
// This one just makes things speedier. We use a lot of XMLHttpRequest
pref("network.http.max-persistent-connections-per-server",8);
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ win = window.open('/xul/server/cat/marcedit.xul', '_blank', 'chrome'); // XXX version?
// Match marc2are.pl last_xact_id format, roughly
var now = new Date;