DataObjects/pman.links.ini
[Pman.Core] / Pman.Dialog.CoreMailingListMessage.js
index b5ce171..c39c5bc 100644 (file)
@@ -167,12 +167,15 @@ Pman.Dialog.CoreMailingListMessage = {
                                 listeners : {
                                     select : function (combo, record, index)
                                     {
-                                        Roo.log(record);
+                                       
                                     /*
                                         (function() { 
                                             combo.setValue('');
                                         }).defer(100);
                                     */    
+                                        if(!record){
+                                            return;
+                                        }
                                         _this.form.findField('bodytext').setValue(record.data.content);
                                     
                                     }
@@ -313,9 +316,9 @@ Pman.Dialog.CoreMailingListMessage = {
                                                         _this.dialog.el.mask("Loading");
                                                         this.load({ method: 'GET', params: { '_id' : _this.data.id }});
                                                         if(_this.data.module == 'crm'){
-                                                            _this.preview_btn.show();
                                                             _this.html_preview.show();
                                                         }
+                                                        _this.preview_btn.show();
                                                         
                                                     } else {
                                                         _this.form.setValues({
@@ -1059,7 +1062,7 @@ Pman.Dialog.CoreMailingListMessage = {
                         click : function (_self, e)
                         {
                             //_this.dialog.hide();
-                            
+                            Roo.log(_this.data.module);
                             Pman.Dialog.CoreMailingListMessagePreview.show({ id : _this.form.findField('id').getValue(), module : _this.data.module });
                         },
                         render : function (_self)
@@ -1089,8 +1092,7 @@ Pman.Dialog.CoreMailingListMessage = {
                                 method : 'POST',
                                 mask: 'Sending',
                                 params : {
-                                    _id : id,
-                                    _action : 'html'
+                                    _id : id
                                 }, 
                                 success : function(res) { 
                                     if(res.data == 'SUCCESS'){