From b08d67fd0f348c911035b63b2a8591763f390973 Mon Sep 17 00:00:00 2001
From: dbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 12 Aug 2010 07:42:20 +0000
Subject: [PATCH] Remove broken old JavaScript in Google Book preview code

I /think/ this was supposed to change the title of the "Preview" link to
"Read this online" or the like in the case that the full text is available,
but it was relying on a function that didn't exist (setText) and trying
to reference an ID that didn't exists. So it broke in those rare cases
where Google Books did provide the full text.


git-svn-id: svn://svn.open-ils.org/ILS/trunk@17181 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/web/opac/skin/craftsman/js/rdetail.js | 5 -----
 Open-ILS/web/opac/skin/default/js/rdetail.js   | 5 -----
 2 files changed, 10 deletions(-)

diff --git a/Open-ILS/web/opac/skin/craftsman/js/rdetail.js b/Open-ILS/web/opac/skin/craftsman/js/rdetail.js
index 2455b29315..b6272895a4 100644
--- a/Open-ILS/web/opac/skin/craftsman/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/craftsman/js/rdetail.js
@@ -1089,11 +1089,6 @@ function GBPreviewCallback(GBPBookInfo) {
 	}
 
 	if ( GBPBook.preview != "noview" ) {
-		if ( GBPBook.preview == 'full' ) {
-			setText( $('rdetail_preview_link'), $('rdetail_preview_full_text').innerHTML );
-			$('rdetail_preview_link_a').title = $('rdetail_preview_title').innerHTML;      
-		}
-
 		// Add a button below the book cover image to load the preview.
 		GBPBadge = document.createElement( 'img' );
 		GBPBadge.src = 'http://books.google.com/intl/en/googlebooks/images/gbs_preview_button1.gif';
diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index 73d8026111..93bdeef0f9 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -1088,11 +1088,6 @@ function GBPreviewCallback(GBPBookInfo) {
 	}
 
 	if ( GBPBook.preview != "noview" ) {
-		if ( GBPBook.preview == 'full' ) {
-			setText( $('rdetail_preview_link'), $('rdetail_preview_full_text').innerHTML );
-			$('rdetail_preview_link_a').title = $('rdetail_preview_title').innerHTML;      
-		}
-
 		// Add a button below the book cover image to load the preview.
 		GBPBadge = document.createElement( 'img' );
 		GBPBadge.src = 'http://books.google.com/intl/en/googlebooks/images/gbs_preview_button1.gif';
-- 
2.11.0