scheduled date working
authorSiddhant Rajagopalan <rajgo94@gmail.com>
Sun, 13 Jul 2014 13:28:47 +0000 (18:58 +0530)
committerSiddhant Rajagopalan <rajgo94@gmail.com>
Sat, 26 Jul 2014 05:11:57 +0000 (10:41 +0530)
js/angular-newMailing.js
partials/crmMailingType/main.html
partials/crmMailingType/test.html

index f2dec4c9d7bce4c022c2d3d540fa2685cdd6803f..32dc57bf90686e7f3d52e7df7a5dfbf51d687476 100644 (file)
@@ -74,7 +74,8 @@
                $scope.testGroup = "";
                window.ct = $scope.currentMailing;
                $scope.param = {};
-               $scope.tst=""
+               $scope.tst="";
+               
                if($scope.currentMailing.msg_template_id!=null){
                                $scope.tst=$scope.currentMailing.msg_template_id;
                                }
@@ -83,7 +84,8 @@
                $scope.mailingForm = function() {
                        if ($scope.mailing_form.$valid) {
                                // Submit as normal
-                       } else {
+                       } 
+                       else {
                                $scope.mailing_form.submitted = true;
                        }
                };
                };
 
                $scope.tmp = function (tst){
-               console.log(tst);
-               $scope.currentMailing.msg_template_id=tst;
-               if($scope.currentMailing.msg_template_id == ""){
-                       $scope.currentMailing.body_html="";
-               }
-               else{
-                       for(var a in $scope.tmpList){
-                        
-                               if($scope.tmpList[a].id==$scope.currentMailing.msg_template_id){
-                                       $scope.currentMailing.body_html=$scope.tmpList[a].msg_html;
+                       console.log(tst);
+                       $scope.currentMailing.msg_template_id=tst;
+                       if($scope.currentMailing.msg_template_id == ""){
+                               $scope.currentMailing.body_html="";
+                       }
+                       else{
+                               for(var a in $scope.tmpList){
+                                
+                                       if($scope.tmpList[a].id==$scope.currentMailing.msg_template_id){
+                                               $scope.currentMailing.body_html=$scope.tmpList[a].msg_html;
+                                               }
                                        }
-                               }
-               }       
+                               }       
+               };
+               
+               $scope.testing = function (testGroup){
+                       console.log(testGroup);
                };
                
 
                                
                        
                $scope.save = function() {
+                               console.log($scope.scheddate.date)
                                $scope.incGrp=[];
                                $scope.excGrp=[];
                                $scope.incMail=[];
                                $scope.excMail=[];
-                               console.log($scope.testGroup + " test group");
                                console.log(incGroup);
                                $scope.answer="";
                                for(req_id in incGroup){
                                                dateFormat: "yy-mm-dd",
                                                onSelect: function(date) {
                                                        $(".ui-datepicker a").removeAttr("href");
-                                                       var ngModelName = this.attributes['ng-model'].value;
-              scope[ngModelName] = date;
+                                                       scope.scheddate.date=date.toString();
               scope.$apply();
+              console.log(scope.scheddate.date);
                                                }
                                });
                        }
index 020b51485cde8170b596e5b0cb13e3fe154dde58..73559110b808ac5c4e42ee15f5f7f6d2515328ad 100644 (file)
@@ -8,7 +8,7 @@ Submit Mailing is not functional yet
 }
 </style>
 
-<form name="mailing_form" class="ng-valid" novalidate ng-submit="mailingForm()">
+<form name="mailing_form" novalidate ng-submit="mailingForm()">
   <div ui-jq="tabs" id="alltabs">
     <ul>
       <li><a href="#acttab-0" ng-click= "recclicked()">Recipients</a></li>
index c92ff73a49234203a565b31764b827375573e28d..2ec8f45e9b893f16fe162cccf18c55375b988fde 100644 (file)
@@ -14,7 +14,7 @@ Required vars: groupNamesList
   <tr>
     <td class="label">Send to this Group</td>
     <td>
-      <select  style="width: 200px" ng-model="testGroup" ng-options="grp.id as grp.title for grp in groupNamesList| filter: isGrp">
+      <select  style="width: 200px" ng-change="testing(testGroup)" ng-model="testGroup" ng-options="grp.id as grp.title for grp in groupNamesList| filter: isGrp">
                                <option value="">-none-</option>
                        </select>
     </td>