From ec57ad65428070963f31a84ece774166a9989164 Mon Sep 17 00:00:00 2001 From: aditya-nambiar Date: Sat, 21 Jun 2014 14:55:54 -0400 Subject: [PATCH] Visual Changes --- css/angular-crmMailingAB.css | 6 -- js/angular-crmMailingAB.js | 59 ++++++++++++++++-- partials/abtesting/helloworld.html | 96 ++++++++++++++++-------------- partials/abtesting/next.html | 3 + 4 files changed, 107 insertions(+), 57 deletions(-) create mode 100644 partials/abtesting/next.html diff --git a/css/angular-crmMailingAB.css b/css/angular-crmMailingAB.css index 4fbf9a6a43..8b13789179 100644 --- a/css/angular-crmMailingAB.css +++ b/css/angular-crmMailingAB.css @@ -1,7 +1 @@ -#campaignbutton{ - - - position: relative; - left: 250px; -} diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 5e8afbb8f0..ea0ced998b 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -88,7 +88,7 @@ $scope.ifyes=false; }; - $scope.send_date ="10/4/2004"; + $scope.send_date ="01/01/2000"; $scope.mailA={}; @@ -115,9 +115,9 @@ // responsible for registering DOM listeners as well as updating the DOM link: function(scope, element, attrs) { - $(element).parent().parent().parent().tabs(scope.$eval(attrs.nexttab)); + $(element).parent().parent().parent().parent().tabs(scope.$eval(attrs.nexttab)); var myarr = new Array(1,2,3) - $(element).parent().parent().parent().tabs({disabled:myarr}); + $(element).parent().parent().parent().parent().tabs({disabled:myarr}); $(element).on("click",function() { scope.tab_val=scope.tab_val +1; @@ -125,8 +125,28 @@ for ( var i = scope.tab_val+1; i < 4; i++ ) { myArray1.push(i); } - $(element).parent().parent().parent().tabs( "option", "disabled", myArray1 ); - $(element).parent().parent().parent().tabs({active:scope.tab_val}); + $(element).parent().parent().parent().parent().parent().tabs( "option", "disabled", myArray1 ); + $(element).parent().parent().parent().parent().parent().tabs({active:scope.tab_val}); + console.log("Adir"); + }); + } + }; + }); + + crmMailingAB.directive('prevtab', function() { + return { + // Restrict it to be an attribute in this case + restrict: 'A', + priority: 500, + // responsible for registering DOM listeners as well as updating the DOM + link: function(scope, element, attrs) { + + + + $(element).on("click",function() { + scope.tab_val=scope.tab_val -1; + + $(element).parent().parent().parent().parent().parent().tabs({active:scope.tab_val}); console.log("Adir"); }); } @@ -258,5 +278,32 @@ }); + crmMailingAB.directive('nextbutton',function(){ + return { + restrict: 'AE', + replace:'true', + template:'
'+ + '
' + + ''+ + '
' + + }; + }); + + crmMailingAB.directive('prevbutton',function(){ + return { + restrict: 'AE', + replace:'true', + template:'
'+ + '
' + + ''+ + '
' + + }; + }); + + + + +})(angular, CRM.$, CRM._); -})(angular, CRM.$, CRM._); \ No newline at end of file diff --git a/partials/abtesting/helloworld.html b/partials/abtesting/helloworld.html index 9b57e092ed..0d831e464c 100644 --- a/partials/abtesting/helloworld.html +++ b/partials/abtesting/helloworld.html @@ -12,11 +12,12 @@
-

What would you like to test ?



+

What would you like to test ?



+   Subject Lines

  From Names

  Two different Emails

-  
+  
@@ -25,64 +26,66 @@
- gghvjhkv -
+
-
-

Select the groups you would like to add


-  

-

You name is required.

+ +

Select the groups you would like to add


+  

+ + +

Select the size of your test group


+   Percentage Selected - {{slide_value}}% -

Select the size of your test group


-   Percentage Selected - {{slide_value}}% +
-
+

How will the winner be decided


+   Open

+   Total Unique Clicks

+   Total Clicks on a particular link

-

How will the winner be decided


-   Open

-   Total Unique Clicks

-   Total Clicks on a particular link

+

Do you want the A/B test to be automated

+  Yes   +   No

-

Do you want the A/B test to be automated

-  Yes   -   No

+ - +

Please enter the confidence level at which a decision can be made

+    

+
  Please Enter a Valid Number
-

Please enter the confidence level at which a decision can be made

-    

-
  Please Enter a Valid Number
+

If the confidence level is not reached what do you want us to do?

+   Inform me

+   Send Version A

+   Send Version B

-

If the confidence level is not reached what do you want us to do?

-   Inform me

-   Send Version A

-   Send Version B

- +
-
+
-

Declare the winner in how much time?


-   Days -   Hours -   Minutes -
  Please a Valid Time
-
-
+

Declare the winner in how much time?


+   Days +   Hours +   Minutes +
  Please a Valid Time
+
+
-
-
+ +
+ +
-

Details


+

Details


@@ -118,18 +121,21 @@
Test Criteria
-

Preview Mailing


+

Preview Mailing


-

When to Start


+

When to Start


Now   - Later + Later -     +    


+
+
+ +
-
\ No newline at end of file diff --git a/partials/abtesting/next.html b/partials/abtesting/next.html new file mode 100644 index 0000000000..21e84d0e18 --- /dev/null +++ b/partials/abtesting/next.html @@ -0,0 +1,3 @@ +
+
+
\ No newline at end of file -- 2.25.1