function OpenILS_init(params) {
- sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg, function (i,o) { if (i=="d") return [i,o.toString()]; else return [i,o]; }))' }));
+ sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg, function (i,o) { if (i=="d"||i=="w") return [i,o.toString()]; else return [i,o]; }))' }));
try {
}
register_document(params.d);
+ register_window(params.w);
- } catch(E) {}
+ } catch(E) { dump(js2JSON(E)+'\n'); }
}
function OpenILS_exit(params) {
- sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg, function (i,o) { if (i=="d") return [i,o.toString()]; else return [i,o]; }))' }));
+ sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg, function (i,o) { if (i=="d"||i=="w") return [i,o.toString()]; else return [i,o]; }))' }));
try {
}
unregister_document(params.d);
+ unregister_window(params.w);
- } catch(E) {}
+ } catch(E) { dump(js2JSON(E)+'\n'); }
sdump('D_TRACE','Exiting OpenILS_exit\n');
}
<window id="auth_win" title="&auth.title;"
orient="vertical" style="overflow: auto" persist="width height"
- onload="mw.OpenILS_init({ 'd' : document, 'app' : 'Auth' });"
- onunload="mw.OpenILS_exit({ 'd' : document, 'app' : 'Auth' });"
+ onload="mw.OpenILS_init({ 'w' : window, 'd' : document, 'app' : 'Auth' });"
+ onunload="mw.OpenILS_exit({ 'w' : window, 'd' : document, 'app' : 'Auth' });"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Stylesheets -->
function app_shell_init(params) {
dump("TESTING: app_shell.js: " + mw.G['main_test_variable'] + '\n');
replace_tab(params.d,'main_tabbox','Tab','chrome://evergreen/content/main/about.xul');
- mw.G.sound.beep();
}
function close_tab( d, t1, t2 ) {
<window id="app_shell_win"
orient="vertical" style="overflow: auto" width="800" height="500"
sizemode="maximized" persist="width height"
- onload="params.d = document; params.app = 'AppShell'; mw.OpenILS_init(params);"
+ onload="params.w = window; params.d = document; params.app = 'AppShell'; mw.OpenILS_init(params);"
onunload="mw.OpenILS_exit(params);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
}
}
+function clam_shell_set_first_deck(d,i) {
+ set_decks(d,{ 'ClamShell_first_deck' : i });
+}
+
+function clam_shell_set_second_deck(d,i) {
+ set_decks(d,{ 'ClamShell_second_deck' : i });
+}
<page id="clam_shell_win"
orient="vertical" style="overflow: auto" width="800" height="500"
sizemode="maximized" persist="width height"
- onload="params.d = document; params.app = 'ClamShell'; mw.OpenILS_init(params);"
+ onload="params.w = window; params.d = document; params.app = 'ClamShell'; mw.OpenILS_init(params);"
onunload="mw.OpenILS_exit(params);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Application: Evergreen Staff Client -->
<page id="opac_win" orient="vertical" style="overflow: auto;" persist="width height"
- onload="params.d = document; params.app = 'Opac'; mw.OpenILS_init(params);"
+ onload="params.w = window; params.d = document; params.app = 'Opac'; mw.OpenILS_init(params);"
onunload="mw.OpenILS_exit(params);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</style>
</head>
-<body onload="params.d = document; params.app = 'Shell'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
+<body onload="params.w = window; params.d = document; params.app = 'Shell'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
<div id="output"><h3>JavaScript Shell 1.3.1</h3><div>Features: autocompletion of property names with Tab, multiline input with Shift+Enter, input history with (Ctrl+) Up/Down, <a accesskey=M href="javascript:go('scope(Math); mathHelp();');">Math</a>, <a accesskey=H href="http://www.squarefree.com/shell/?ignoreReferrerFrom=shell1.3.1">help</a></div><div>Values and functions: ans, print(string), <a accesskey=P href="javascript:go('props(ans)')">props(object)</a>, <a accesskey=B href="javascript:go('blink(ans)')">blink(node)</a>, load(scriptURL), scope(object)</div></div>
if (w != self) {
w.parentWindow = self;
w.mw = mw;
- register_window(w);
+ //register_window(w);
}
w.am_i_a_top_level_tab = false;
if (params) {
<!-- Edited by Jason for Evergreen -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="xuledit" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="Live XUL Editor"
-onload="params.d = document; params.app = 'Xuledit'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
+onload="params.w = window; params.d = document; params.app = 'Xuledit'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
<script type="application/x-javascript" src="xuledit.js"/>
<vbox flex="1">
<textbox id="ta" multiline="true" wrap="true" flex="1" onkeydown="resetTimeout()"