removed some unnecessary code; load bibtemplate data from a setTimeout. why? becaus...
authorberick <berick@esilibrary.com>
Wed, 9 Mar 2011 23:02:19 +0000 (18:02 -0500)
committerberick <berick@esilibrary.com>
Wed, 9 Mar 2011 23:02:19 +0000 (18:02 -0500)
Open-ILS/web/opac/skin/kcls/js/sidebar.js
Open-ILS/web/opac/skin/kcls/xml/common/js_common.xml

index 3f55bde..4791046 100644 (file)
@@ -192,37 +192,3 @@ function sidebarTreesFree() {
        authorSidebarTree = null;
        seriesSidebarTree = null;
 }
-
-
-
-
-/* --------------------------------------------------------------------------------- */
-/* Code to support GALILEO links for PINES.  Fails gracefully
-/* --------------------------------------------------------------------------------- */
-attachEvt('common', 'init', buildEGGalLink);
-function buildEGGalLink() {
-
-       /* we're in a lib, nothing to do here */
-       if( getOrigLocation() ) return;
-       if(!$('eg_gal_link')) return;
-
-       //var link = 'http://demo.galib.uga.edu/express?pinesid=';
-       var link = 'http://www.galileo.usg.edu/express?pinesid=';
-       if(grabUser()) {
-               $('eg_gal_link').setAttribute('href', link + G.user.session);
-               return;
-       }
-
-       $('eg_gal_link').setAttribute('href', 'javascript:void(0);');
-       $('eg_gal_link').setAttribute('target', '');
-       $('eg_gal_link').onclick = function() {
-               /* we're not logged in.  go ahead and login */
-               detachAllEvt('common','locationChanged');
-               detachAllEvt('common','loggedIn');
-               attachEvt('common','loggedIn', function() { goTo(link + G.user.session); })
-               initLogin();
-       };
-}
-/* --------------------------------------------------------------------------------- */
-
-
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-->