var partialUrl = function (relPath) {
return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
};
- var mltokens = [];
var crmMailingAB = angular.module('crmMailingAB', ['ngRoute', 'ui.utils', 'ngSanitize']);
crmMailingAB.run(function ($rootScope, $templateCache) {
}
]);
-//-----------------------------------------
+ //-----------------------------------------
// Add a new record by name.
// Ex: <crmAddName crm-options="['Alpha','Beta','Gamma']" crm-var="newItem" crm-on-add="callMyCreateFunction(newItem)" />
/**
$scope.mailid = [];
$scope.preventsubmit = false;
-
- mltokens = CRM.crmMailing.mailTokens;
if ($scope.currentABTest.declare_winning_time != null) {
$scope.ans = $scope.currentABTest.declare_winning_time.split(" ");
$scope.currentABTest.date = $scope.ans[0];
abmailC.success(function (data) {
if (data.is_error == 0) {
$scope.mailC = data;
-
-
}
});
}
return {
restrict: 'AE',
link: function (scope, element, attrs) {
- $(element).select2({width: "200px", data: mltokens, placeholder: "Insert Token"});
+ $(element).select2({width: "200px", data: CRM.crmMailing.mailTokens, placeholder: "Insert Token"});
$(element).on('select2-selecting', function (e) {
scope.$evalAsync('_resetSelection()');