]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/opac/common/js/init.js
did some debugging.. made buildOPACLink safer WRT array params
[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
10 attachEvt("common", "unload", _tree_killer);
11 try{ attachEvt("common", "unload", cleanRemoteRequests);} catch(e){}
12
13 function init() {
14         runEvt('common','init');
15         if( getOrigLocation() == 0 ) ORIGLOC = LOCATION;
16
17         var cgi = new CGI();
18         if( grabUser() && cgi.param(PARAM_LOCATION) == null ) 
19                 LOCATION = G.user.home_ou();
20
21         runEvt("common", "run");
22         //checkUserSkin();
23         G.ui.common.now_searching.appendChild(text(findOrgUnit(getLocation()).name()));
24 }
25
26 function windowUnload() { runEvt("common", "unload"); }