From: Joseph Lacey Date: Tue, 28 Apr 2015 21:41:28 +0000 (-0600) Subject: CRM-16353 - Bug fix to Common.js for parsing cell attributes. Whitespace cleanup... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cf595fa5ef40de4dcbfd3dcedebe08d5303b6b43;p=civicrm-core.git 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 --- 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 ); + }); } }); });