(function (angular, $, _) {
- var partialUrl = function (relPath) {
- return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
- };
-
- var crmMailingAB = angular.module('crmMailingAB', ['ngRoute', 'ui.utils']);
-
- crmMailingAB.run(function ($rootScope, $templateCache) {
- $rootScope.$on('$viewContentLoaded', function () {
- $templateCache.removeAll();
- });
- });
-
- crmMailingAB.config([
- '$routeProvider',
- function ($routeProvider) {
- $routeProvider.when('/mailing/abtesting', {
- templateUrl: partialUrl('main.html'),
- controller: 'TabsDemoCtrl',
- resolve: {
- mailingList: function ($route, crmApi) {
- return crmApi('Mailing', 'get', {});
- }
- }
- });
- }
- ]);
+ var partialUrl = function (relPath) {
+ return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
+ };
+
+ var crmMailingAB = angular.module('crmMailingAB', ['ngRoute', 'ui.utils']);
+
+ crmMailingAB.run(function ($rootScope, $templateCache) {
+ $rootScope.$on('$viewContentLoaded', function () {
+ $templateCache.removeAll();
+ });
+ });
+
+ crmMailingAB.config([
+ '$routeProvider',
+ function ($routeProvider) {
+ $routeProvider.when('/mailing/abtesting', {
+ templateUrl: partialUrl('list.html'),
+ controller: 'ListingCtrl',
+ resolve: {
+ mailingList: function ($route, crmApi) {
+ return crmApi('Mailing', 'get', {});
+ }
+ }
+ });
+ $routeProvider.when('/mailing/abtesting/:id', {
+ templateUrl: partialUrl('main.html'),
+ controller: 'TabsDemoCtrl',
+ resolve: {
+ mailingList: function ($route, crmApi) {
+ return crmApi('Mailing', 'get', {});
+ }
+ }
+ });
+ }
+ ]);
//-----------------------------------------
- // Add a new record by name.
- // Ex: <crmAddName crm-options="['Alpha','Beta','Gamma']" crm-var="newItem" crm-on-add="callMyCreateFunction(newItem)" />
-
- crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi) {
-
- $scope.groups = CRM.crmMailing.groupNames;
- $scope.mailList = CRM.crmMailing.civiMails;
-
- $scope.tab_val = 0;
- $scope.max_tab = 0;
- $scope.campaign_clicked = function () {
- if ($scope.max_tab >= 0) {
- $scope.tab_val = 0;
- }
- };
- $scope.compose_clicked = function () {
- if ($scope.max_tab >= 1) {
- $scope.tab_val = 1;
- }
- };
- $scope.rec_clicked = function () {
- if ($scope.max_tab >= 2) {
- $scope.tab_val = 2;
- }
- };
- $scope.preview_clicked = function () {
- if ($scope.max_tab >= 3) {
- $scope.tab_val = 3;
- }
- };
- $scope.templates =
- [
- { name: 'Subject Lines', url: partialUrl('subject_lines.html')},
- { name: 'From Name', url: partialUrl('from_name.html')},
- {name: 'Two different Emails', url: partialUrl('two_emails.html')}
- ];
- $scope.template = $scope.templates[0];
-
- $scope.slide_value = 0;
-
- $scope.setifyes = function (val) {
- if (val == 1) {
- $scope.ifyes = true;
- }
- else {
- $scope.ifyes = false;
- }
- };
-
- $scope.send_date = "01/01/2000";
-
- $scope.dt = "";
-
- $scope.mailA = {};
-
- $scope.mailB = {};
- $scope.save = function (dat) {
-
- var result = crmApi('Mailing', 'create', dat, true);
- console.log("Ac " + result);
- };
-
- $scope.init = function (par) {
-
- $scope.whatnext = par.toString()
- };
-
- $scope.setdate = function (par) {
- console.log("called")
- console.log("av " + par)
- $scope.send_date = par;
- $scope.dt = par;
- $scope.apply();
- };
-
- $scope.scheddate = {};
- $scope.scheddate.date = "6";
- $scope.scheddate.time = "";
- $scope.incGroup = [];
- $scope.excGroup = [];
-
-
- });
-
- crmMailingAB.directive('nexttab', function () {
- return {
- // Restrict it to be an attribute in this case
- restrict: 'A',
-
- priority: 500,
- // responsible for registering DOM listeners as well as updating the DOM
- link: function (scope, element, attrs) {
-
- $(element).parent().parent().parent().parent().tabs(scope.$eval(attrs.nexttab));
- var myarr = new Array(1, 2, 3)
- $(element).parent().parent().parent().parent().tabs({disabled: myarr});
-
- $(element).on("click", function () {
- scope.tab_val = scope.tab_val + 1;
-
- scope.max_tab = Math.max(scope.tab_val, scope.max_tab);
- var myArray1 = new Array();
- for (var i = scope.max_tab + 1; i < 4; i++) {
- myArray1.push(i);
- }
- $(element).parent().parent().parent().parent().parent().tabs("option", "disabled", myArray1);
- $(element).parent().parent().parent().parent().parent().tabs("option", "active", scope.tab_val);
- scope.$apply();
- console.log("Adir");
- });
- }
- };
- });
-
- crmMailingAB.directive('prevtab', function () {
- return {
- // Restrict it to be an attribute in this case
- restrict: 'A',
- priority: 500,
- // responsible for registering DOM listeners as well as updating the DOM
- link: function (scope, element, attrs) {
-
-
- $(element).on("click", function () {
- var temp = scope.tab_val - 1;
- scope.tab_val = scope.tab_val - 1;
-
- console.log(temp);
- if (temp == 3) {
-
- }
- else {
- $(element).parent().parent().parent().parent().parent().tabs("option", "active", temp);
- }
-
- scope.$apply();
-
- });
- }
- };
- });
-
- crmMailingAB.directive('groupselect', function () {
- return {
- restrict: 'AE',
- link: function (scope, element, attrs) {
- function format(item) {
- if (!item.id) {
- // return `text` for optgroup
- return item.text;
- }
- // return item template
- var a = item.id.split(" ");
- if (a[1] == "group" && a[2] == "include") {
- return "<img src='../../sites/all/modules/civicrm/i/include.jpeg' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/group.png' height=12 width=12/>" + item.text;
- }
- if (a[1] == "group" && a[2] == "exclude") {
- return "<img src='../../sites/all/modules/civicrm/i/Error.gif' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/group.png' height=12 width=12/>" + item.text;
- }
- if (a[1] == "mail" && a[2] == "include") {
- return "<img src='../../sites/all/modules/civicrm/i/include.jpeg' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/EnvelopeIn.gif' height=12 width=12/>" + item.text;
- }
- if (a[1] == "mail" && a[2] == "exclude") {
- return "<img src='../../sites/all/modules/civicrm/i/Error.gif' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/EnvelopeIn.gif' height=12 width=12/>" + item.text;
- }
- }
-
- $(element).select2({
- width: "400px",
- placeholder: "Select the groups you wish to include",
- formatResult: format,
- formatSelection: format,
- escapeMarkup: function (m) {
- return m;
- }
- });
-
- $(element).on('select2-selecting', function (e) {
- var a = e.val.split(" ");
- var l = a.length;
- if (a[2] == "include") {
- var str = "";
- for (i = 3; i < l; i++) {
- str += a[i];
- str += " ";
- }
- scope.incGroup.push(str);
- scope.$apply();
- }
-
- else {
- var str = "";
- for (i = 3; i < l; i++) {
- str += a[i];
- str += " ";
- }
-
- scope.excGroup.push(str);
- scope.$apply();
- }
-
- });
- $(element).on("select2-removed", function (e) {
- if (e.val.split(" ")[2] == "exclude") {
- var index = scope.excGroup.indexOf(e.val.split(" ")[3]);
- scope.excGroup.splice(index, 1);
- scope.$apply();
- }
- else {
- var index = scope.incGroup.indexOf(e.val.split(" ")[3]);
- scope.incGroup.splice(index, 1);
- scope.$apply();
- }
- });
- }
- };
-
- });
-
- crmMailingAB.directive('sliderbar', function () {
- return{
- restrict: 'AE',
- link: function (scope, element, attrs) {
- $(element).slider({min: 1});
- $(element).slider({
- slide: function (event, ui) {
- scope.slide_value = ui.value;
- scope.$apply();
- }
- });
- }
- };
- });
-
- crmMailingAB.directive('tpmax', function () {
- return {
- restrict: 'E',
- link: function (scope, element, attr) {
- scope.$watch('automated', function (val) {
- if (val == "Yes") {
- $(element).dialog({
- title: 'Automated A/B Testing',
- width: 800,
- height: 600,
- closed: false,
- cache: false,
- modal: true
- });
- }
- });
-
- $(element).find("#closebutton").on("click", function () {
- $(element).dialog("close");
- });
- }
- };
- });
-
- crmMailingAB.directive('numbar', function () {
- return{
- restrict: 'AE',
- link: function (scope, element, attrs) {
- $(element).spinner({max: attrs.numbar, min: 0});
- }
- };
- });
-
- crmMailingAB.directive('datepick', function () {
- return {
-
-
- restrict: 'AE',
- link: function (scope, element, attrs) {
- $(element).datepicker({
- dateFormat: "yy-mm-dd",
- onSelect: function (date) {
- $(".ui-datepicker a").removeAttr("href");
-
- scope.scheddate.date = date.toString();
- scope.$apply();
- console.log(scope.scheddate.date);
-
- }
-
-
- });
- }
- };
- });
-
- crmMailingAB.directive('submitform', function () {
- return {
- restrict: 'A',
- priority: 1000,
- link: function (scope, element, attrs) {
- $(element).on("click", function () {
-
- console.log("clicked");
- scope.save({
- "sequential": 1,
- "name": "Aditya Nambiar",
- "subject": scope.mailA.subj,
- "created_id": "2",
- "from_email": scope.mailA.fromEmail,
- "body_text": scope.mailA.body
-
- });
- console.log("Truth " + scope.whatnext)
-
- if (scope.whatnext == "3") {
- console.log("sdf");
- scope.mailB.subj = scope.mailA.subj;
- scope.mailB.body = scope.mailA.body;
-
- }
- else {
- if (scope.whatnext == "2") {
- scope.mailB.fromEmail = scope.mailA.fromEmail;
- scope.mailB.body = scope.mailA.body;
-
- }
- }
-
-
- scope.save({
- "sequential": 1,
- "name": "Aditya Nambiar",
- "subject": scope.mailB.subj,
- "created_id": "2",
- "from_email": scope.mailB.fromEmail,
- "body_text": scope.mailB.body
-
- });
-
- });
- }
- };
-
- });
-
- crmMailingAB.directive('nextbutton', function () {
- return {
- restrict: 'AE',
- replace: 'true',
- template: '<div class="crm-submit-buttons" id="campaignbutton">' +
- '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >' +
- '<input type="submit" value="Next" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>' +
- '</div></div>'
-
- };
- });
-
- crmMailingAB.directive('cancelbutton', function () {
- return {
- restrict: 'AE',
- replace: 'true',
- template: '<div class="crm-submit-buttons" id="campaignbutton">' +
- '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >' +
- '<input type="submit" value="Cancel" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" >' +
- '</div></div>'
-
- };
- });
-
- crmMailingAB.directive('prevbutton', function () {
- return {
- restrict: 'AE',
- replace: 'true',
- template: '<div class="crm-submit-buttons" >' +
- '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >' +
- '<input type="submit" value="Previous" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" prevtab={{tab_val}}>' +
- '</div></div>'
-
- };
- });
+ // Add a new record by name.
+ // Ex: <crmAddName crm-options="['Alpha','Beta','Gamma']" crm-var="newItem" crm-on-add="callMyCreateFunction(newItem)" />
+ crmMailingAB.controller('ListingCtrl', function ($scope, crmApi) {
+ $scope.mailList = CRM.crmMailing.civiMails;
+
+ })
+ crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi) {
+
+ $scope.groups = CRM.crmMailing.groupNames;
+ $scope.mailList = CRM.crmMailing.civiMails;
+
+ $scope.tab_val = 0;
+ $scope.max_tab = 0;
+ $scope.campaign_clicked = function () {
+ if ($scope.max_tab >= 0) {
+ $scope.tab_val = 0;
+ }
+ };
+ $scope.compose_clicked = function () {
+ if ($scope.max_tab >= 1) {
+ $scope.tab_val = 1;
+ }
+ };
+ $scope.rec_clicked = function () {
+ if ($scope.max_tab >= 2) {
+ $scope.tab_val = 2;
+ }
+ };
+ $scope.preview_clicked = function () {
+ if ($scope.max_tab >= 3) {
+ $scope.tab_val = 3;
+ }
+ };
+ $scope.templates =
+ [
+ { name: 'Subject Lines', url: partialUrl('subject_lines.html')},
+ { name: 'From Name', url: partialUrl('from_name.html')},
+ {name: 'Two different Emails', url: partialUrl('two_emails.html')}
+ ];
+ $scope.template = $scope.templates[0];
+
+ $scope.slide_value = 0;
+
+ $scope.setifyes = function (val) {
+ if (val == 1) {
+ $scope.ifyes = true;
+ }
+ else {
+ $scope.ifyes = false;
+ }
+ };
+
+ $scope.send_date = "01/01/2000";
+
+ $scope.dt = "";
+
+ $scope.mailA = {};
+
+ $scope.mailB = {};
+ $scope.save = function (dat) {
+
+ var result = crmApi('Mailing', 'create', dat, true);
+ console.log("Ac " + result);
+ };
+
+ $scope.init = function (par) {
+
+ $scope.whatnext = par.toString()
+ };
+
+ $scope.setdate = function (par) {
+ console.log("called")
+ console.log("av " + par)
+ $scope.send_date = par;
+ $scope.dt = par;
+ $scope.apply();
+ };
+
+ $scope.scheddate = {};
+ $scope.scheddate.date = "6";
+ $scope.scheddate.time = "";
+ $scope.incGroup = [];
+ $scope.excGroup = [];
+
+
+ });
+
+ crmMailingAB.directive('nexttab', function () {
+ return {
+ // Restrict it to be an attribute in this case
+ restrict: 'A',
+
+ priority: 500,
+ // responsible for registering DOM listeners as well as updating the DOM
+ link: function (scope, element, attrs) {
+
+ $(element).parent().parent().parent().parent().tabs(scope.$eval(attrs.nexttab));
+ var myarr = new Array(1, 2, 3)
+ $(element).parent().parent().parent().parent().tabs({disabled: myarr});
+
+ $(element).on("click", function () {
+ scope.tab_val = scope.tab_val + 1;
+
+ scope.max_tab = Math.max(scope.tab_val, scope.max_tab);
+ var myArray1 = new Array();
+ for (var i = scope.max_tab + 1; i < 4; i++) {
+ myArray1.push(i);
+ }
+ $(element).parent().parent().parent().parent().parent().tabs("option", "disabled", myArray1);
+ $(element).parent().parent().parent().parent().parent().tabs("option", "active", scope.tab_val);
+ scope.$apply();
+ console.log("Adir");
+ });
+ }
+ };
+ });
+
+ crmMailingAB.directive('prevtab', function () {
+ return {
+ // Restrict it to be an attribute in this case
+ restrict: 'A',
+ priority: 500,
+ // responsible for registering DOM listeners as well as updating the DOM
+ link: function (scope, element, attrs) {
+
+
+ $(element).on("click", function () {
+ var temp = scope.tab_val - 1;
+ scope.tab_val = scope.tab_val - 1;
+
+ console.log(temp);
+ if (temp == 3) {
+
+ }
+ else {
+ $(element).parent().parent().parent().parent().parent().tabs("option", "active", temp);
+ }
+
+ scope.$apply();
+
+ });
+ }
+ };
+ });
+
+ crmMailingAB.directive('groupselect', function () {
+ return {
+ restrict: 'AE',
+ link: function (scope, element, attrs) {
+ function format(item) {
+ if (!item.id) {
+ // return `text` for optgroup
+ return item.text;
+ }
+ // return item template
+ var a = item.id.split(" ");
+ if (a[1] == "group" && a[2] == "include") {
+ return "<img src='../../sites/all/modules/civicrm/i/include.jpeg' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/group.png' height=12 width=12/>" + item.text;
+ }
+ if (a[1] == "group" && a[2] == "exclude") {
+ return "<img src='../../sites/all/modules/civicrm/i/Error.gif' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/group.png' height=12 width=12/>" + item.text;
+ }
+ if (a[1] == "mail" && a[2] == "include") {
+ return "<img src='../../sites/all/modules/civicrm/i/include.jpeg' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/EnvelopeIn.gif' height=12 width=12/>" + item.text;
+ }
+ if (a[1] == "mail" && a[2] == "exclude") {
+ return "<img src='../../sites/all/modules/civicrm/i/Error.gif' height=12 width=12/>" + " " + "<img src='../../sites/all/modules/civicrm/i/EnvelopeIn.gif' height=12 width=12/>" + item.text;
+ }
+ }
+
+ $(element).select2({
+ width: "400px",
+ placeholder: "Select the groups you wish to include",
+ formatResult: format,
+ formatSelection: format,
+ escapeMarkup: function (m) {
+ return m;
+ }
+ });
+
+ $(element).on('select2-selecting', function (e) {
+ var a = e.val.split(" ");
+ var l = a.length;
+ if (a[2] == "include") {
+ var str = "";
+ for (i = 3; i < l; i++) {
+ str += a[i];
+ str += " ";
+ }
+ scope.incGroup.push(str);
+ scope.$apply();
+ }
+
+ else {
+ var str = "";
+ for (i = 3; i < l; i++) {
+ str += a[i];
+ str += " ";
+ }
+
+ scope.excGroup.push(str);
+ scope.$apply();
+ }
+
+ });
+ $(element).on("select2-removed", function (e) {
+ if (e.val.split(" ")[2] == "exclude") {
+ var index = scope.excGroup.indexOf(e.val.split(" ")[3]);
+ scope.excGroup.splice(index, 1);
+ scope.$apply();
+ }
+ else {
+ var index = scope.incGroup.indexOf(e.val.split(" ")[3]);
+ scope.incGroup.splice(index, 1);
+ scope.$apply();
+ }
+ });
+ }
+ };
+
+ });
+
+ crmMailingAB.directive('sliderbar', function () {
+ return{
+ restrict: 'AE',
+ link: function (scope, element, attrs) {
+ $(element).slider({min: 1});
+ $(element).slider({
+ slide: function (event, ui) {
+ scope.slide_value = ui.value;
+ scope.$apply();
+ }
+ });
+ }
+ };
+ });
+
+ crmMailingAB.directive('tpmax', function () {
+ return {
+ restrict: 'E',
+ link: function (scope, element, attr) {
+ scope.$watch('automated', function (val) {
+ if (val == "Yes") {
+ $(element).dialog({
+ title: 'Automated A/B Testing',
+ width: 800,
+ height: 600,
+ closed: false,
+ cache: false,
+ modal: true
+ });
+ }
+ });
+
+ $(element).find("#closebutton").on("click", function () {
+ $(element).dialog("close");
+ });
+ }
+ };
+ });
+
+ crmMailingAB.directive('numbar', function () {
+ return{
+ restrict: 'AE',
+ link: function (scope, element, attrs) {
+ $(element).spinner({max: attrs.numbar, min: 0});
+ }
+ };
+ });
+
+ crmMailingAB.directive('datepick', function () {
+ return {
+
+
+ restrict: 'AE',
+ link: function (scope, element, attrs) {
+ $(element).datepicker({
+ dateFormat: "yy-mm-dd",
+ onSelect: function (date) {
+ $(".ui-datepicker a").removeAttr("href");
+
+ scope.scheddate.date = date.toString();
+ scope.$apply();
+ console.log(scope.scheddate.date);
+
+ }
+
+
+ });
+ }
+ };
+ });
+
+ crmMailingAB.directive('submitform', function () {
+ return {
+ restrict: 'A',
+ priority: 1000,
+ link: function (scope, element, attrs) {
+ $(element).on("click", function () {
+
+ console.log("clicked");
+ scope.save({
+ "sequential": 1,
+ "name": "Aditya Nambiar",
+ "subject": scope.mailA.subj,
+ "created_id": "2",
+ "from_email": scope.mailA.fromEmail,
+ "body_text": scope.mailA.body
+
+ });
+ console.log("Truth " + scope.whatnext)
+
+ if (scope.whatnext == "3") {
+ console.log("sdf");
+ scope.mailB.subj = scope.mailA.subj;
+ scope.mailB.body = scope.mailA.body;
+
+ }
+ else {
+ if (scope.whatnext == "2") {
+ scope.mailB.fromEmail = scope.mailA.fromEmail;
+ scope.mailB.body = scope.mailA.body;
+
+ }
+ }
+
+
+ scope.save({
+ "sequential": 1,
+ "name": "Aditya Nambiar",
+ "subject": scope.mailB.subj,
+ "created_id": "2",
+ "from_email": scope.mailB.fromEmail,
+ "body_text": scope.mailB.body
+
+ });
+
+ });
+ }
+ };
+
+ });
+
+ crmMailingAB.directive('nextbutton', function () {
+ return {
+ restrict: 'AE',
+ replace: 'true',
+ template: '<div class="crm-submit-buttons" id="campaignbutton">' +
+ '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >' +
+ '<input type="submit" value="Next" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>' +
+ '</div></div>'
+
+ };
+ });
+
+ crmMailingAB.directive('cancelbutton', function () {
+ return {
+ restrict: 'AE',
+ replace: 'true',
+ template: '<div class="crm-submit-buttons" id="campaignbutton">' +
+ '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >' +
+ '<input type="submit" value="Cancel" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" >' +
+ '</div></div>'
+
+ };
+ });
+
+ crmMailingAB.directive('prevbutton', function () {
+ return {
+ restrict: 'AE',
+ replace: 'true',
+ template: '<div class="crm-submit-buttons" >' +
+ '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >' +
+ '<input type="submit" value="Previous" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" prevtab={{tab_val}}>' +
+ '</div></div>'
+
+ };
+ });
})(angular, CRM.$, CRM._);
-
-
<div>
+ <div ui-jq="tabs" id="alltabs">
+ <ul>
- <div ui-jq="tabs" id="alltabs" >
- <ul>
-
- <li><a href="#tabs-1" ng-click="campaign_clicked()" >Campaign</a></li>
- <li><a href="#tabs-2" ng-click="compose_clicked()">Compose</a></li>
- <li><a href="#tabs-3" ng-click="rec_clicked()">Recipients and Winner Criteria</a> </li>
- <li><a href="#tabs-4" ng-click="preview_clicked()">Preview and Send</a></li>
- </ul>
+ <li><a href="#tabs-1" ng-click="campaign_clicked()">Campaign</a></li>
+ <li><a href="#tabs-2" ng-click="compose_clicked()">Compose</a></li>
+ <li><a href="#tabs-3" ng-click="rec_clicked()">Recipients and Winner Criteria</a></li>
+ <li><a href="#tabs-4" ng-click="preview_clicked()">Preview and Send</a></li>
+ </ul>
- <div id="tabs-1" >
+ <div id="tabs-1">
- <form name="myForm" >
+ <form name="myForm">
- <h3> What would you like to test ?</h3><br><br>
+ <h3> What would you like to test ?</h3><br><br>
-   <input type="radio" ng-model="template" ng-value="templates[0]"> Subject Lines <br/><br>
-   <input type="radio" ng-model="template" ng-value="templates[1]"> From Names <br/><br>
-   <input type="radio" ng-model="template" ng-value="templates[2]"> Two different Emails <br/><br>
-   <div style="position:relative; left:220px; top: 30px;" nextbutton></div> <div style="position:relative; left:300px; top:-1px;" cancelbutton></div>
+   <input type="radio" ng-model="template" ng-value="templates[0]"> Subject Lines <br/><br>
+   <input type="radio" ng-model="template" ng-value="templates[1]"> From Names <br/><br>
+   <input type="radio" ng-model="template" ng-value="templates[2]"> Two different Emails <br/><br>
+  
+ <div style="position:relative; left:220px; top: 30px;" nextbutton></div>
+ <div style="position:relative; left:300px; top:-1px;" cancelbutton></div>
- </form>
- </div>
-
- <div id="tabs-2" >
+ </form>
+ </div>
- <form>
- <div ng-include="template.url">
- </div>
- <div style="position:relative; left:200px; top:61px;" prevbutton></div>
- <div style="position:relative; left:300px; top: 30px;" nextbutton></div>
- <div style="position:relative; left:375px; top:-1px;"cancelbutton></div>
+ <div id="tabs-2">
- </form>
+ <form>
+ <div ng-include="template.url">
</div>
+ <div style="position:relative; left:200px; top:61px;" prevbutton></div>
+ <div style="position:relative; left:300px; top: 30px;" nextbutton></div>
+ <div style="position:relative; left:375px; top:-1px;" cancelbutton></div>
- <div id="tabs-3">
-
- <form name="impform" novalidate>
- <h3>Select the groups you would like to add</h3><br>
-
-
-  <br>
- <select multiple groupselect >
- <option id= "1" ng-repeat="grp in groups" value="{{grp.id}} group include {{grp.title}}" > {{grp.title}} </option>
- <option ng-repeat="grp in groups" value="{{grp.id}} group exclude {{grp.title}}" > {{grp.title}} </option>
- <option ng-repeat="ml in mailList" value="{{ml.id}} mail include {{ml.title}}" > {{ml.name}} </option>
- <option ng-repeat="ml in mailList" value="{{ml.id}} mail exclude {{ml.title}}" > {{ml.name}} </option>
- </select>
- <br> <br><br><br>
- {{incGroup}}<br>{{excGroup}}
-
- <h3>Select the size of your test group</h3><br>
-   Percentage Selected - {{slide_value}}%
-
- <div sliderbar id="trial" style="margin: 10px;"></div>
-
- <h3>How will the winner be decided</h3><br>
-   <input type="radio" ng-model="winner_criteria" value="Open" name="cri" required> Open <br/><br>
-   <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked" > Total Unique Clicks <br/><br>
-   <input type="radio" ng-model="winner_criteria" value="Total Clicks on a particular link" name="cri" > Total Clicks on a particular link <br/><br>
- <!-- Remove automated
- <h3>Do you want the A/B test to be automated </h3>
-  <input type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes  
-  <input type="radio" ng-model="automated" value="No" ng-click="setifyes(2)" name="auto" checked="checked"> No <br/><br>
-
- <tpmax ng-show="ifyes">
-
- <h3> Please enter the confidence level at which a decision can be made</h3>
-     <input type="text" style="height: 20px; width: 25px;" ng-model="conf" numbar=99 ><br><br>
- <div ng-show="conf==null || conf ==0 || conf>99" style="color: red;">  Please Enter a Valid Number</div>
-
- <h3>If the confidence level is not reached what do you want us to do?</h3>
-   <input type="radio" ng-model="ifnot" value="Inform me" name="ifnot"/> Inform me <br/><br>
-   <input type="radio" checked="checked" ng-model="ifnot" value="Send Version A" name="ifnot" /> Send Version A <br/><br>
-   <input type="radio" ng-model="ifnot" value="Send Version B" name="ifnot"/> Send Version B <br/><br>
-
+ </form>
+ </div>
- <div nextbutton></div>
+ <div id="tabs-3">
+
+ <form name="impform" novalidate>
+ <h3>Select the groups you would like to add</h3><br>
+
+
+  <br>
+ <select multiple groupselect>
+ <option id="1" ng-repeat="grp in groups" value="{{grp.id}} group include {{grp.title}}"> {{grp.title}}
+ </option>
+ <option ng-repeat="grp in groups" value="{{grp.id}} group exclude {{grp.title}}"> {{grp.title}}</option>
+ <option ng-repeat="ml in mailList" value="{{ml.id}} mail include {{ml.title}}"> {{ml.name}}</option>
+ <option ng-repeat="ml in mailList" value="{{ml.id}} mail exclude {{ml.title}}"> {{ml.name}}</option>
+ </select>
+ <br> <br><br><br>
+ {{incGroup}}<br>{{excGroup}}
+
+ <h3>Select the size of your test group</h3><br>
+   Percentage Selected - {{slide_value}}%
+
+ <div sliderbar id="trial" style="margin: 10px;"></div>
+
+ <h3>How will the winner be decided</h3><br>
+   <input type="radio" ng-model="winner_criteria" value="Open" name="cri" required> Open <br/><br>
+   <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked">
+ Total Unique Clicks <br/><br>
+   <input type="radio" ng-model="winner_criteria" value="Total Clicks on a particular link" name="cri"> Total
+ Clicks on a particular link <br/><br>
+ <!-- Remove automated
+ <h3>Do you want the A/B test to be automated </h3>
+  <input type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes  
+  <input type="radio" ng-model="automated" value="No" ng-click="setifyes(2)" name="auto" checked="checked"> No <br/><br>
+
+ <tpmax ng-show="ifyes">
+
+ <h3> Please enter the confidence level at which a decision can be made</h3>
+     <input type="text" style="height: 20px; width: 25px;" ng-model="conf" numbar=99 ><br><br>
+ <div ng-show="conf==null || conf ==0 || conf>99" style="color: red;">  Please Enter a Valid Number</div>
+
+ <h3>If the confidence level is not reached what do you want us to do?</h3>
+   <input type="radio" ng-model="ifnot" value="Inform me" name="ifnot"/> Inform me <br/><br>
+   <input type="radio" checked="checked" ng-model="ifnot" value="Send Version A" name="ifnot" /> Send Version A <br/><br>
+   <input type="radio" ng-model="ifnot" value="Send Version B" name="ifnot"/> Send Version B <br/><br>
+
+
+ <div nextbutton></div>
+
+ </tpmax>
+ -->
+ <h3>Declare the winner in how much time?</h3><br>
+   <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
+   <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
+   <input type="text" style="height: 20px; width: 15px;" ng-model="minutes" numbar=59 name="m"> Minutes
+ <div
+ ng-show="((days == null || days ==0 ) && (hours==null|| hours == 0 ) && (minutes==null || minutes ==0 )|| days>99 || minutes>59 || hours >23) "
+ style="color: red;">  Please a Valid Time
+ </div>
+ <br>
+ <br>
- </tpmax>
--->
- <h3>Declare the winner in how much time?</h3><br>
-   <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
-   <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
-   <input type="text" style="height: 20px; width: 15px;" ng-model="minutes" numbar=59 name="m"> Minutes
- <div ng-show="((days == null || days ==0 ) && (hours==null|| hours == 0 ) && (minutes==null || minutes ==0 )|| days>99 || minutes>59 || hours >23) " style="color: red;">  Please a Valid Time</div>
- <br>
- <br>
+ <div style="position:relative; left:200px; top:30px;" prevbutton></div>
+ <div style="position:relative; left:300px; top: 00px;" nextbutton></div>
+ <div style="position:relative; left:375px; top: -31px;" cancelbutton></div>
- <div style="position:relative; left:200px; top:30px;" prevbutton></div>
- <div style="position:relative; left:300px; top: 00px;" nextbutton></div>
- <div style="position:relative; left:375px; top: -31px;" cancelbutton></div>
+ </form>
+ </div>
- </form>
+ <div id="tabs-4">
+
+ <h3>Details</h3><br>
+ <table>
+ <tr>
+ <td>Test Criteria</td>
+ <td>{{template.name}}</td>
+ </tr>
+ <tr>
+ <td>Groups Included</td>
+ <td>{{incGroup}}</td>
+ </tr>
+ <tr>
+ <td>Groups Excluded</td>
+ <td>{{excGroup}}</td>
+ </tr>
+ <tr>
+ <td>Size of Test Group</td>
+ <td>{{slide_value}}</td>
+ </tr>
+ <tr>
+ <td>Winner Criteria</td>
+ <td>{{winner_criteria}}</td>
+ </tr>
+
+ <tr ng-show="automated=='Yes'">
+ <td>Minum Confidence Level</td>
+ <td>{{conf}}%</td>
+ </tr>
+ <tr ng-show="automated=='Yes'">
+ <td>If Level not Achieved</td>
+ <td>{{ifnot}}</td>
+ </tr>
+ <tr>
+ <td>Declare Winner in</td>
+ <td>{{days}} Days {{hours}} Hours {{minutes}} Minutes</td>
+ </tr>
+ </table>
+
+ <h3><a href="#">Preview Mailing</a></h3><br>
+
+ <h3>When to Start</h3><br>
+
+ <div>
+ <input type="radio" name="Start" ng-model="start" value="now"> Now  
+ <input type="radio" name="Start" ng-model="start" value="later"> Later
+
+     <input type="text" class="dateplugin" ng-show="start=='later'" ng-model="send_date" datepick>
+ </div>
+
+
+ <br><br>
+
+ <div>
+
+ <div style="position:relative; left:200px; top:60px;" prevbutton></div>
+ <div class="crm-submit-buttons" style="position:relative; left:295px; top: 30px;">
+ <div class="crm-button crm-button-type-upload crm-button_qf_Contact_upload_view">
+ <input type="submit" value="Submit & Send" id="campaignbutton _qf_Contact_upload_view-top"
+ class="btn btn-primary" nexttab={{tab_val}}>
+ </div>
</div>
+ <div style="position:relative; left:430px; top:-1px;" cancelbutton></div>
- <div id="tabs-4">
-
- <h3>Details</h3><br>
- <table>
- <tr>
- <td>Test Criteria</td>
- <td>{{template.name}}</td>
- </tr>
- <tr>
- <td>Groups Included</td>
- <td>{{incGroup}}</td>
- </tr>
- <tr>
- <td>Groups Excluded</td>
- <td>{{excGroup}}</td>
- </tr>
- <tr>
- <td>Size of Test Group</td>
- <td>{{slide_value}}</td>
- </tr>
- <tr>
- <td>Winner Criteria</td>
- <td>{{winner_criteria}}</td>
- </tr>
-
- <tr ng-show="automated=='Yes'">
- <td>Minum Confidence Level</td>
- <td>{{conf}}%</td>
- </tr>
- <tr ng-show="automated=='Yes'">
- <td>If Level not Achieved</td>
- <td>{{ifnot}}</td>
- </tr>
- <tr>
- <td>Declare Winner in</td>
- <td>{{days}} Days {{hours}} Hours {{minutes}} Minutes</td>
- </tr>
- </table>
-
- <h3><a href="#">Preview Mailing</a></h3><br>
-
- <h3>When to Start</h3><br>
- <div>
- <input type="radio" name="Start" ng-model="start" value="now"> Now  
- <input type="radio" name="Start" ng-model="start" value="later"> Later
-
-     <input type="text" class = "dateplugin" ng-show="start=='later'" ng-model="send_date" datepick>
- </div>
-
-
- <br><br>
- <div>
-
- <div style="position:relative; left:200px; top:60px;" prevbutton></div>
- <div class="crm-submit-buttons" style="position:relative; left:295px; top: 30px;" >
- <div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view" >
- <input type="submit" value="Submit & Send" id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>
- </div>
- </div>
- <div style="position:relative; left:430px; top:-1px;" cancelbutton></div>
-
- </div>
+ </div>
- </div>
</div>
+ </div>
</div>
\ No newline at end of file