From: erickson Date: Fri, 22 Oct 2010 20:40:25 +0000 (+0000) Subject: further protection against dreaded opac bank page; wrap settimeout redetail bibtempla... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a62972549562a62b00bd2c18c72ca6a7f0cbd091;p=evergreen%2Fbjwebb.git further protection against dreaded opac bank page; wrap settimeout redetail bibtemplate loading in an onload to ensure it runs after dojo onload events git-svn-id: svn://svn.open-ils.org/ILS/trunk@18454 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml index 2fac16279..5d02f5eb3 100644 --- a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml +++ b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml @@ -208,16 +208,18 @@ 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); + }); ]]>