// grab added content
acCollectData(cleanISBN(record.isbn()), rdetailhandleAC);
+
+ // different type of added content
+ var currentISBN = cleanISBN(record.isbn());
+ if (chilifresh && currentISBN) {
+ $('chilifreshReviewLink').setAttribute('id','isbn_'+currentISBN);
+ $('chilifreshReviewResult').setAttribute('id','chili_review_'+currentISBN);
+ unHideMe($('rdetail_reviews_link'));
+ unHideMe($('rdetail_chilifresh_reviews'));
+ chili_init();
+ }
}
G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
G.evt.result.allRecordsReceived.push(resultBuildCaches, resultDrawSubjects,
resultDrawAuthors, resultDrawSeries, function(){unHideMe($('result_info_2'))},
- fetchGoogleBooksLink);
+ fetchGoogleBooksLink,fetchChiliFreshReviews);
attachEvt('result','lowHits',resultLowHits);
attachEvt('result','zeroHits',resultZeroHits);
}
}
+ if (currentISBN && chilifresh) {
+ var cfrow = $n(r, "chilifreshReview");
+ if (cfrow) {
+ removeCSSClass( cfrow, 'hide_me' );
+ }
+ var cflink = $n(r, "chilifreshReviewLink");
+ if (cflink) {
+ cflink.setAttribute(
+ 'id',
+ 'isbn_' + currentISBN
+ );
+ }
+ var cfdiv = $n(r, "chilifreshReviewResult");
+ if (cfdiv) {
+ cfdiv.setAttribute(
+ 'id',
+ 'chili_review_' + currentISBN
+ )
+ }
+ }
+
/*
try {
var rank = parseFloat(ranks[pos + getOffset()]);
}
}
+function fetchChiliFreshReviews() {
+ if (chilifresh) {
+ chili_init();
+ }
+}
+
function resultPageIsDone(pos) {
return (recordsHandled == getDisplayCount()
--- /dev/null
+<!-- Specify your ChiliFresh account # below to enable ChiliFresh integration with the OPAC -->
+
+<!--#set var='OILS_CHILIFRESH_ACCOUNT' value=""-->
+<!--#set var='OILS_CHILIFRESH_PROFILE' value=""-->
+<!--#set var='OILS_CHILIFRESH_URL' value="http://chilifresh.com/on-site/js/evergreen.js"-->
+
<div name='review_text' style='width: 100%; padding: 15px; border: 1px solid #E0E0E0;'> </div>
</div>
-->
+ <div id='rdetail_chilifresh_reviews' class='hide_me'>
+ <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
+ <div id='chilifreshReviewResult' name='chilifreshReviewResult' style='display:none'></div>
+ </div>
</div>
<div id='rdetail_toc_div' class='rdetail_extras_div hide_me'> </div>
<div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
<div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
<div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
+
+ <!-- ChiliFresh setup -->
+ <!--#include virtual="../chilifresh.xml"-->
+ <script language='javascript' type='text/javascript'>
+ var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+ </script>
+ <!--if expr="$OILS_CHILIFRESH_ACCOUNT"-->
+ <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+ value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+ <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+ value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+ <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+ <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+ <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+ <!--endif-->
+
</div>
<a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
</span>
-
+ <!-- Placeholder for ChilFresh Review link -->
+ <span name="chilifreshReviewLink" class="chili_review"></span>
</td>
</tr>
<tr name="local_callnumber_list" class="result_table_title_cell hide_me">
- <td>&result.localCallNumbers;
+ <td colspan="2">&result.localCallNumbers;
<span type='opac/slot-data+holdings_xml' query='volumes volume' join=", ">
<!-- Because we clone this template table, and IE won't clone <script>
nodes (yes, even when it doesn't understand the type ARG) we need
</span>
</td>
</tr>
-
+ <!-- Placeholder for ChiliFresh Review -->
+ <tr class="hide_me" name="chilifreshReview">
+ <td></td>
+ <td valign="top">
+ <div name="chilifreshReviewResult" style="display:none"></div>
+ </td>
+ </tr>
</tbody>
</table>
</td>
config.names.result.format_pic = 'format_pic'
</script>
+ <!-- ChiliFresh setup -->
+ <!--#include virtual="../chilifresh.xml"-->
+ <script language='javascript' type='text/javascript'>
+ var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+ </script>
+ <!--if expr="$OILS_CHILIFRESH_ACCOUNT"-->
+ <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+ value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+ <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+ value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+ <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+ <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+ <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+ <!--endif-->
</div>