return '../../../../extras/ac/jacket/'+size+'/'+isbn;
}
+/**
+* This function should return a URL which points to the book cover image based on record ID.
+*/
+
+function buildJacketSrc(rec_id, size) {
+size = (size) ? size : 'small';
+ var protocol = (OILS_OPAC_STATIC_PROTOCOL) ? OILS_OPAC_STATIC_PROTOCOL + ':' : location.protocol;
+ if(OILS_OPAC_IMAGES_HOST)
+ return protocol + '//' + OILS_OPAC_IMAGES_HOST + size + '/r/' + rec_id;
+ return '../../../../extras/ac/jacket/'+size+'/r/'+rec_id;
+}
function acMakeURL(type, key) {
return '../../../../extras/ac/' + type + '/html/' + key;
buildTitleDetailLink(mods, title_td);
buildSearchLink(STYPE_AUTHOR, mods.author(), author_td);
- pic_td.setAttribute("src", buildISBNSrc(cleanISBN(mods.isbn())));
+ pic_td.setAttribute("src", buildJacketSrc(mods.doc_id()));
var args = {};
args.page = RDETAIL;
rdetailCheckForGBPreview();
} else {
- hideMe($("rdetail.jacket_attrib_div"));
- hideMe($("rdetail_img_link"));
+ if(!record.doc_id()) {
+ hideMe($("rdetail.jacket_attrib_div"));
+ hideMe($("rdetail_img_link"));
+ }
}
} catch(E) {}
unHideMe($('rdetail_exp_refworks_span'));
}
- $('rdetail_img_link').setAttribute('href', buildISBNSrc(cleanISBN(record.isbn()), 'large'));
- G.ui.rdetail.image.setAttribute("src", buildISBNSrc(cleanISBN(record.isbn())));
+ $('rdetail_img_link').setAttribute('href', buildJacketSrc(record.doc_id()), 'large'));
+ G.ui.rdetail.image.setAttribute("src", buildJacketSrc(record.doc_id()));
runEvt("rdetail", "recordDrawn");
recordsCache.push(record);
*/
var pic = $n(r, config.names.result.item_jacket);
- if (currentISBN) {
- pic.setAttribute("src", buildISBNSrc(currentISBN));
+ if (rec.doc_id()) {
+ pic.setAttribute("src", buildJacketSrc(rec.doc_id()));
} else {
pic.setAttribute("src", "/opac/images/blank.png");
}