From 08346fd9ae64a607101c6081b5002f6bbff308b3 Mon Sep 17 00:00:00 2001 From: aditya-nambiar Date: Sun, 15 Jun 2014 14:10:44 -0400 Subject: [PATCH] modal window implemented --- js/angular-crmMailingAB.js | 69 ++++++++++++++++++++++++------ partials/abtesting/helloworld.html | 22 ++++++++-- partials/abtesting/modal.html | 14 +++++- 3 files changed, 89 insertions(+), 16 deletions(-) diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index cb86d3516c..e554ead476 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -75,7 +75,21 @@ $scope.slide_value = 0; + $scope.$watch("automated", function() { + console.log("Smsdd"); + + }); + + $scope.setifyes= function(val){ + if(val ==1) { + $scope.ifyes = true; + } + else + $scope.ifyes=false; + }; + + $scope.closebox="open"; }); @@ -137,16 +151,19 @@ } }); + } }; }); - crmMailingAB.directive('modal_win',function(){ + + + crmMailingAB.directive('tpmax',function(){ return { - restrict: 'AE', + restrict: 'E', @@ -154,32 +171,60 @@ - scope.$watch("automated", function() { - alert("cgh"); - console.log("Sd"); + scope.$watch('automated', function(val) { + if(val=="yes") { + console.log("yo"); + + $(element).dialog({ + title: 'Automated A/B Testing', + width: 800, + height: 600, + closed: false, + cache: false, + modal: true + + }); + + + + + + } }); + $(element).find("#closebutton").on("click",function(){ + console.log("you can do it"); + $(element).dialog("close"); + + }); + + + + } }; + + }); - crmMailingAB.directive('num_select',function(){ - return { + crmMailingAB.directive('numbar',function(){ + return{ - restrict: 'AE', + restrict: 'AE', - link: function(scope,element,attr){ + link: function(scope,element, attrs){ - $(element).spinner(); - } + $(element).spinner({max:attrs.numbar,min:0}); - }; + } + + }; }); diff --git a/partials/abtesting/helloworld.html b/partials/abtesting/helloworld.html index 7b775cc9e5..7f9deec478 100644 --- a/partials/abtesting/helloworld.html +++ b/partials/abtesting/helloworld.html @@ -70,14 +70,30 @@   Total Clicks on a particular link

Do you want the A/B test to be automated

-  Yes   -   No

+  Yes   +   No

+ +

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

+    

-

Declare the winner in how much time?

+

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 +
+

diff --git a/partials/abtesting/modal.html b/partials/abtesting/modal.html index ca824545b3..94459be1cd 100644 --- a/partials/abtesting/modal.html +++ b/partials/abtesting/modal.html @@ -1,11 +1,23 @@
+ + + +

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

-
+  

+ +
+ + {{4+6}} + + dfsf: {{adi}}

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

  Inform me

  Send Version A

  Send Version B

+
+
\ No newline at end of file -- 2.25.1