CRM-15578 - crmMailingRecipients - Fix sporadically missing options
authorTim Otten <totten@civicrm.org>
Wed, 11 Feb 2015 00:19:02 +0000 (16:19 -0800)
committerTim Otten <totten@civicrm.org>
Wed, 11 Feb 2015 00:19:02 +0000 (16:19 -0800)
js/angular-crmMailing/directives.js

index b161cfa8c1f8a6a5d47d7c6d8e37b0d965a47be1..dd80fa324db7e86e78eda748a1a2a1dc0bad4727 100644 (file)
         scope.$watchCollection(attrs.crmMailing + ".mailings.include", refreshUI);
         scope.$watchCollection(attrs.crmMailing + ".mailings.exclude", refreshUI);
         setTimeout(refreshUI, 50);
+
+        scope.$watch(attrs.crmMailing, function(){
+          scope.mailing = scope.$parent.$eval(attrs.crmMailing);
+        });
+        scope.$watchCollection(attrs.crmAvailGroups, function(){
+          scope.groups = scope.$parent.$eval(attrs.crmAvailGroups);
+        });
+        scope.$watchCollection(attrs.crmAvailMailings, function(){
+          scope.mailings = scope.$parent.$eval(attrs.crmAvailMailings);
+        });
       }
     };
   });