2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Patron Display -->
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
11 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
13 <!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
15 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
17 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
19 <window id="util_browser_win"
20 onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
21 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
23 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
25 <script type="text/javascript">
26 var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
27 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
29 <scripts id="openils_util_scripts"/>
31 <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
37 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
38 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
39 JSAN.errorLevel = "die"; // none, warn, or die
40 JSAN.addRepository('/xul/server/');
41 JSAN.use('util.error'); g.error = new util.error();
42 g.error.sdump('D_TRACE','my_init() for util_browser.xul');
45 var name = g.cgi.param('tab_name') || g.cgi.param('name') || null;
47 if (typeof window.xulG == 'object') {
48 name = window.xulG.name || window.xulG.tab_name || null;
51 var url; try { url = g.cgi.param('url') || xulG.url } catch(E) { dump(E + '\n'); };
52 if (!url) url = urls.browser;
55 JSAN.use('util.browser'); g.browser = new util.browser();
59 if (g.cgi.param('no_xulG') || (typeof xulG == 'object' ? xulG.no_xulG : false)) push_xulG = false;
61 var alt_print = false;
62 if (g.cgi.param('alternate_print') || (typeof xulG == 'object' ? xulG.alternate_print : false)) alt_print = true;
66 'push_xulG' : push_xulG,
67 'alt_print' : alt_print,
69 if (typeof window.xulG == 'object' && typeof window.xulG.passthru_content_params == 'object') {
70 p.passthru_content_params = window.xulG.passthru_content_params;
72 if (typeof window.xulG == 'object' && typeof window.xulG.on_url_load == 'function') {
73 p.on_url_load = window.xulG.on_url_load;
78 if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
79 if (name) try { window.xulG.set_tab_name(name); } catch(E) { alert(E); }
81 if (g.cgi.param('show_nav_buttons')||(typeof window.xulG == 'object' && window.xulG.show_nav_buttons)) {
82 document.getElementById('back').hidden = false;
83 document.getElementById('forward').hidden = false;
85 if (g.cgi.param('show_print_button')||(typeof window.xulG == 'object' && window.xulG.show_print_button)) {
86 document.getElementById('browser_print').hidden = false;
89 if (g.cgi.param('title')) {
90 try { document.title = g.cgi.param('title'); } catch(E) {}
91 try { window.title = g.cgi.param('title'); } catch(E) {}
95 var err_msg = "!! This software has encountered an error. Please tell your friendly " +
96 "system administrator or software developer the following:\n" + E + '\n';
97 try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
105 <commandset id="util_browser_cmds">
106 <command id="cmd_broken" />
107 <command id="cmd_print" />
108 <command id="cmd_back" />
109 <command id="cmd_forward" />
114 <button id="back" label="Go Back" command="cmd_back" accesskey="b" disabled="true" hidden="true"/>
115 <button id="forward" label="Go Forward" command="cmd_forward" accesskey="d" disabled="true" hidden="true"/>
117 <button id="browser_print" label="Print Page" oldcommand="cmd_print" hidden="true"
118 oncommand="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (g.browser.alt_print) { JSAN.use('util.print'); var p = new util.print(); p.NSPrint(g.browser.get_content(),false,{}); } else { g.browser.get_content().print(); }"
122 <browser id="browser_browser" flex="1" type="content"/>