CRM-15880 - crmMailing - Properly display recipients on multi-lingual sites.
authorTim Otten <totten@civicrm.org>
Sat, 31 Jan 2015 06:00:38 +0000 (22:00 -0800)
committerTim Otten <totten@civicrm.org>
Sat, 31 Jan 2015 06:00:38 +0000 (22:00 -0800)
js/angular-crmMailing/services.js

index e1eae1c2bc56bc586f21ba64b32ebfa58b7c2f77..c33a120ea2c0bfdcb1b3ee2dd890d74f4b6b1663 100644 (file)
             mailing.groups = {include: [], exclude: []};
             mailing.mailings = {include: [], exclude: []};
             _.each(groupResult.values, function (mailingGroup) {
-              var bucket = (mailingGroup.entity_table == 'civicrm_group') ? 'groups' : 'mailings';
+              var bucket = (/^civicrm_group/.test(mailingGroup.entity_table)) ? 'groups' : 'mailings';
               var entityId = parseInt(mailingGroup.entity_id);
               mailing[bucket][mailingGroup.group_type].push(entityId);
             });