further protection against dreaded opac bank page; wrap settimeout redetail bibtempla...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 22 Oct 2010 20:40:25 +0000 (20:40 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 22 Oct 2010 20:40:25 +0000 (20:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18454 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml

index 2fac162..5d02f5e 100644 (file)
                config.ids.rdetail.image                                = 'rdetail_image';
                config.ids.rdetail.tor_pic                              = 'rdetail_tor_pic';
 
-        setTimeout( function () {
-            var here = findOrgUnit(getLocation());
-            if (getDepth() > 0 || getDepth === 0 ) {
-                while (getDepth() < findOrgDepth(here))
-                    here = findOrgUnit( here.parent_ou() );
-            }
-
-            dojo.require('openils.BibTemplate');
-            new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
-        }, 0);
+        dojo.addOnLoad(function() {
+            setTimeout( function () {
+                var here = findOrgUnit(getLocation());
+                if (getDepth() > 0 || getDepth === 0 ) {
+                    while (getDepth() < findOrgDepth(here))
+                        here = findOrgUnit( here.parent_ou() );
+                }
+    
+                dojo.require('openils.BibTemplate');
+                new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+            }, 0);
+        });
        ]]></script>
 
 </div> <!-- details_body -->