Visual Changes
authoraditya-nambiar <aditya.nambiar007@gmail.com>
Sat, 21 Jun 2014 18:55:54 +0000 (14:55 -0400)
committeraditya-nambiar <aditya.nambiar007@gmail.com>
Sat, 26 Jul 2014 04:48:16 +0000 (10:18 +0530)
css/angular-crmMailingAB.css
js/angular-crmMailingAB.js
partials/abtesting/helloworld.html
partials/abtesting/next.html [new file with mode: 0644]

index 4fbf9a6a43c7076202aa5281bf9d80b116a3642b..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1,7 +1 @@
 
-#campaignbutton{
-
-
-    position: relative;
-    left: 250px;
-}
index 5e8afbb8f09cf6b7fc19bcc1d0e21809ff4acc85..ea0ced998b90a17dd87554b23a6c5a5ad632d1f6 100644 (file)
@@ -88,7 +88,7 @@
             $scope.ifyes=false;
         };
 
-        $scope.send_date ="10/4/2004";
+        $scope.send_date ="01/01/2000";
 
         $scope.mailA={};
 
             // 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;
                     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");
                 });
             }
 
     });
 
+    crmMailingAB.directive('nextbutton',function(){
+        return {
+            restrict: 'AE',
+            replace:'true',
+            template:'<div class="crm-submit-buttons" id="campaignbutton">'+
+                '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >' +
+                '<input type="submit" value="Next"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>'+
+                '</div></div>'
+
+        };
+    });
+
+    crmMailingAB.directive('prevbutton',function(){
+        return {
+            restrict: 'AE',
+            replace:'true',
+            template:'<div class="crm-submit-buttons" >'+
+                '<div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >' +
+                '<input type="submit" value="Previous"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" prevtab={{tab_val}}>'+
+                '</div></div>'
+
+        };
+    });
+
+
+
+
+})(angular, CRM.$, CRM._);
 
-})(angular, CRM.$, CRM._);
\ No newline at end of file
index 9b57e092edded5affae4cd29f370af08c76b5081..0d831e464cf62ab1bc94c5b90fd570de18e43a49 100644 (file)
 
             <form name="myForm" >
 
-                <h3 style ="text-decoration:underline"> What would you like to test ?</h3><br><br>
+                <h3> 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>
+                &nbsp <div style="position:relative; left:250px;" nextbutton></div>
             </form>
         </div>
 
             <form>
             <div  ng-include="template.url">
             </div>
-                gghvjhkv
-            <button  id="campaignbutton" submitform={{whatnext}} nexttab={{adi}} >Done</button><br>
+                <div style="position:relative; left:200px; top:30px;" prevbutton></div><div style="position:relative; left:300px;"nextbutton></div>
             </form>
         </div>
 
         <div id="tabs-3">
 
-                <form name="impform" ng-submit="submitForm(userForm.$valid)" novalidate>
-                    <h3 style="text-decoration: underline;">Select the groups you would like to add</h3><br>
-                    &nbsp<select multiple  groupselect required name ="grps" required ng-model="groups_selected">
-                        <option ng-repeat="grp in groups" value={{grp.title}} >{{grp.title}}</option>
-                    </select><br><br>
-                    <p ng-show=" impform.grps.$pristine" >You name is required.</p>
+            <form name="impform"  novalidate>
+                <h3>Select the groups you would like to add</h3><br>
+                &nbsp<select multiple groupselect required name ="grps" required ng-model="groups_selected">
+                <option ng-repeat="grp in groups" value={{grp.title}} >{{grp.title}}</option>
+            </select><br><br>
+
+
+                <h3>Select the size of your test group</h3><br>
+                &nbsp Percentage Selected - {{slide_value}}%
 
-                    <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>
 
-                    <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" name="cri" required> Open <br/><br>
+                &nbsp <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked" > Total Unique Clicks <br/><br>
+                &nbsp <input type="radio" ng-model="winner_criteria" value="Total Clicks on a particular link" name="cri" > Total Clicks on a particular link <br/><br>
 
-                    <h3 style="text-decoration: underline;">How will the winner be decided</h3><br>
-                    &nbsp <input type="radio" ng-model="winner_criteria" value="Open" name="cri"  required> Open <br/><br>
-                    &nbsp <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked" > Total Unique Clicks <br/><br>
-                    &nbsp <input type="radio" ng-model="winner_criteria" value="Total Clicks on a particular link" name="cri" > Total Clicks on a particular link <br/><br>
+                <h3>Do you want the A/B test to be automated </h3>
+                &nbsp<input type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes &nbsp
+                &nbsp<input type="radio" ng-model="automated" value="No" ng-click="setifyes(2)" name="auto" checked="checked"> No <br/><br>
 
-                    <h3 style="text-decoration: underline;">Do you want the A/B test to be automated </h3>
-                    &nbsp<input  type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes &nbsp
-                    &nbsp<input type="radio" ng-model="automated" value="No" ng-click="setifyes(2)" name="auto" checked="checked"> No <br/><br>
+                <tpmax ng-show="ifyes">
 
