modal window implemented
authoraditya-nambiar <aditya.nambiar007@gmail.com>
Sun, 15 Jun 2014 18:10:44 +0000 (14:10 -0400)
committeraditya-nambiar <aditya.nambiar007@gmail.com>
Sat, 26 Jul 2014 04:48:15 +0000 (10:18 +0530)
js/angular-crmMailingAB.js
partials/abtesting/helloworld.html
partials/abtesting/modal.html

index cb86d3516c8a6f5a0c8a736f837453ef472254af..e554ead476376e95c75b85d1f5782c143a9c29b6 100644 (file)
 
         $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});
 
 
-       };
 
+            }
+
+        };
 
     });
 
index 7b775cc9e5bce3757374396d46d505987106e9d0..7f9deec478464ec14fd2be72c24adfee3081b42c 100644 (file)
                     &nbsp <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>
-                    &nbsp<input modal_win type="radio" ng-model="automated" value="yes" >Yes &nbsp
-                    &nbsp<input type="radio" ng-model="automated" value="no"> No <br/><br>
+                    &nbsp<input  type="radio" ng-model="automated" value="yes" ng-click="setifyes(1)" >Yes &nbsp
+                    &nbsp<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>
+                        &nbsp &nbsp <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>
+                        &nbsp <input type="radio" ng-model="ifnot" value="Open"> Inform me  <br/><br>
+                        &nbsp <input type="radio" ng-model="ifnot" value="Total Unique Clicks"> Send Version A <br/><br>
+                        &nbsp <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>
+                    &nbsp <input type="text" style="height: 20px; width: 15px;" numbar=7> Days
+                    &nbsp <input type="text" style="height: 20px; width: 15px;" numbar=23> Hours
+                    &nbsp <input type="text" style="height: 20px; width: 15px;" numbar=59> Minutes
+                    <br>
+                    <br>
 
 
                 <button  value=">> Compose"   id="campaignbutton" nexttab={{adi}} >Next</button> <br>
index ca824545b3ab1195be23a1793a9c259731c53181..94459be1cdf49499a72ee073e4bbd5b609dd2a2e 100644 (file)
@@ -1,11 +1,23 @@
 <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>
+   &nbsp <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>
     &nbsp <input type="radio" ng-model="ifnot" value="Open"> Inform me  <br/><br>
     &nbsp <input type="radio" ng-model="ifnot" value="Total Unique Clicks"> Send Version A <br/><br>
     &nbsp <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