[open-ils-commits] r9018 - trunk/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 14 15:46:17 EDT 2008
Author: miker
Date: 2008-03-14 15:12:38 -0400 (Fri, 14 Mar 2008)
New Revision: 9018
Modified:
trunk/Open-ILS/web/opac/skin/default/js/result_common.js
Log:
using opac event to fetch the google data once
Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-03-14 19:03:06 UTC (rev 9017)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-03-14 19:12:38 UTC (rev 9018)
@@ -14,7 +14,9 @@
G.evt.result.recordReceived.push(resultDisplayRecord, resultAddCopyCounts);
G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
G.evt.result.allRecordsReceived.push(resultBuildCaches, resultDrawSubjects,
- resultDrawAuthors, resultDrawSeries, function(){unHideMe($('result_info_2'))});
+ resultDrawAuthors, resultDrawSeries, function(){unHideMe($('result_info_2'))},
+ fetchGoogleBooks);
+
attachEvt('result','lowHits',resultLowHits);
attachEvt('result','zeroHits',resultZeroHits);
attachEvt( "common", "locationUpdated", resultSBSubmit );
@@ -578,9 +580,7 @@
}
}
-
-function resultPageIsDone(pos) {
-
+function fetchGoogleBooks () {
if (isbnList && googleBooks) {
var scriptElement = document.createElement("script");
scriptElement.setAttribute("id", "jsonScript");
@@ -591,7 +591,10 @@
// make the request to Google Book Search
document.documentElement.firstChild.appendChild(scriptElement);
}
+}
+function resultPageIsDone(pos) {
+
return (recordsHandled == getDisplayCount()
|| recordsHandled + getOffset() == getHitCount());
}
More information about the open-ils-commits
mailing list