From cf595fa5ef40de4dcbfd3dcedebe08d5303b6b43 Mon Sep 17 00:00:00 2001 From: Joseph Lacey Date: Tue, 28 Apr 2015 15:41:28 -0600 Subject: [PATCH] CRM-16353 - Bug fix to Common.js for parsing cell attributes. Whitespace cleanup flagged by Jenkins. ---------------------------------------- * CRM-16353: Upgrade datatables integration to use v2 api https://issues.civicrm.org/jira/browse/CRM-16353 --- CRM/Activity/BAO/Activity.php | 4 ++-- CRM/Contact/BAO/Relationship.php | 4 ++-- js/Common.js | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 16e0fd8a15..41be25ada3 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -2509,8 +2509,8 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n } $activity['DT_RowData'] = array(); - $activity['DT_RowData']['entity'] = 'activity'; - $activity['DT_RowData']['id'] = $activityId; + $activity['DT_RowData']['entity'] = 'activity'; + $activity['DT_RowData']['id'] = $activityId; $activity['activity_type'] = $values['activity_type']; $activity['subject'] = $values['subject']; diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 9d3d710ba0..ee0d1aa582 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1943,8 +1943,8 @@ AND cc.sort_name LIKE '%$name%'"; } $relationship['DT_RowData'] = array(); - $relationship['DT_RowData']['entity'] = 'relationship'; - $relationship['DT_RowData']['id'] = $values['id']; + $relationship['DT_RowData']['entity'] = 'relationship'; + $relationship['DT_RowData']['id'] = $values['id']; //Add image icon for related contacts: CRM-14919 $icon = CRM_Contact_BAO_Contact_Utils::getImage($values['contact_type'], diff --git a/js/Common.js b/js/Common.js index 0ebd6daa2c..f6f87b1d2a 100644 --- a/js/Common.js +++ b/js/Common.js @@ -675,7 +675,11 @@ CRM.strings = CRM.strings || {}; $('thead th', settings.nTable).each( function( index ) { $.each(this.attributes, function() { if(this.name.match("^cell-")) { - $('tbody td:eq(' + index + ')').attr( this.name.substring(5), this.value ); + var cellAttr = this.name.substring(5); + var cellValue = this.value + $('tbody tr', settings.nTable).each( function() { + $('td:eq('+ index +')', this).attr( cellAttr, cellValue ); + }); } }); }); -- 2.25.1