From: phasefx Date: Wed, 23 Jun 2010 18:09:13 +0000 (+0000) Subject: correct the logic for detecting whether ChiliFresh has been configured, and add simil... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=01a912aeb8278bef8ed626bb81bb87762d695cc7;p=evergreen%2Fbjwebb.git correct the logic for detecting whether ChiliFresh has been configured, and add similar support for Novelist git-svn-id: svn://svn.open-ils.org/ILS/trunk@16791 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index b8b7bc199..1f3c6b833 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -102,6 +102,10 @@ RewriteRule - - [E=locale:%1] [L] #SetEnv OILS_CHILIFRESH_ACCOUNT #SetEnv OILS_CHILIFRESH_PROFILE #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js + + # Specify the initial script URL for Novelist (containing account credentials, etc.) + #SetEnv OILS_NOVELIST_URL + diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd index 959c4b5b1..575137314 100644 --- a/Open-ILS/web/opac/locale/en-US/opac.dtd +++ b/Open-ILS/web/opac/locale/en-US/opac.dtd @@ -549,6 +549,7 @@ We recommend that you remove this title from any bookbags it may have been added + diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index 7adfa0028..8dee437fa 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -469,16 +469,32 @@ function _rdetailDraw(r) { resultDrawSeries(); // grab added content + + // Proxied through Evergreen AddedContent module acCollectData(cleanISBN(record.isbn()), rdetailhandleAC); - // different type of added content var currentISBN = cleanISBN(record.isbn()); - if (chilifresh && currentISBN) { + + // Not proxied, cross-site javascript + + // ChiliFresh + if (chilifresh && chilifresh != '(none)' && currentISBN) { $('chilifreshReviewLink').setAttribute('id','isbn_'+currentISBN); $('chilifreshReviewResult').setAttribute('id','chili_review_'+currentISBN); unHideMe($('rdetail_reviews_link')); unHideMe($('rdetail_chilifresh_reviews')); - chili_init(); + try { + chili_init(); + } catch(E) { + dump(E + '\n'); + hideMe($('rdetail_reviews_link')); + hideMe($('rdetail_chilifresh_reviews')); + } + } + + // Novelist + if (novelist && currentISBN) { + unHideMe($('rdetail_novelist_link')); } } @@ -560,6 +576,7 @@ function rdetailShowExtra(type, args) { hideMe($('rdetail_marc_div')); hideMe($('cn_browse')); hideMe($('rdetail_cn_browse_div')); + hideMe($('rdetail_novelist_div')); hideMe($('rdetail_notes_div')); removeCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected'); @@ -571,6 +588,7 @@ function rdetailShowExtra(type, args) { removeCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected'); removeCSSClass($('rdetail_annotation_link'), 'rdetail_extras_selected'); removeCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected'); + removeCSSClass($('rdetail_novelist_link'), 'rdetail_extras_selected'); switch(type) { @@ -616,6 +634,11 @@ function rdetailShowExtra(type, args) { req.send(); break; + case "novelist": + addCSSClass($('rdetail_novelist_link'), 'rdetail_extras_selected'); + unHideMe($('rdetail_novelist_div')); + break; + case 'cn': addCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected'); unHideMe($('rdetail_cn_browse_div')); diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index 743420a97..1ae9074c5 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -453,7 +453,7 @@ function resultDisplayRecord(rec, pos, is_mr) { } } - if (currentISBN && chilifresh) { + if (currentISBN && chilifresh && chilifresh != '(none)') { var cfrow = $n(r, "chilifreshReview"); if (cfrow) { removeCSSClass( cfrow, 'hide_me' ); @@ -672,8 +672,8 @@ function fetchGoogleBooksLink () { } function fetchChiliFreshReviews() { - if (chilifresh) { - chili_init(); + if (chilifresh && chilifresh != '(none)') { + try { chili_init(); } catch(E) { dump(E + '\n'); } } } diff --git a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml index 984298515..1913c694f 100644 --- a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml +++ b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml @@ -46,7 +46,6 @@ class='classic_link'>&rdetail.extras.author.notes; - &rdetail.extras.marc; + + &rdetail.extras.novelist; + @@ -95,6 +99,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -122,8 +136,9 @@ - + + + + + + +
diff --git a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml index b34f4d3c1..46edda88c 100644 --- a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml +++ b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml @@ -222,8 +222,9 @@ - +