[open-ils-commits] r16421 - trunk/Open-ILS/xul/staff_client/server/cat (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed May 12 13:48:39 EDT 2010
Author: phasefx
Date: 2010-05-12 13:48:35 -0400 (Wed, 12 May 2010)
New Revision: 16421
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js
Log:
put spine label preview into a tab instead of a window. fixes it for xulrunner 1.9.2
Modified: trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2010-05-12 17:48:34 UTC (rev 16420)
+++ trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2010-05-12 17:48:35 UTC (rev 16421)
@@ -231,7 +231,7 @@
var lw = Number($('lw').value) || 8; var ll = Number($('ll').value) || 9; /* spine label width and length */
var plw = Number($('plw').value) || 28; var pll = Number($('pll').value) || 9; /* pocket label width and length */
var html = "<html><head>";
- html += "<link type='text/css' rel='stylesheet' href='/xul/server/skin/print.css'></link>"
+ html += "<link type='text/css' rel='stylesheet' href='" + xulG.url_prefix('/xul/server/skin/print.css') + "'></link>"
html += "<link type='text/css' rel='stylesheet' href='data:text/css,pre{font-size:" + pt + "pt;}'></link>";
html += "<title>Spine Labels</title></head><body>\n";
var nl = document.getElementsByAttribute('name','template');
@@ -267,29 +267,18 @@
}
}
html += '</body></html>';
- JSAN.use('util.window'); var win = new util.window();
- var loc = ( urls.XUL_REMOTE_BROWSER );
- //+ '?url=' + window.escape('about:blank') + '&show_print_button=1&alternate_print=1&no_xulG=1&title=' + window.escape('Spine Labels');
- var w = win.open( loc, 'spine_preview', 'chrome,resizable,width=750,height=550');
- w.xulG = {
- 'url' : 'about:blank',
- 'show_print_button' : 1,
- 'alternate_print' : 1,
- 'no_xulG' : 1,
- 'title' : $("catStrings").getString('staff.cat.spine_labels.preview.title'),
- 'on_url_load' : function(b) {
- try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- if (typeof w.xulG.written == 'undefined') {
- w.xulG.written = true;
- w.g.browser.get_content().document.write(html);
- w.g.browser.get_content().document.close();
- }
- } catch(E) {
- alert(E);
- }
+ var loc = ( urls.XUL_BROWSER );
+ xulG.new_tab(
+ loc,
+ {
+ 'tab_name' : $("catStrings").getString('staff.cat.spine_labels.preview.title')
+ },
+ {
+ 'url' : 'data:text/html,'+html,
+ 'show_print_button' : 1,
+ 'no_xulG' : 1
}
- };
+ );
} catch(E) {
g.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.spine_labels.preview.std_unexpected_err'),E);
}
More information about the open-ils-commits
mailing list