when logged in, default to org unit 1 when no org unit has been manually selected...
[evergreen-equinox.git] / Open-ILS / web / opac / skin / kcls / xml / common / js_shared.xml
index 2be236c..7927bbc 100644 (file)
@@ -1,3 +1,15 @@
+/*
+Run this here so it's the first event fired after 'init'.
+This forces the LOCATION back to 1 when the user has not
+selected a location via widget, thus immediately overriding 
+the default behavior found in common/js/init.js
+*/
+attachEvt('common', 'run', function() {
+    var cgi = new CGI();
+    if( cgi.param(PARAM_LOCATION) == null ) LOCATION=1;
+});
+
+
 <!--#if expr="$OILS_PAGE='index.xml'"-->
 isFrontPage = true;
 <!--#endif-->
@@ -198,3 +210,5 @@ dojo.addOnLoad(function() {
     });
 });
 <!--#endif-->
+
+