From 57194571216ee0074cbdc928bcd84f175aee9abb Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 18 Feb 2015 10:15:27 -0800 Subject: [PATCH] CRM-15979 - crmMailingAB - Merge the compose and report URLs --- js/angular-crmMailingAB.js | 18 ++++++++---------- partials/crmMailingAB/edit.html | 8 ++++---- partials/crmMailingAB/list.html | 2 +- partials/crmMailingAB/report.html | 7 +------ 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 0cacb6c974..9379970845 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -172,20 +172,18 @@ }); }); - angular.module('crmMailingAB').controller('CrmMailingABReportCtrl', function ($scope, abtest, crmApi, crmMailingPreviewMgr, dialogService) { + angular.module('crmMailingAB').controller('CrmMailingABReportCtrl', function ($scope, crmApi, crmMailingPreviewMgr, dialogService) { var ts = $scope.ts = CRM.ts(null); - $scope.abtest = abtest; - $scope.stats = {}; - crmApi('Mailing', 'stats', {mailing_id: abtest.ab.mailing_id_a}).then(function(data){ - $scope.stats.a = data.values[abtest.ab.mailing_id_a]; + crmApi('Mailing', 'stats', {mailing_id: $scope.abtest.ab.mailing_id_a}).then(function(data){ + $scope.stats.a = data.values[$scope.abtest.ab.mailing_id_a]; }); - crmApi('Mailing', 'stats', {mailing_id: abtest.ab.mailing_id_b}).then(function(data){ - $scope.stats.b = data.values[abtest.ab.mailing_id_b]; + crmApi('Mailing', 'stats', {mailing_id: $scope.abtest.ab.mailing_id_b}).then(function(data){ + $scope.stats.b = data.values[$scope.abtest.ab.mailing_id_b]; }); - crmApi('Mailing', 'stats', {mailing_id: abtest.ab.mailing_id_c}).then(function(data){ - $scope.stats.c = data.values[abtest.ab.mailing_id_c]; + crmApi('Mailing', 'stats', {mailing_id: $scope.abtest.ab.mailing_id_c}).then(function(data){ + $scope.stats.c = data.values[$scope.abtest.ab.mailing_id_c]; }); $scope.previewMailing = function previewMailing(mailingName, mode) { @@ -193,7 +191,7 @@ }; $scope.selectWinner = function selectWinner(mailingName) { var model = { - abtest: abtest, + abtest: $scope.abtest, mailingName: mailingName }; var options = CRM.utils.adjustDialogDefaults({ diff --git a/partials/crmMailingAB/edit.html b/partials/crmMailingAB/edit.html index aafb88fb6c..74c1fc3b95 100644 --- a/partials/crmMailingAB/edit.html +++ b/partials/crmMailingAB/edit.html @@ -9,12 +9,12 @@ individual field from B). At the end of the composition process, the controller's "sync" operation will merge shared settings from "A" into "B". --> -
- {{ts('This mailing has been submitted.')}} +
+
-
-
+ +
{{mailingAB.created_date}} {{ts('Continue')}} - {{ts('Results')}} + {{ts('Results')}} diff --git a/partials/crmMailingAB/report.html b/partials/crmMailingAB/report.html index 2b70a987a8..4913630e07 100644 --- a/partials/crmMailingAB/report.html +++ b/partials/crmMailingAB/report.html @@ -1,9 +1,4 @@ -
-
{{abtest.ab|json}}
-
{{abtest.mailings|json}}
-
- -
+
-- 2.25.1