Acq: try looking up jacket image by UPC if ISBN is not available
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 8 Jul 2010 15:58:49 +0000 (15:58 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 8 Jul 2010 15:58:49 +0000 (15:58 +0000)
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

index 040e0e8..abeb2ae 100644 (file)
@@ -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 =