removed some unnecessary code; load bibtemplate data from a setTimeout. why? becaus...
[evergreen-equinox.git] / Open-ILS / web / opac / skin / kcls / xml / common / js_common.xml
index fc4c711..ca56b79 100644 (file)
 <script language='javascript' type='text/javascript' src='/opac/skin/kcls/js/marc.js'></script>
 <script type="text/javascript"><![CDATA[
     attachEvt("common", "init", function() {
-        var here = findOrgUnit(getLocation());
-        if (getDepth() > 0 || getDepth === 0 ) {
-            while (getDepth() < findOrgDepth(here))
-                here = findOrgUnit( here.parent_ou() );
-        }
-
-        new openils.BibTemplate(
-            { record : new CGI().param('r'), org_unit : here.shortname() }
-        ).render();
+        setTimeout(
+            function() {
+                var here = findOrgUnit(getLocation());
+                if (getDepth() > 0 || getDepth === 0 ) {
+                    while (getDepth() < findOrgDepth(here))
+                        here = findOrgUnit( here.parent_ou() );
+                }
+
+                new openils.BibTemplate(
+                    { record : new CGI().param('r'), org_unit : here.shortname() }
+                ).render();
+            }, 10
+        );
     });
 ]]></script>
 <!--#endif-->