3rd stage
authoraditya-nambiar <aditya.nambiar007@gmail.com>
Sun, 15 Jun 2014 04:50:34 +0000 (00:50 -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 [new file with mode: 0644]
partials/abtesting/modal.html [new file with mode: 0644]
partials/abtesting/subject_lines.html

index c1b21625ad5f7ff71ccf86e73ac770e0065f83e6..cb86d3516c8a6f5a0c8a736f837453ef472254af 100644 (file)
@@ -73,6 +73,8 @@
                 {name:'2emails',url: partialUrl('two_emails.html')} ];
         $scope.template = $scope.templates[0];
 
+        $scope.slide_value = 0;
+
 
 
     });
         };
     });
 
+    crmMailingAB.directive('groupselect',function(){
+       return {
+
+           restrict : 'AE',
+
+           link: function(scope,element, attrs){
+
+              $(document).ready(function() { $(element).select2({width:"400px",placeholder: "Select the groups you wish to include"});
+
+              });
+
+           }
+       };
+
+    });
+
+    crmMailingAB.directive('sliderbar',function(){
+       return{
+
+           restrict: 'AE',
+
+           link: function(scope,element, attrs){
+
+               $(element).slider();
+               $(element).slider({
+                   slide: function( event, ui ) {
+                       scope.slide_value = ui.value;
+                       scope.$apply();
+
+                   }
+               });
+           }
+
+       };
+
+    });
+
+    crmMailingAB.directive('modal_win',function(){
+        return {
+
+            restrict: 'AE',
+
+
+
+            link: function(scope,element,attr){
+
+
+
+                scope.$watch("automated", function() {
+                    alert("cgh");
+                    console.log("Sd");
+
+                });
+
+
+            }
+
+        };
+
+    });
+
+    crmMailingAB.directive('num_select',function(){
+       return {
+
+           restrict: 'AE',
+
+           link: function(scope,element,attr){
+
+               $(element).spinner();
+           }
+
+
+       };
+
+
+    });
+
+
+
+
+
 
 
 
diff --git a/partials/abtesting/helloworld.html b/partials/abtesting/helloworld.html
new file mode 100644 (file)
index 0000000..7b775cc
--- /dev/null
@@ -0,0 +1,95 @@
+
+
+
+<div>
+
+
+    <div ui-jq="tabs" id="alltabs" >
+
+        <ul>
+
+            <li><a href="#tabs-1" ng-click="campaign_clicked()" >Campaign</a></li>
+            <li><a href="#tabs-2" ng-click="compose_clicked()">Compose</a></li>
+            <li><a href="#tabs-3" ng-click="rec_clicked()">Recipients and Winner Criteria</a> </li>
+            <li><a href="#tabs-4" ng-click="preview_clicked()">Preview and Send</a></li>
+        </ul>
+
+
+        <div  id="tabs-1" >
+
+            <form name="myForm" >
+
+                <h3 style ="text-decoration:underline"> What would you like to test ?</h3><br><br>
+
+                &nbsp <input type="radio" ng-model="template" ng-value="templates[0]">  Subject Lines <br/><br>
+                &nbsp <input type="radio" ng-model="template" ng-value="templates[1]"> From Names <br/><br>
+                &nbsp <input type="radio" ng-model="template" ng-value="templates[2]"> Two different Emails <br/><br>
+                &nbsp <input type="submit" value=">> Compose"    id="campaignbutton" nexttab={{adi}} > <br>
+            </form>
+        </div>
+
+        <div id="tabs-2"  >
+
+            <form>
+            <div  ng-include="template.url">
+
+            </div>
+
+
+
+
+            <button  id="campaignbutton" nexttab={{adi}} >Done</button><br>
+
+            </form>
+
+        </div>
+
+        <div id="tabs-3">
+
+                <form>
+                    <h3 style="text-decoration: underline;">Select the groups you would like to add</h3><br>
+
+
+                    &nbsp<select multiple id="e1" groupselect>
+                        <option value="AL">Mumbai</option>
+                        <option value="AL">Delhi</option>
+                        <option value="AL">Madras</option>
+                        <option value="AL">Kanpur</option>
+                        <option value="WY">Kharagpur</option>
+                    </select><br><br>
+
+                    <h3 style="text-decoration: underline;">Select the size of your test group</h3><br>
+
+                    &nbsp Percentage Selected - {{slide_value}}%
+
+                    <div sliderbar id="trial" style="margin: 10px;"></div>
+
+                    <h3 style="text-decoration: underline;">How will the winner be decided</h3><br>
+                    &nbsp <input type="radio" ng-model="winner_criteria" value="Open"> Open <br/><br>
+                    &nbsp <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks"> Total Unique Clicks <br/><br>
+                    &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>
+
+
+
+                    <h3 style="text-decoration: underline;">Declare the winner in how much time?</h3>
+
+
+
+
+                <button  value=">> Compose"   id="campaignbutton" nexttab={{adi}} >Next</button> <br>
+                </form>
+        </div>
+
+        <div id="tabs-4">dsfdfbdfg
+
+
+        </div>
+    </div>
+
+
+
+</div>
\ No newline at end of file
diff --git a/partials/abtesting/modal.html b/partials/abtesting/modal.html
new file mode 100644 (file)
index 0000000..ca82454
--- /dev/null
@@ -0,0 +1,11 @@
+<div>
+
+    <h3> Please enter the confidence level at which a decision can be made</h3>
+    <div num_select></div>
+
+    <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>
+
+</div>
\ No newline at end of file
index 588fb5374587b6c1039b8b8286731ced30502041..4522eb29231f5d4383748fcf0e6479b25ea17ec3 100644 (file)
@@ -7,7 +7,7 @@
         From Email Address: <input type="text"><br>
         Use Template : <input type="text"><br>
         Mail Subject A: <input type="text"><br>
-        Mail Subject B: <input type="text"><br><
+        Mail Subject B: <input type="text"><br>
 
         <textarea rows="4" cols="50">