From 83b81838ed282d7f570cccdec7b6cde9f1314c22 Mon Sep 17 00:00:00 2001 From: Siddhant Rajagopalan Date: Sun, 13 Jul 2014 18:58:47 +0530 Subject: [PATCH] scheduled date working --- js/angular-newMailing.js | 40 ++++++++++++++++++------------- partials/crmMailingType/main.html | 2 +- partials/crmMailingType/test.html | 2 +- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/js/angular-newMailing.js b/js/angular-newMailing.js index f2dec4c9d7..32dc57bf90 100644 --- a/js/angular-newMailing.js +++ b/js/angular-newMailing.js @@ -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; } }; @@ -93,19 +95,23 @@ }; $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); }; @@ -216,11 +222,11 @@ $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){ @@ -393,9 +399,9 @@ 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); } }); } diff --git a/partials/crmMailingType/main.html b/partials/crmMailingType/main.html index 020b51485c..73559110b8 100644 --- a/partials/crmMailingType/main.html +++ b/partials/crmMailingType/main.html @@ -8,7 +8,7 @@ Submit Mailing is not functional yet } -
+
  • Recipients
  • diff --git a/partials/crmMailingType/test.html b/partials/crmMailingType/test.html index c92ff73a49..2ec8f45e9b 100644 --- a/partials/crmMailingType/test.html +++ b/partials/crmMailingType/test.html @@ -14,7 +14,7 @@ Required vars: groupNamesList Send to this Group - -- 2.25.1