case 'PatronSearchForm' : patron_search_form_init(params); break;
}
- register_document(params.d);
+ register_document(params.w.document);
register_window(params.w);
} catch(E) { dump(js2JSON(E)+'\n'); }
case 'PatronSearchForm' : patron_search_form_exit(params); break;
}
- unregister_document(params.d);
+ unregister_document(params.w.document);
unregister_window(params.w);
} catch(E) { dump(js2JSON(E)+'\n'); }
function app_shell_init(p) {
dump("TESTING: app_shell.js: " + mw.G['main_test_variable'] + '\n');
- p.w.close_tab = function (t1,t2) { return close_tab(p.d,t1,t2); };
+ p.w.close_tab = function (t1,t2) { return close_tab(p.w.document,t1,t2); };
p.w.find_free_tab = function (tabs) { return find_free_tab(tabs); };
- p.w.new_tab = function () { return new_tab(p.d,p.tabbox); };
- p.w.replace_tab = function (label,chrome,params) { return replace_tab(p.d,p.tabbox,label,chrome,params); };
- p.w.get_frame_in_tab = function (idx, all_or_vis) { return get_frame_in_tab( p.d, p.tabbox, idx, all_or_vis ); };
+ p.w.new_tab = function () { return new_tab(p.w.document,p.tabbox); };
+ p.w.replace_tab = function (label,chrome,params) { return replace_tab(p.w.document,p.tabbox,label,chrome,params); };
+ p.w.get_frame_in_tab = function (idx, all_or_vis) { return get_frame_in_tab( p.w.document, p.tabbox, idx, all_or_vis ); };
//p.w.replace_tab('Tab','chrome://evergreen/content/main/about.xul');
spawn_javascript_shell(p.w.document,'replace_tab','main_tabbox',{});
<window id="app_shell_win"
orient="vertical" style="overflow: auto" width="800" height="500"
sizemode="maximized" persist="width height"
- onload="params.tabbox = 'main_tabbox'; params.w = window; params.d = document; params.app = 'AppShell'; mw.OpenILS_init(params);"
+ onload="params.tabbox = 'main_tabbox'; params.w = window; params.app = 'AppShell'; mw.OpenILS_init(params);"
onunload="mw.OpenILS_exit(params);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
dump("TESTING: clam_shell.js: " + mw.G['main_test_variable'] + '\n');
if (p) {
if (p.horizontal) {
- get_widget(p.d,p.clamshell).orient = 'horizontal';
+ get_widget(p.w.document,p.clamshell).orient = 'horizontal';
} else if (p.vertical) {
- get_widget(p.d,p.clamshell).orient = 'vertical';
+ get_widget(p.w.document,p.clamshell).orient = 'vertical';
}
}
var nl = get_widget(p.clamshell).getElementsByTagName('deck');
else
return second_deck.selectedPanel;
}
- p.w.set_first_deck = function (idx) { return set_deck(p.d,first_deck,idx); };
- p.w.set_second_deck = function (idx) { return set_deck(p.d,second_deck,idx); };
+ p.w.set_first_deck = function (idx) { return set_deck(p.w.document,first_deck,idx); };
+ p.w.set_second_deck = function (idx) { return set_deck(p.w.document,second_deck,idx); };
p.w.replace_card_in_first_deck = function (idx,chrome,params) {
- return replace_card_in_deck(p.d,first_deck,idx,chrome,params);
+ return replace_card_in_deck(p.w.document,first_deck,idx,chrome,params);
};
p.w.replace_card_in_second_deck = function (idx,chrome,params) {
- return replace_card_in_deck(p.d,second_deck,idx,chrome,params);
+ return replace_card_in_deck(p.w.document,second_deck,idx,chrome,params);
};
p.w.new_card_in_first_deck = function (chrome,params) {
- return new_card_in_deck(p.d,first_deck,chrome,params);
+ return new_card_in_deck(p.w.document,first_deck,chrome,params);
};
p.w.new_card_in_second_deck = function (chrome,params) {
- return new_card_in_deck(p.d,second_deck,chrome,params);
+ return new_card_in_deck(p.w.document,second_deck,chrome,params);
};
}
<page id="clam_shell_win"
orient="vertical" style="overflow: auto" width="800" height="500"
sizemode="maximized" persist="width height"
- onload="params.clamshell = 'ClamShell_main'; params.w = window; params.d = document; params.app = 'ClamShell'; mw.OpenILS_init(params);"
+ onload="params.clamshell = 'ClamShell_main'; params.w = window; params.app = 'ClamShell'; mw.OpenILS_init(params);"
onunload="mw.OpenILS_exit(params);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
/* init the opac */
-function opac_init(params) {
+function opac_init(p) {
sdump('D_OPAC',"Initing OPAC\n");
- var box = params.d.getElementById('opac_vbox');
+ var box = p.w.document.getElementById('opac_vbox');
opac_iframe = box.appendChild(document.createElement("browser"));
opac_iframe.setAttribute("type", "content-primary");
<!-- Application: Evergreen Staff Client -->
<page id="opac_win" orient="vertical" style="overflow: auto;" persist="width height"
- onload="params.w = window; params.d = document; params.app = 'Opac'; mw.OpenILS_init(params);"
+ onload="params.w = window; params.app = 'Opac'; mw.OpenILS_init(params);"
onunload="mw.OpenILS_exit(params);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
dump("TESTING: patron_search_form.js: " + mw.G['main_test_variable'] + '\n');
dump('p.w = ' + p.w + '\n');
dump('p.w.document = ' + p.w.document + '\n');
- dump('p.d = ' + p.d + '\n');
p.w.crazy_search_hash = {}; // hash[ field ] = { 'value' : ???, 'group' : ??? }
- var nl = p.d.getElementsByTagName('textbox');
+ var nl = p.w.document.getElementsByTagName('textbox');
for (var i = 0; i < nl.length; i++)
nl[i].addEventListener(
'change',
function (ev) {
return patron_search_form_textbox_handler(
- p.d,
+ p.w.document,
ev.target,
p.w.crazy_search_hash); },
false);
- var search_command = p.d.getElementById('cmd_search');
- var clear_command = p.d.getElementById('cmd_clear');
+ var search_command = p.w.document.getElementById('cmd_search');
+ var clear_command = p.w.document.getElementById('cmd_clear');
p.w.register_search_callback = function (f) { search_command.addEventListener( 'command',f,false ); };
clear_command.addEventListener(
'command',
function (ev) {
- var nl = p.d.getElementsByTagName('textbox');
+ var nl = p.w.document.getElementsByTagName('textbox');
for (var i = 0; i < nl.length; i++)
nl[i].value = '';
p.w.crazy_search_hash = {}; },
<page id="patron_search_form_win"
orient="vertical" style="overflow: auto" width="800" height="500"
sizemode="maximized" persist="width height"
- onload="params.w = window; params.d = document; params.app = 'PatronSearchForm'; mw.OpenILS_init(params);"
+ onload="params.w = window; params.app = 'PatronSearchForm'; 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.w = window; params.d = document; params.app = 'Shell'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
+<body onload="params.w = window; 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>
<!-- 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.w = window; params.d = document; params.app = 'Xuledit'; mw.OpenILS_init(params); init();" onunload="mw.OpenILS_exit(params);">
+onload="params.w = window; 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()"