From 3f4bfa00b8ec883e26b9fb8adda0f9556b17a3cd Mon Sep 17 00:00:00 2001 From: Siddhant Rajagopalan Date: Tue, 26 Aug 2014 16:45:29 +0530 Subject: [PATCH] fromemail bug fixed --- js/angular-Mailing.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/angular-Mailing.js b/js/angular-Mailing.js index 16909adfd5..37a8b278ce 100644 --- a/js/angular-Mailing.js +++ b/js/angular-Mailing.js @@ -97,7 +97,7 @@ if ($scope.currentMailing.from_name != null) { $scope.from.name = $scope.currentMailing.from_name; $scope.from.email = $scope.currentMailing.from_email; - $scope.from.total = $scope.from.name + " <" + $scope.from.email + ">"; + $scope.from.total = '"'+ $scope.from.name +'"' + " <" + $scope.from.email + ">"; $scope.reply.email = $scope.currentMailing.replyto_email; console.log($scope.from.total); console.log($scope.reply.email); @@ -371,7 +371,7 @@ if ($scope.from.total != "") { var splt = $scope.from.total.split(" "); var splta = splt[1].substring(1,(splt[1].length-1)); - var spltb = splt[0]; + var spltb = splt[0].substring(1,(splt[0].length-1)); $scope.currentMailing.from_email = splta; $scope.currentMailing.from_name = spltb; } @@ -701,10 +701,10 @@ document.getElementById("body_html").selectionStart = cursorPos; document.getElementById("body_html").selectionEnd = cursorPos; document.getElementById("body_html").focus();*/ - if(scope.currentMailing.body_html!="") - scope.currentMailing.body_html += e.val; + if(scope.currentMailing.body_html =="" || scope.currentMailing.body_html == null) + scope.currentMailing.body_html = e.val; else - scope.currentMailing.body_html = e.val; + scope.currentMailing.body_html += e.val; } else if(a=="subgroup"){ var msg = document.getElementById("sub").value; -- 2.25.1