slight change
authorSiddhant Rajagopalan <rajgo94@gmail.com>
Tue, 26 Aug 2014 10:53:01 +0000 (16:23 +0530)
committerSiddhant Rajagopalan <rajgo94@gmail.com>
Tue, 26 Aug 2014 10:53:01 +0000 (16:23 +0530)
js/angular-Mailing.js

index d7fafc7dedb1c55c721bc3546cf26fb0db0bbedf..16909adfd586fee81c277d181d2c9365aed87026 100644 (file)
           scope.$evalAsync('_resetSelection()');
           var a = $(element).attr('id');
           if(a=="htgroup"){
-            var msg = document.getElementById("body_html").value;
+          /*  var msg = document.getElementById("body_html").value;
             var cursorlen = document.getElementById("body_html").selectionStart;
             var textlen   = msg.length;
             document.getElementById("body_html").value = msg.substring(0, cursorlen) + e.val + msg.substring(cursorlen, textlen);
             var cursorPos = (cursorlen + e.val.length);
             document.getElementById("body_html").selectionStart = cursorPos;
             document.getElementById("body_html").selectionEnd   = cursorPos;
-            document.getElementById("body_html").focus();
+            document.getElementById("body_html").focus();*/
+            if(scope.currentMailing.body_html!="")
+            scope.currentMailing.body_html += e.val;
+            else
+            scope.currentMailing.body_html = e.val;
           }
           else if(a=="subgroup"){
             var msg = document.getElementById("sub").value;