فهرست منبع

Fix email center #891

causefx 7 سال پیش
والد
کامیت
3bd735d806
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      api/plugins/js/php-mailer.js

+ 3 - 3
api/plugins/js/php-mailer.js

@@ -191,10 +191,10 @@ function buildEmailModal(){
             templates: templates,
             templates: templates,
             init_instance_callback: function (editor) {
             init_instance_callback: function (editor) {
                 editor.on('BeforeSetContent', function (e) {
                 editor.on('BeforeSetContent', function (e) {
-                    tinyMCE.get('sendEmail').execCommand('selectAll');
-                    tinyMCE.get('sendEmail').execCommand('delete');
+                    //tinyMCE.get('sendEmail').execCommand('selectAll');
+                    //tinyMCE.get('sendEmail').execCommand('delete');
                     $.each(e.target.settings.templates, function(i,v) {
                     $.each(e.target.settings.templates, function(i,v) {
-                        if(v.content == e.content){
+                        if($.trim(v.content) == $.trim(e.content)){
                             $('#sendEmailSubjectInput').val(v.description);
                             $('#sendEmailSubjectInput').val(v.description);
                         }
                         }
                     });
                     });