$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";
});
}
});
+
}
};
});
- crmMailingAB.directive('modal_win',function(){
+
+
+ crmMailingAB.directive('tpmax',function(){
return {
- restrict: 'AE',
+ restrict: 'E',
- 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});
- };
+ }
+
+ };
});
  <input type="radio" ng-model="winner_criteria" value="Total Clicks on a particular link"> Total Clicks on a particular link <br/><br>
<h3 style="text-decoration: underline;">Do you want the A/B test to be automated </h3>
-  <input modal_win type="radio" ng-model="automated" value="yes" >Yes  
-  <input type="radio" ng-model="automated" value="no"> No <br/><br>
+  <input type="radio" ng-model="automated" value="yes" ng-click="setifyes(1)" >Yes  
+  <input type="radio" ng-model="automated" value="no" ng-click="setifyes(2)"> No <br/><br>
+ <tpmax ng-show="ifyes">
+ <h3> Please enter the confidence level at which a decision can be made</h3>
+     <input type="text" style="height: 20px; width: 25px;" ng-modal="confidence" numbar=99><br><br>
- <h3 style="text-decoration: underline;">Declare the winner in how much time?</h3>
+ <h3>If the confidence level is not reached what do you want us to do?</h3>
+   <input type="radio" ng-model="ifnot" value="Open"> Inform me <br/><br>
+   <input type="radio" ng-model="ifnot" value="Total Unique Clicks"> Send Version A <br/><br>
+   <input type="radio" ng-model="ifnot" value="Total Clicks on a particular link"> Send Version B <br/><br>
+ <button id="closebutton" style="position: relative;left:200px;">Save & Close</button>
+
+ </tpmax>
+
+ <h3 style="text-decoration: underline;">Declare the winner in how much time?</h3><br>
+   <input type="text" style="height: 20px; width: 15px;" numbar=7> Days
+   <input type="text" style="height: 20px; width: 15px;" numbar=23> Hours
+   <input type="text" style="height: 20px; width: 15px;" numbar=59> Minutes
+ <br>
+ <br>
<button value=">> Compose" id="campaignbutton" nexttab={{adi}} >Next</button> <br>
<div>
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+ <meta http-equiv="Pragma" content="no-cache" />
+ <meta http-equiv="Expires" content="0" />
+ <form >
<h3> Please enter the confidence level at which a decision can be made</h3>
- <div num_select></div>
+   <input type="text" style="height: 20px; width: 15px;" ng-modal="confidence" numbar><br><br>
+
+ <div sliderbar id="trial" style="margin: 10px;"></div>
+
+ {{4+6}}
+
+ dfsf: {{adi}}
<h3>If the confidence level is not reached what do you want us to do?</h3>
  <input type="radio" ng-model="ifnot" value="Open"> Inform me <br/><br>
  <input type="radio" ng-model="ifnot" value="Total Unique Clicks"> Send Version A <br/><br>
  <input type="radio" ng-model="ifnot" value="Total Clicks on a particular link"> Send Version B <br/><br>
+ </form>
+
</div>
\ No newline at end of file