[open-ils-commits] r16791 - in trunk/Open-ILS: examples/apache web/opac/locale/en-US web/opac/skin/default/js web/opac/skin/default/xml/rdetail web/opac/skin/default/xml/result web/opac/theme/default/css (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 23 14:09:17 EDT 2010


Author: phasefx
Date: 2010-06-23 14:09:13 -0400 (Wed, 23 Jun 2010)
New Revision: 16791

Modified:
   trunk/Open-ILS/examples/apache/eg_vhost.conf
   trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
   trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
   trunk/Open-ILS/web/opac/skin/default/js/result_common.js
   trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml
   trunk/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
   trunk/Open-ILS/web/opac/theme/default/css/colors.css
Log:
correct the logic for detecting whether ChiliFresh has been configured, and add similar support for Novelist

Modified: trunk/Open-ILS/examples/apache/eg_vhost.conf
===================================================================
--- trunk/Open-ILS/examples/apache/eg_vhost.conf	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/examples/apache/eg_vhost.conf	2010-06-23 18:09:13 UTC (rev 16791)
@@ -102,6 +102,10 @@
     #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
+
 </LocationMatch>
 
 

Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd	2010-06-23 18:09:13 UTC (rev 16791)
@@ -549,6 +549,7 @@
 <!ENTITY rdetail.extras.preview.fulltext "Full text">
 <!ENTITY rdetail.extras.preview.title "See the full text of this book.">
 <!ENTITY rdetail.extras.preview.badge "Show a preview of this book from Google Book Search">
+<!ENTITY rdetail.extras.novelist "Suggestions by Novelist">
 <!ENTITY rdetail.loading "Loading copy information...">
 <!ENTITY rdetail.noneAvailable " * There are no copies in this location">
 <!ENTITY rdetail.summary.online "Online Resources">

Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js	2010-06-23 18:09:13 UTC (rev 16791)
@@ -469,17 +469,33 @@
 	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 @@
 	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 @@
 	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 @@
 			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'));

Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js	2010-06-23 18:09:13 UTC (rev 16791)
@@ -453,7 +453,7 @@
         }
     }
 
-    if (currentISBN && chilifresh) {
+    if (currentISBN && chilifresh && chilifresh != '(none)') {
         var cfrow = $n(r, "chilifreshReview");
         if (cfrow) {
             removeCSSClass( cfrow, 'hide_me' );
@@ -672,8 +672,8 @@
 }
 
 function fetchChiliFreshReviews() {
-    if (chilifresh) {
-        chili_init();
+    if (chilifresh && chilifresh != '(none)') {
+        try { chili_init(); } catch(E) { dump(E + '\n'); }
     }
 }
 

Modified: trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml	2010-06-23 18:09:13 UTC (rev 16791)
@@ -46,7 +46,6 @@
 						class='classic_link'>&rdetail.extras.author.notes;</a>
 				</td>
 
-
 				<td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
 					style='padding-right: 15px; padding-left: 15px;' >
 					<a href='javascript:rdetailShowExtra("annotation");' 
@@ -59,6 +58,11 @@
 						class='classic_link'>&rdetail.extras.marc;</a>
 				</td>
 
+				<td id='rdetail_novelist_link' class='hide_me rdetail_extras_td'
+					style='padding-right: 15px; padding-left: 15px;' >
+					<a href='javascript:rdetailShowExtra("novelist");' 
+						class='classic_link'>&rdetail.extras.novelist;</a>
+				</td>
 
 			</tr>
 		</thead>
@@ -95,6 +99,16 @@
 			<div id='rdetail_view_marc_box'> </div>
 		</div>
 
+        <div id='rdetail_novelist_div' class='rdetail_extras_div hide_me'>
+            <div id="NoveListSelect" class="NoveListSelect">
+                <div id="NoveListAnchor" class="NoveListSelect"></div>
+                <div id="novsuggestions"></div>
+                <div id="nextreads"></div>
+                <div id="novrelatedauthors"></div>
+               <div id="novrelateditems"></div>
+            </div>
+        </div>
+
 		<div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
 
 			<div id='cn_browse_none' class='hide_me color_4' style='width: 90%; text-align: center; margin: 10px;'>
@@ -122,8 +136,9 @@
     <!-- ChiliFresh setup -->
     <script language='javascript' type='text/javascript'>
         var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+        if (chilifresh == '(none)') { chilifresh = false; }
     </script>
-    <!--if expr="$OILS_CHILIFRESH_ACCOUNT"-->
+    <!--if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
         <input type="hidden" id="chilifresh_account" name="chilifresh_account"
             value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
         <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
@@ -133,4 +148,13 @@
         <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
     <!--endif-->
 
+    <!-- Novelist setup -->
+    <!--if expr="${OILS_NOVELIST_URL} && ${OILS_NOVELIST_URL}!='(none)'"-->
+        <script type="text/javascript" id="EIT" src="<!--#echo var='OILS_NOVELIST_URL'-->"></script>
+    <!--endif-->
+    <script language='javascript' type='text/javascript'>
+        var novelist = '<!--#echo var="OILS_NOVELIST_URL"-->';
+        if (novelist == '(none)') { novelist = false; }
+    </script>
+
 </div>

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	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/web/opac/skin/default/xml/result/result_table.xml	2010-06-23 18:09:13 UTC (rev 16791)
@@ -222,8 +222,9 @@
     <!-- ChiliFresh setup -->
     <script language='javascript' type='text/javascript'>
         var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+        if (chilifresh=='(none)') { chilifresh = false; }
     </script>
-    <!--if expr="$OILS_CHILIFRESH_ACCOUNT"-->
+    <!--if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
         <input type="hidden" id="chilifresh_account" name="chilifresh_account"
             value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
         <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"

Modified: trunk/Open-ILS/web/opac/theme/default/css/colors.css
===================================================================
--- trunk/Open-ILS/web/opac/theme/default/css/colors.css	2010-06-23 18:03:42 UTC (rev 16790)
+++ trunk/Open-ILS/web/opac/theme/default/css/colors.css	2010-06-23 18:09:13 UTC (rev 16791)
@@ -1,6 +1,8 @@
 body a			{ color: black; text-decoration: none;}
 body a:visited { color: black; text-decoration: none;}
 body a:hover	{ color: red; text-decoration: underline;}
+.NoveListSelect a			{ color: blue; text-decoration: underline;}
+.NoveListSelect a:visited	{ color: purple; text-decoration: underline;}
 
 
 /* the idea is to have 4 complimentary colors that 



More information about the open-ils-commits mailing list