From: miker Date: Wed, 16 May 2007 02:17:10 +0000 (+0000) Subject: forward-porting path fixes from 1.0; testing left-join fix for display-only fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cc69dfa8588eb8b3f33c1e0e2118d867b0183f36;p=Evergreen.git forward-porting path fixes from 1.0; testing left-join fix for display-only fields git-svn-id: svn://svn.open-ils.org/ILS/trunk@7316 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..5b18a3b2df 100644 --- a/Open-ILS/web/reports/xul/template-config.js +++ b/Open-ILS/web/reports/xul/template-config.js @@ -840,9 +840,14 @@ 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_link.getAttribute('reltype') != 'has_a' || + prev_type == 'left' || + rel.reltype != 'has_a' + ) && ( + getKeys(rel.fields.filter_tab).length == 0 && + getKeys(rel.fields.aggfitler_tab).length == 0 + ) ) 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] = {};