in related viewer mode, go ahead and show the li attrs in the detail page since we...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 4 Apr 2010 16:18:15 +0000 (16:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 4 Apr 2010 16:18:15 +0000 (16:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16123 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/common/li_table.js

index 79a8095..62a149c 100644 (file)
@@ -655,23 +655,23 @@ function AcqLiTable() {
         while(this.infoTbody.childNodes[0])
             this.infoTbody.removeChild(this.infoTbody.childNodes[0]);
 
-        if (!this._isRelatedViewer) {
-            for(var i = 0; i < li.attributes().length; i++) {
-                var attr = li.attributes()[i];
-                var row = this.infoRow.cloneNode(true);
-
-                var type = attr.attr_type().replace(/lineitem_(.*)_attr_definition/, '$1');
-                var name = openils.acq.Lineitem.attrDefs[type].filter(
-                    function(a) {
-                        return (a.code() == attr.attr_name());
-                    }
-                ).pop().description();
+        for(var i = 0; i < li.attributes().length; i++) {
+            var attr = li.attributes()[i];
+            var row = this.infoRow.cloneNode(true);
+
+            var type = attr.attr_type().replace(/lineitem_(.*)_attr_definition/, '$1');
+            var name = openils.acq.Lineitem.attrDefs[type].filter(
+                function(a) {
+                    return (a.code() == attr.attr_name());
+                }
+            ).pop().description();
 
-                dojo.query('[name=label]', row)[0].appendChild(document.createTextNode(name));
-                dojo.query('[name=value]', row)[0].appendChild(document.createTextNode(attr.attr_value()));
-                this.infoTbody.appendChild(row);
-            }
+            dojo.query('[name=label]', row)[0].appendChild(document.createTextNode(name));
+            dojo.query('[name=value]', row)[0].appendChild(document.createTextNode(attr.attr_value()));
+            this.infoTbody.appendChild(row);
+        }
 
+        if (!this._isRelatedViewer) {
             nodeByName("rel_link", dojo.byId("acq-lit-info-related")).href =
                 "/eg/acq/lineitem/related/" + li.id();
         }