Teach tadlv5 to display jackets by record ID ac_by_record_id_and_skin_tadlv5
authorJeff Godin <jgodin@tadl.org>
Wed, 2 May 2012 15:20:34 +0000 (11:20 -0400)
committerJeff Godin <jgodin@tadl.org>
Wed, 2 May 2012 15:20:34 +0000 (11:20 -0400)
Teach the tadlv5 skin how to display jackets images by record ID.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/opac/skin/tadlv5/js/rdetail.js
Open-ILS/web/opac/skin/tadlv5/js/result_common.js

index defdc2e..c487c11 100644 (file)
@@ -467,8 +467,10 @@ function _rdetailDraw(r) {
                        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) {}
 
@@ -571,8 +573,8 @@ function _rdetailDraw(r) {
                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()), 'medium'));
+       $('rdetail_img_link').setAttribute('href', buildJacketSrc(record.doc_id(), 'large'));
+       G.ui.rdetail.image.setAttribute("src", buildJacketSrc(record.doc_id(), 'medium'));
        runEvt("rdetail", "recordDrawn");
        recordsCache.push(record);
 
index 35686a7..88bba52 100644 (file)
@@ -506,8 +506,8 @@ function resultDisplayRecord(rec, pos, is_mr) {
 */
 
     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");
     }