From 5cd34d46e1cc2165a390659b624ba705303a7230 Mon Sep 17 00:00:00 2001 From: aditya-nambiar Date: Sun, 27 Jul 2014 19:37:52 +0530 Subject: [PATCH] Listing.html stage 2 --- js/angular-crmMailingAB.js | 16 +++++++++------- partials/abtesting/main.html | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 3c0b80434c..312760ad18 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -39,6 +39,7 @@ return crmApi('MailingAB', 'getsingle', {id: $route.current.params.id}); } else { + console.log("created"); //created_id has been set to my id. Does not save without created_id. Needs to made generic based on the user return { just_created:"1" }; @@ -108,15 +109,16 @@ { name: 'From Name', url: partialUrl('from_name.html'),val:2}, {name: 'Two different Emails', url: partialUrl('two_emails.html'),val:3} ]; - if(typeof $scope.template == 'undefined'){ - console.log("adi"); - $scope.template = $scope.templates[0]; - } - else{ + if($scope.currentABTest.just_created != 1){ + console.log("adit "+$scope.currentABTest.testing_criteria_id); $scope.template=$scope.templates[$scope.currentABTest.testing_criteria_id-1]; console.log($scope.template.val); + } + else{ + console.log("adi"); + $scope.template = $scope.templates[0]; } mltokens = CRM.crmMailing.mailTokens; @@ -781,9 +783,9 @@ dateFormat: "yy-mm-dd", onSelect: function(date) { $(".ui-datepicker a").removeAttr("href"); - scope.scheddate.date=date.toString(); + scope.currentABTest.date=date.toString(); scope.$apply(); - console.log(scope.scheddate.date); + console.log(scope.currentABTest.date); } }); } diff --git a/partials/abtesting/main.html b/partials/abtesting/main.html index a612dd3a04..9018d52e7e 100644 --- a/partials/abtesting/main.html +++ b/partials/abtesting/main.html @@ -1,6 +1,6 @@
{{tab_val}}
- +
    -- 2.25.1