-                    <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-model="conf" numbar=99 ><br><br>
+                    <div ng-show="conf==null || conf ==0 || conf>99" style="color: red;">&nbsp Please Enter a Valid Number</div>
 
-                        <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-model="conf" numbar=99 ><br><br>
-                        <div ng-show="conf==null || conf ==0 || conf>99"  style="color: red;">&nbsp Please Enter a Valid Number</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="Inform me" name="ifnot"/> Inform me <br/><br>
+                    &nbsp <input type="radio" checked="checked" ng-model="ifnot" value="Send Version A" name="ifnot" /> Send Version A <br/><br>
+                    &nbsp <input type="radio" ng-model="ifnot" value="Send Version B" name="ifnot"/> Send Version B <br/><br>
 
-                        <h3>If the confidence level is not reached what do you want us to do?</h3>
-                        &nbsp <input type="radio" ng-model="ifnot" value="Inform me" name="ifnot"/> Inform me  <br/><br>
-                        &nbsp <input type="radio" checked="checked" ng-model="ifnot" value="Send Version A" name="ifnot" /> Send Version A <br/><br>
-                        &nbsp <input type="radio" ng-model="ifnot" value="Send Version B" name="ifnot"/> Send Version B <br/><br>
 
-                        <button id="closebutton" style="position: relative;left:200px;">Save & Close</button>
+                    <div nextbutton></div>
 
-                    </tpmax>
+                </tpmax>
 
-                    <h3 style="text-decoration: underline;">Declare the winner in how much time?</h3><br>
-                    &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
-                    &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
-                    &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="minutes" numbar=59 name="m"> Minutes
-                    <div ng-show="((days == null || days ==0 ) && (hours==null|| hours == 0 ) && (minutes==null || minutes ==0 )|| days>99 || minutes>59 || hours >23) "  style="color: red;">&nbsp Please a Valid Time</div>
-                    <br>
-                    <br>
+                <h3>Declare the winner in how much time?</h3><br>
+                &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
+                &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
+                &nbsp <input type="text" style="height: 20px; width: 15px;" ng-model="minutes" numbar=59 name="m"> Minutes
+                <div ng-show="((days == null || days ==0 ) && (hours==null|| hours == 0 ) && (minutes==null || minutes ==0 )|| days>99 || minutes>59 || hours >23) " style="color: red;">&nbsp Please a Valid Time</div>
+                <br>
+                <br>
 
-                <button  type="submit" class="btn btn-primary" ng-disabled="((days == null || days ==0 ) && (hours==null|| hours == 0 ) && (minutes==null || minutes ==0 )|| days>99 || minutes>59 || hours >23)" value=">> Compose"   id="campaignbutton" nexttab={{adi}} >Next</button> <br>
-                </form>
+
+                <div style="position:relative; left:200px; top:30px;" prevbutton></div><div style="position:relative; left:300px;"nextbutton></div>
+
+            </form>
         </div>
 
         <div id="tabs-4">
 
-            <h3 style="text-decoration: underline;">Details</h3><br>
+            <h3>Details</h3><br>
             <table>
             <tr>
                 <td>Test Criteria</td>
             </tr>
             </table>
 
-            <h3 style="text-decoration: underline;"><a href="#">Preview Mailing</a></h3><br>
+            <h3><a href="#">Preview Mailing</a></h3><br>
 
-            <h3 style="text-decoration: underline;">When to Start</h3><br>
+            <h3>When to Start</h3><br>
             <div>
             <input type="radio" name="Start" ng-model="start" value="now"> Now &nbsp
-            <input type="radio" name="Start" ng-model="start" value="later"> Later
+            <input type="radio" name="Start"  ng-model="start" value="later"> Later
 
-            &nbsp &nbsp <input type="date" ng-show="start=='later'" ng-model="send_date" datepick>
+            &nbsp &nbsp <input type="text" datepick class = "dateplugin" ng-show="start=='later'" ng-model="send_date" >
             </div>
             <br><br>
+            <div prevbutton></div><div class="crm-submit-buttons" id="campaignbutton">
+            <div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >
+                <input type="submit" value="Submit & Send"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary" nexttab={{tab_val}}>
+                </div></div>
 
-            <button    id="campaignbutton" nexttab={{adi}} >Submit & Send</button> <br>
         </div>
     </div>
 </div>
\ No newline at end of file
diff --git a/partials/abtesting/next.html b/partials/abtesting/next.html
new file mode 100644 (file)
index 0000000..21e84d0
--- /dev/null
@@ -0,0 +1,3 @@
+<div class="crm-submit-buttons" id="campaignbutton">  <div class = "crm-button crm-button-type-upload crm-button_qf_Contact_upload_view"   >
+    <input type="submit" value="Next"  id="campaignbutton _qf_Contact_upload_view-top" class="btn btn-primary"  nexttab={{adi}} ><br></div></div>
+<br>
\ No newline at end of file