From: pines Date: Wed, 16 May 2007 01:35:56 +0000 (+0000) Subject: fixing path-building code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=667a336a0c9328bc509eaa0f239f2a0cfa7bf3a2;p=Evergreen.git fixing path-building code git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7314 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/reports/xul/template-config.js b/Open-ILS/web/reports/xul/template-config.js index c1d533dde9..04fc2ca282 100644 --- a/Open-ILS/web/reports/xul/template-config.js +++ b/Open-ILS/web/reports/xul/template-config.js @@ -840,10 +840,15 @@ function fleshFromPath ( template, rel ) { current_obj.key = current_link.getAttribute('key'); if ( - current_link.getAttribute('reltype') != 'has_a' || - prev_type == 'left' || - rel.reltype != 'has_a' - ) current_obj.type = 'left'; + ( + current_link.getAttribute('reltype') != 'has_a' || + prev_type == 'left' || + rel.reltype != 'has_a' + ) && ( + !rel.fields.filter_tab && + !rel.fields.aggfitler_tab + ) + ) current_obj.type = 'left'; prev_type = current_obj.type; } @@ -860,12 +865,14 @@ function fleshFromPath ( template, rel ) { if (join_link.getAttribute('reltype') != 'has_a') { var fields_el = current_class.getElementsByTagName('fields')[0]; - join_field = fields_el.getAttributeNS(persistNS, 'primary') + '-' + join_link.getAttribute('key'); + join_field = + fields_el.getAttributeNS(persistNS, 'primary') + + '-' + join_link.getAttribute('class') + + '-' + join_link.getAttribute('key'); } - current_obj.alias = hex_md5( current_path ) ; + if (!current_obj.alias) current_obj.alias = hex_md5( current_path ) ; join_field += '-' + current_obj.alias; - if (table_path.length == 1) join_field += '-' + rel.alias; if (!current_obj.join) current_obj.join = {}; if (!current_obj.join[join_field]) current_obj.join[join_field] = {};