From f36c629228a45572c4d8b6de1aa403abd671f823 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 25 Aug 2006 20:19:20 +0000 Subject: [PATCH] added galileo magic link builder - does not work on home page yet git-svn-id: svn://svn.open-ils.org/ILS/trunk@5685 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/skin/default/js/sidebar.js | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Open-ILS/web/opac/skin/default/js/sidebar.js b/Open-ILS/web/opac/skin/default/js/sidebar.js index fb7e2c5b59..3280b50c00 100644 --- a/Open-ILS/web/opac/skin/default/js/sidebar.js +++ b/Open-ILS/web/opac/skin/default/js/sidebar.js @@ -165,3 +165,35 @@ function sidebarTreesFree() { 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='; + 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(); + }; +} +/* --------------------------------------------------------------------------------- */ + + -- 2.11.0