[open-ils-commits] r12466 - in trunk/Open-ILS/web/opac/skin/default: js xml/result (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 8 10:34:48 EDT 2009
Author: dbs
Date: 2009-03-08 10:34:47 -0400 (Sun, 08 Mar 2009)
New Revision: 12466
Modified:
trunk/Open-ILS/web/opac/skin/default/js/result_common.js
trunk/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
Log:
Make existing Google Book Search link functions and IDs less generic; part of #50
Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2009-03-08 05:48:08 UTC (rev 12465)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2009-03-08 14:34:47 UTC (rev 12466)
@@ -3,7 +3,7 @@
var recordsCache = [];
var lowHitCount = 4;
var isbnList = '';
-var googleBooks = true;
+var googleBooksLink = true;
var resultFetchAllRecords = false;
var resultCompiledSearch = null;
@@ -15,7 +15,7 @@
G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
G.evt.result.allRecordsReceived.push(resultBuildCaches, resultDrawSubjects,
resultDrawAuthors, resultDrawSeries, function(){unHideMe($('result_info_2'))},
- fetchGoogleBooks);
+ fetchGoogleBooksLink);
attachEvt('result','lowHits',resultLowHits);
attachEvt('result','zeroHits',resultZeroHits);
@@ -414,11 +414,11 @@
);
}
-function unhideGoogleBooks (data) {
+function unhideGoogleBooksLink (data) {
for ( var i in data ) {
//if (data[i].preview == 'noview') continue;
- var gbspan = $n(document.documentElement, 'googleBooks-' + i);
+ var gbspan = $n(document.documentElement, 'googleBooksLink-' + i);
var gba = $n(gbspan, "googleBooks-link");
gba.setAttribute(
@@ -440,8 +440,8 @@
var r = table.rows[pos + 1];
var currentISBN = cleanISBN(rec.isbn());
- if (googleBooks) {
- var gbspan = $n(r, "googleBooks");
+ if (googleBooksLink) {
+ var gbspan = $n(r, "googleBooksLink");
if (currentISBN) {
gbspan.setAttribute(
'name',
@@ -598,13 +598,13 @@
}
}
-function fetchGoogleBooks () {
- if (isbnList && googleBooks) {
+function fetchGoogleBooksLink () {
+ if (isbnList && googleBooksLink) {
var scriptElement = document.createElement("script");
scriptElement.setAttribute("id", "jsonScript");
scriptElement.setAttribute("src",
"http://books.google.com/books?bibkeys=" +
- escape(isbnList) + "&jscmd=viewapi&callback=unhideGoogleBooks");
+ escape(isbnList) + "&jscmd=viewapi&callback=unhideGoogleBooksLink");
scriptElement.setAttribute("type", "text/javascript");
// make the request to Google Book Search
document.documentElement.firstChild.appendChild(scriptElement);
Modified: trunk/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/result/result_table.xml 2009-03-08 05:48:08 UTC (rev 12465)
+++ trunk/Open-ILS/web/opac/skin/default/xml/result/result_table.xml 2009-03-08 14:34:47 UTC (rev 12466)
@@ -130,7 +130,7 @@
</abbr>
<!-- Empty span used for creating Google Book Search-->
- <span name="googleBooks" class="hide_me">
+ <span name="googleBooksLink" class="hide_me">
<a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
</span>
More information about the open-ils-commits
mailing list