$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
<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>
+
  <input type="radio" ng-model="template" ng-value="templates[0]"> Subject Lines <br/><br>
  <input type="radio" ng-model="template" ng-value="templates[1]"> From Names <br/><br>
  <input type="radio" ng-model="template" ng-value="templates[2]"> Two different Emails <br/><br>
-   <input type="submit" value=">> Compose" id="campaignbutton" nexttab={{adi}} > <br>
+   <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>
-  <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>
+  <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>
+   Percentage Selected - {{slide_value}}%
- <h3 style="text-decoration: underline;">Select the size of your test group</h3><br>
-   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>
+   <input type="radio" ng-model="winner_criteria" value="Open" name="cri" required> Open <br/><br>
+   <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked" > Total Unique Clicks <br/><br>
+   <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>
-   <input type="radio" ng-model="winner_criteria" value="Open" name="cri" required> Open <br/><br>
-   <input type="radio" ng-model="winner_criteria" value="Total Unique Clicks" name="cri" checked="checked" > Total Unique Clicks <br/><br>
-   <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>
+  <input type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes  
+  <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>
-  <input type="radio" ng-model="automated" value="Yes" ng-click="setifyes(1)" name="auto" required>Yes  
-  <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>
+     <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;">  Please Enter a Valid Number</div>
- <h3> Please enter the confidence level at which a decision can be made</h3>
-     <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;">  Please Enter a Valid Number</div>
+ <h3>If the confidence level is not reached what do you want us to do?</h3>
+   <input type="radio" ng-model="ifnot" value="Inform me" name="ifnot"/> Inform me <br/><br>
+   <input type="radio" checked="checked" ng-model="ifnot" value="Send Version A" name="ifnot" /> Send Version A <br/><br>
+   <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>
-   <input type="radio" ng-model="ifnot" value="Inform me" name="ifnot"/> Inform me <br/><br>
-   <input type="radio" checked="checked" ng-model="ifnot" value="Send Version A" name="ifnot" /> Send Version A <br/><br>
-   <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>
-   <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
-   <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
-   <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;">  Please a Valid Time</div>
- <br>
- <br>
+ <h3>Declare the winner in how much time?</h3><br>
+   <input type="text" style="height: 20px; width: 15px;" ng-model="days" numbar=7 name="d"> Days
+   <input type="text" style="height: 20px; width: 15px;" ng-model="hours" numbar=23 name="h"> Hours
+   <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;">  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  
- <input type="radio" name="Start" ng-model="start" value="later"> Later
+ <input type="radio" name="Start" ng-model="start" value="later"> Later
-     <input type="date" ng-show="start=='later'" ng-model="send_date" datepick>
+     <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