CRM-16353 - Bug fix to Common.js for parsing cell attributes. Whitespace cleanup...
authorJoseph Lacey <joseph@palantetech.coop>
Tue, 28 Apr 2015 21:41:28 +0000 (15:41 -0600)
committerJoseph Lacey <joseph@palantetech.coop>
Tue, 28 Apr 2015 21:41:28 +0000 (15:41 -0600)
----------------------------------------
* CRM-16353: Upgrade datatables integration to use v2 api
  https://issues.civicrm.org/jira/browse/CRM-16353

CRM/Activity/BAO/Activity.php
CRM/Contact/BAO/Relationship.php
js/Common.js

index 16e0fd8a1534e690d1298989df8b5fb244432cc8..41be25ada335022ca98ddc87d1141fb2e57eaeff 100644 (file)
@@ -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'];
index 9d3d710ba004a758b2a33790b9ad91c8665428e9..ee0d1aa582359e44f7eececa80c63cdc942454d1 100644 (file)
@@ -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'],
index 0ebd6daa2c12820b2029b3346bb21f370cbb8f90..f6f87b1d2abf211c0c33920cbb45cc569acb5719 100644 (file)
@@ -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 );
+                });
               }
             });
           });