From b2adbc1f2906e29fe90d387517c629032594ec0c Mon Sep 17 00:00:00 2001 From: aditya-nambiar Date: Tue, 15 Jul 2014 17:46:30 +0530 Subject: [PATCH] minor changes --- js/angular-crmMailingAB.js | 71 ++- partials/abtesting/attachments.html | 34 ++ partials/abtesting/composeonScreen.html | 1 + partials/abtesting/from_name.html | 287 +++++++++++- partials/abtesting/headerandFooter.html | 25 ++ partials/abtesting/main.html | 57 ++- partials/abtesting/subject_lines.html | 286 +++++++++++- partials/abtesting/trackandRespond.html | 98 +++++ partials/abtesting/two_emails.html | 553 +++++++++++++++++++++++- partials/abtesting/uploadContent.html | 17 + xml/schema/Mailing/MailingAB.xml | 2 +- 11 files changed, 1373 insertions(+), 58 deletions(-) create mode 100644 partials/abtesting/attachments.html create mode 100644 partials/abtesting/composeonScreen.html create mode 100644 partials/abtesting/headerandFooter.html create mode 100644 partials/abtesting/trackandRespond.html create mode 100644 partials/abtesting/uploadContent.html diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 8fd19d283f..89860a2840 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -7,8 +7,8 @@ var partialUrl = function(relPath) { //console.log(CRM.resourceUrls['civicrm']); - //return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath; - return '/drupal-7.28/sites/all/modules/civicrm/partials/abtesting/' + relPath; + return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath; + //return '/drupal-7.28/sites/all/modules/civicrm/partials/abtesting/' + relPath; }; @@ -95,6 +95,8 @@ $scope.send_date ="01/01/2000"; + $scope.dt=""; + $scope.mailA={}; $scope.mailB={}; @@ -107,7 +109,19 @@ $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 = ""; }); @@ -177,6 +191,30 @@ link: function(scope,element, attrs){ $(element).select2({width:"400px",placeholder: "Select the groups you wish to include"}); $(element).select2("data",groups) + 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 "" + " " + "" + item.text; + if(a[1]=="group" && a[2]=="exclude") + return "" + " " + "" + item.text; + if(a[1]=="mail" && a[2]=="include") + return "" + " " + "" + item.text; + if(a[1]=="mail" && a[2]=="exclude") + return "" + " " + "" + item.text; + } + + $(element).select2({ + width:"400px", + placeholder: "Select the groups you wish to include", + formatResult: format, + formatSelection: format, + escapeMarkup: function(m) { return m; } + }); } }; @@ -232,17 +270,22 @@ crmMailingAB.directive('datepick',function(){ return { - scope :{ - foo : '=send_date' - }, + + restrict: 'AE', link: function(scope,element,attrs){ $(element).datepicker({ + dateFormat: "yy-mm-dd", onSelect: function(date) { $(".ui-datepicker a").removeAttr("href"); - scope.foo =date; - console.log(date); + + scope.scheddate.date=date.toString(); + scope.$apply(); + console.log(scope.scheddate.date); + } + + }); } }; @@ -308,6 +351,18 @@ }; }); + crmMailingAB.directive('cancelbutton',function(){ + return { + restrict: 'AE', + replace:'true', + template:'
'+ + '
' + + ''+ + '
' + + }; + }); + crmMailingAB.directive('prevbutton',function(){ return { restrict: 'AE', diff --git a/partials/abtesting/attachments.html b/partials/abtesting/attachments.html new file mode 100644 index 0000000000..e9fb793e5c --- /dev/null +++ b/partials/abtesting/attachments.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + +
Attach Files + + + +
Attach Files + + + +
Attach Files + + + +
+ + \ No newline at end of file diff --git a/partials/abtesting/composeonScreen.html b/partials/abtesting/composeonScreen.html new file mode 100644 index 0000000000..32f95c0d12 --- /dev/null +++ b/partials/abtesting/composeonScreen.html @@ -0,0 +1 @@ +hi \ No newline at end of file diff --git a/partials/abtesting/from_name.html b/partials/abtesting/from_name.html index 90455b8181..e6484d8d20 100644 --- a/partials/abtesting/from_name.html +++ b/partials/abtesting/from_name.html @@ -1,20 +1,287 @@
-

-
+
+    
+    
+        
+        
+    
+    
+        
+        
+    
+    
+        
+        
+    
+    
+        
+        
+    
+    
+        
+    
+    
+        
+        
+    
+    
+        
+        
+        
+        
+        
+    
+    
+
From E-mail Address A + +
From E-mail Address B + +
Reply to E-mail Address + +
Mailing Subject + +
+ Mailing subject required. +
Use Template + +
I want toCompose on screenUpload Content
- From Email Address A:
- From Email Address B:
- Use Template :
- Mail Subject:
+
+ - + - + + + +
+   Save Template +
-
+ + + +
+ + + + + \ No newline at end of file diff --git a/partials/abtesting/headerandFooter.html b/partials/abtesting/headerandFooter.html new file mode 100644 index 0000000000..00bc81de35 --- /dev/null +++ b/partials/abtesting/headerandFooter.html @@ -0,0 +1,25 @@ + +
+ + + + + + + + + + +
Mailing Header + +
Mailing Footer + +
+ \ No newline at end of file diff --git a/partials/abtesting/main.html b/partials/abtesting/main.html index 69a416129d..0b2cbb2b31 100644 --- a/partials/abtesting/main.html +++ b/partials/abtesting/main.html @@ -2,7 +2,7 @@
- {{tab_val}} +
    @@ -21,7 +21,9 @@   Subject Lines

      From Names

      Two different Emails

    -  
    +  
    + +
@@ -30,7 +32,10 @@
-
+
+
+
+
@@ -38,9 +43,16 @@

Select the groups you would like to add


-  

+ + +  
+ +



Select the size of your test group


@@ -48,11 +60,11 @@
-

How will the winner be decided


+

How will the winner be decided


  Open

  Total Unique Clicks

  Total Clicks on a particular link

- +

Declare the winner in how much time?


  Days   Hours @@ -82,7 +94,9 @@
-
+
+
+
@@ -107,10 +121,7 @@ Winner Criteria {{winner_criteria}} - - Automated - {{automated}} - + Minum Confidence Level {{conf}}% @@ -132,14 +143,22 @@ Now   Later -     +     + +

-
-
- -
+4 +
+
+
+ +
+
+
+ + diff --git a/partials/abtesting/subject_lines.html b/partials/abtesting/subject_lines.html index c44a656783..26f9b089dc 100644 --- a/partials/abtesting/subject_lines.html +++ b/partials/abtesting/subject_lines.html @@ -1,20 +1,286 @@
-

-
+
+    
+    
+        
+        
+    
 
-        From Email Address: 
- Use Template :
- Mail Subject A:
- Mail Subject B:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
From E-mail Address + +
Reply to E-mail Address + +
Mailing Subject A + +
Mailing Subject B + +
+ Mailing subject required. +
Use Template + +
I want toCompose on screenUpload Content
- +
+ - + -
+ + + +
+   Save Template +
+ + + + +
+ + + + + \ No newline at end of file diff --git a/partials/abtesting/trackandRespond.html b/partials/abtesting/trackandRespond.html new file mode 100644 index 0000000000..844eb09d61 --- /dev/null +++ b/partials/abtesting/trackandRespond.html @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Tracking

+
+   Track Click Throughs +
+
+ Track the number of times recipients click each link in this mailing. NOTE: When this feature is enabled, all links in the message body will be automaticallly re-written to route through your CiviCRM server prior to redirecting to the target page. +
+
+   Track Opens +
+
+ Track the number of times recipients open this mailing in their email software. +
+
+

Responding

+
+   Track Replies +
+
+ Recipients' replies are sent to a CiviMail specific address instead of the sender's address so they can be stored within CiviCRM. +
+
+   Forward Replies +
+
+ If a recipient replies to this mailing, forward the reply to the FROM Email address specified for the mailing. +
+
+   Auto-Respond to Replies     + +
+
+ If a recipient replies to this mailing, send an automated reply using the selected message. +
+
+

Online Publication

+
+ + + + + + +
Mailing Visibility + +
\ No newline at end of file diff --git a/partials/abtesting/two_emails.html b/partials/abtesting/two_emails.html index c5252d4322..b0c20c2f0e 100644 --- a/partials/abtesting/two_emails.html +++ b/partials/abtesting/two_emails.html @@ -8,26 +8,559 @@
- From Email Address :
- Use Template :
- Mail Subject:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
From E-mail Address + +
Reply to E-mail Address + +
Mailing Subject + +
+ Mailing subject required. +
Use Template + +
I want toCompose on screenUpload Content
- +
+ + + + + + +
+   Save Template +
+ + + + +
+ + + + +
- From Email Address :
- Use Template :
- Mail Subject:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
From E-mail Address + +
Reply to E-mail Address + +
Mailing Subject + +
+ Mailing subject required. +
Use Template + +
I want toCompose on screenUpload Content
+ +
+ + + + +
+   Save Template +
+ + + +
+ + + + + diff --git a/partials/abtesting/uploadContent.html b/partials/abtesting/uploadContent.html new file mode 100644 index 0000000000..0993f2c3ec --- /dev/null +++ b/partials/abtesting/uploadContent.html @@ -0,0 +1,17 @@ + + + + + + + + + + +
Upload TEXT Message + +
Upload HTML Message + +
+ + \ No newline at end of file diff --git a/xml/schema/Mailing/MailingAB.xml b/xml/schema/Mailing/MailingAB.xml index de42d4ee76..71f4ec31cc 100644 --- a/xml/schema/Mailing/MailingAB.xml +++ b/xml/schema/Mailing/MailingAB.xml @@ -3,7 +3,7 @@ CRM/MailingMailing - civicrm_abtesting + civicrm_mailing_abtestingStores information about abtestingtrue -- 2.25.1