From fbbff1a05945ae99f2ece1d4b4d8fe6480915f23 Mon Sep 17 00:00:00 2001 From: aditya-nambiar Date: Sun, 27 Jul 2014 19:22:48 +0530 Subject: [PATCH] Listing.html stage 1 --- js/angular-crmMailingAB.js | 29 ++++++++++++++++++++--------- partials/abtesting/list.html | 35 ++++++++++++++++++++--------------- partials/abtesting/main.html | 9 +++++---- 3 files changed, 45 insertions(+), 28 deletions(-) diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index a26f6d59e0..3c0b80434c 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -53,7 +53,9 @@ // Add a new record by name. // Ex: crmMailingAB.controller('ListingCtrl', function ($scope, crmApi) { - $scope.mailList = CRM.crmMailing.civiMails; + $scope.abmailList = CRM.crmMailing.mailingabNames; + console.log($scope.abmailList); + }) crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi,selectedABTest) { @@ -100,6 +102,22 @@ $scope.mailB = {}; } + $scope.templates = + [ + { name: 'Subject Lines', url: partialUrl('subject_lines.html'),val: 1}, + { 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{ + console.log("adit "+$scope.currentABTest.testing_criteria_id); + + $scope.template=$scope.templates[$scope.currentABTest.testing_criteria_id-1]; + console.log($scope.template.val); + } mltokens = CRM.crmMailing.mailTokens; @@ -127,13 +145,6 @@ $scope.tab_val = 3; } }; - $scope.templates = - [ - { name: 'Subject Lines', url: partialUrl('subject_lines.html'),val: 1}, - { name: 'From Name', url: partialUrl('from_name.html'),val:2}, - {name: 'Two different Emails', url: partialUrl('two_emails.html'),val:3} - ]; - $scope.template = $scope.templates[0]; $scope.slide_value = 0; @@ -537,7 +548,7 @@ return{ restrict: 'AE', link: function (scope, element, attrs) { - if(typeof scope.currentABTest.group_percentage != undefined){ + if(typeof scope.currentABTest.group_percentage != 'undefined'){ console.log("Yay"); $(element).slider({value:scope.currentABTest.group_percentage}); } diff --git a/partials/abtesting/list.html b/partials/abtesting/list.html index c964872896..cacfe10cab 100644 --- a/partials/abtesting/list.html +++ b/partials/abtesting/list.html @@ -1,26 +1,31 @@ +
- All partially completed and completed mail are listed here + A Case Type describes a group of related tasks, interactions, or processes.
- +
- - - - - + + + + - - - - - + + + + + +
Mailing NameCreated ByCreated DateSent ByTitleIdProgress
{{mailab.id}}Edit +
{{ab.id}}{{ab.id}}{{ab.id}}Edit
- + \ No newline at end of file diff --git a/partials/abtesting/main.html b/partials/abtesting/main.html index 2a7b9346cc..a612dd3a04 100644 --- a/partials/abtesting/main.html +++ b/partials/abtesting/main.html @@ -1,5 +1,6 @@
- {{tab_val}} + {{tab_val}}
+
    @@ -15,9 +16,9 @@

    What would you like to test ?



    -   Subject Lines

    -   From Names

    -   Two different Emails

    +   Subject Lines

    +   From Names

    +   Two different Emails

     
    -- 2.25.1