$(element).on("click", function () {
if (scope.tab_val == 0) {
-
scope.create_abtest();
-
-
}
else {
if (scope.tab_val == 2) {
scope.a_b_update();
}
}
-
scope.tab_upd();
var myArray1 = [];
}
}
-
scope.$apply();
e.preventDefault();
})
};
});
- crmMailingAB.directive('stopa', function () {
+ crmMailingAB.directive('replytoselect',function(){
+ return {
+ restrict : 'AE',
+ link: function(scope, element, attrs){
+
+ function format(item){
+ return item.label.replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+ }
+
+ CRM.api3('OptionGroup', 'get', {
+ "sequential": 1,
+ "name": "from_email_address"
+ }).done(function(result) {
+ var emailGroupId = result.id;
+ console.log(result);
+ CRM.api3('OptionValue', 'get', {
+ "sequential": 1,
+ "option_group_id": result.id
+ }).done(function(orgEmails) {
+ console.log(orgEmails);
+
+ //$sce.trustAsHtml(
+
+ $(element).select2({width:"200px",
+ data: orgEmails.values,
+ formatResult: format,
+ formatSelection: format,
+ placeholder:"Select reply to address"});
+
+ });
+
+ });
+
+
+ }
+ };
+ });
+
+ crmMailingAB.directive('stopa',function(){
return {
restrict: 'AE',
link: function (scope, element, attrs) {
<tr>
<td class="label">Reply to E-mail Address</td>
<td>
- <select style="width: 200px" ng-model="mailA.replyto_email"
- ng-options="frm.email as frm.email for frm in eMailing" >
- <option value="">-none-</option>
- </select>
+ <input type="hidden" replytoselect id= "replyToEmail" ng-model="mailA.replyto_email"
+ ng-options="frm.email as frm.email for frm in eMailing" />
</td>
</tr>
<tr>