From 650378f6876f855ce5e34686979b1a7dc8a1e38c Mon Sep 17 00:00:00 2001 From: senator Date: Thu, 8 Jul 2010 15:58:49 +0000 Subject: [PATCH] Acq: try looking up jacket image by UPC if ISBN is not available git-svn-id: svn://svn.open-ils.org/ILS/trunk@16885 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 040e0e88c..abeb2ae60 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -263,10 +263,15 @@ function AcqLiTable() { dojo.forEach(tds, function(td) {self.setRowAttr(td, liWrapper, td.getAttribute('attr'), td.getAttribute('attr_type'));}); dojo.query('[name=source_label]', row)[0].appendChild(document.createTextNode(li.source_label())); - var isbn = liWrapper.findAttr('isbn', 'lineitem_marc_attr_definition'); - if(isbn) { - // XXX media prefix for added content - dojo.query('[name=jacket]', row)[0].setAttribute('src', '/opac/extras/ac/jacket/small/' + isbn); + var identifier = + liWrapper.findAttr("isbn", "lineitem_marc_attr_definition") || + liWrapper.findAttr("upc", "lineitem_marc_attr_definition"); + + // XXX media prefix for added content + if (identifier) { + nodeByName("jacket").setAttribute( + "src", "/opac/extras/ac/jacket/small/" + identifier + ); } nodeByName("worksheet_link", row).href = -- 2.11.0