From f9e08222e4678897b120345b1f301b34bb981180 Mon Sep 17 00:00:00 2001 From: aditya-nambiar Date: Sat, 26 Jul 2014 10:13:54 +0530 Subject: [PATCH] Content changes in compose tab --- js/angular-crmMailingAB.js | 35 ++ partials/abtesting/from_name.html | 78 +--- partials/abtesting/main.html | 34 +- partials/abtesting/report.html | 10 + partials/abtesting/subject_lines.html | 116 +---- partials/abtesting/two_emails.html | 615 ++++++++++---------------- 6 files changed, 338 insertions(+), 550 deletions(-) create mode 100644 partials/abtesting/report.html diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 4a3d2dc511..130bd4ad6e 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -121,6 +121,8 @@ $scope.scheddate={}; $scope.scheddate.date = "6"; $scope.scheddate.time = ""; + $scope.incGroup =[]; + $scope.excGroup=[]; }); @@ -212,6 +214,39 @@ 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(); + } + }); } }; diff --git a/partials/abtesting/from_name.html b/partials/abtesting/from_name.html index e6484d8d20..303da39367 100644 --- a/partials/abtesting/from_name.html +++ b/partials/abtesting/from_name.html @@ -58,10 +58,8 @@
- - +