return '../../../../extras/ac/jacket/'+size+'/'+isbn;
}
-function buildVendorProductLink(isbn, vendor) {
- vendor = (vendor) ? vendor : ADDED_CONTENT_VENDOR;
- switch(vendor) {
- case 'amazon':
- return 'http://www.amazon.com/dp/' + isbn;
- }
- return '';
-}
-
function acMakeURL(type, key) {
return '../../../../extras/ac/' + type + '/html/' + key;
var PREF_DEF_DEPTH = 'opac.default_search_depth';
-/** global added content vendor setting. This setting is only needed/used
- if your added content vendor requires links back to their site. If
- set to null, no links will be constructed
-
- Current options are: null and 'amazon'
+/** If enabled, added content attribution links will be
+ made visible where appropriate. The added content vendor name
+ and URL are defined in the entities in opac.dtd
*/
-var ADDED_CONTENT_VENDOR=null;
+var ENABLE_ADDED_CONTENT_ATTRIB_LINKS = false;
/* container for global variables shared accross pages */
<!ENTITY slimpac.advanced.edit_date "Record Edit Date">
<!ENTITY opac.image_provided "Image provided by">
-<!ENTITY vendor.amazon "Amazon">
+<!ENTITY vendor.name "Amazon">
+<!ENTITY vendor.base_link "http://amazon.com/dp/">
G.ui.rdetail.abstr.appendChild(text(record.synopsis()));
try{
- if(ADDED_CONTENT_VENDOR) {
+ if(ENABLE_ADDED_CONTENT_ATTRIB_LINKS) {
unHideMe($('rdetail.jacket_attrib_div'));
- $('rdetail.jacket_attrib_link').setAttribute(
- 'href', buildVendorProductLink(cleanISBN(record.isbn())));
+ var href = $('rdetail.jacket_attrib_link').getAttribute('href') +cleanISBN(record.isbn());
+ $('rdetail.jacket_attrib_link').setAttribute('href', href);
}
} catch(E) {}
<!-- vendor attribution link -->
<div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
<div>&opac.image_provided;</div>
- <div><a class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.amazon;</a></div>
+ <div><a target='_blank' href='&vendor.base_link;'
+ class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
</div>
</td>
<td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>