]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/opac/common/js/init.js
setting orig location to location if unset
[Evergreen.git] / Open-ILS / web / opac / common / js / init.js
1
2 /* these events should be used by all */
3
4 window.onunload = windowUnload;
5
6 attachEvt("common", "init", loadUIObjects);
7 attachEvt("common", "init", initParams);
8 attachEvt("common", "init", initCookies);
9 //attachEvt("common", "init", drawOrgTree); 
10
11 attachEvt("common", "unload", _tree_killer);
12 try{ attachEvt("common", "unload", cleanRemoteRequests);} catch(e){}
13
14 function init() {
15         runEvt('common','init');
16         if( getOrigLocation() == 0 ) ORIGLOC = LOCATION;
17         runEvt("common", "run");
18         //checkUserSkin();
19         G.ui.common.now_searching.appendChild(text(findOrgUnit(getLocation()).name()));
20 }
21
22 function windowUnload() { runEvt("common", "unload"); }