Basic fix for reporter as of rel_1_6 and the super-smart cstore
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Jul 2009 16:23:59 +0000 (16:23 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Jul 2009 16:23:59 +0000 (16:23 +0000)
As virtual fields are no longer defined in fm_IDL.xml, the old code that returned
a list of fields filtering on the virtual attribute started returning an empty list.

As a quick fix, we'll just return an array of all field elements.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13574 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/reports/xul/source-setup.js
Open-ILS/web/reports/xul/utilities.js

index 018e101..7a9ca84 100644 (file)
@@ -240,7 +240,7 @@ function populateDetailTree (tcNode, c, item) {
        var fullpath = item.getAttribute('fullpath');
        var reltype = item.getAttribute('reltype');
 
-       var fields = filterByAttributeNS(c.getElementsByTagName('field'),persistNS, 'virtual','false');
+       var fields = nodelistToArray(c.getElementsByTagName('field'));
        fields.sort( sortLabels );
 
        var id = c.getAttribute('id');
index a7ad73c..c8fc794 100644 (file)
@@ -80,4 +80,11 @@ function getKeys (hash) {
         return k;
 }
 
-
+/* This just lets us return an array consistent with the filterBy* functions */
+function nodelistToArray (nodes) {
+        var aResponse = [];
+        for ( var i = 0; i < nodes.length; i++ ) {
+                aResponse.push(nodes[i]);
+        }
+        return aResponse;
+}