Pman.Dialog.CoreEmail.bjs
authorEdward <edward@roojs.com>
Fri, 21 Feb 2014 11:10:53 +0000 (19:10 +0800)
committerEdward <edward@roojs.com>
Fri, 21 Feb 2014 11:10:53 +0000 (19:10 +0800)
Pman.Dialog.CoreEmail.js

Pman.Dialog.CoreEmail.bjs
Pman.Dialog.CoreEmail.js

index 7516af1..449149f 100644 (file)
                 },
                 {
                     "listeners": {
-                        "click": "function (_self, e)\n{\n    //_this.dialog.hide();\n    \n    var id = _this.form.findField('id').getValue();\n    \n    if(id*1 < 1){\n        Roo.MessageBox.alert('Error', 'Please save the message frist!');\n        return;\n    }\n   \n    new Pman.Request({\n        url : baseURL + '/Crm/MessagePreview',\n        method : 'POST',\n        mask: 'Sending',\n        params : {\n            _id : id\n        }, \n        success : function(res) { \n            if(res.data == 'SUCCESS'){\n                Roo.MessageBox.alert(\"Email Sent\", 'The report was sent to your email (HTML format).');\n            }\n        }\n    });\n}",
+                        "click": "function (_self, e)\n{\n    //_this.dialog.hide();\n    \n    var id = _this.form.findField('id').getValue();\n    \n    if(id*1 < 1){\n        Roo.MessageBox.alert('Error', 'Please save the message frist!');\n        return;\n    }\n   \n    new Pman.Request({\n        url : baseURL + '/Core/MessagePreview',\n        method : 'POST',\n        mask: 'Sending',\n        params : {\n            _id : id,\n            _table : _this.data.module\n        }, \n        success : function(res) { \n            if(res.data == 'SUCCESS'){\n                Roo.MessageBox.alert(\"Email Sent\", 'The report was sent to your email (HTML format).');\n            }\n        }\n    });\n}",
                         "render": "function (_self)\n{\n    _this.html_preview = _self;\n}"
                     },
                     "*prop": "buttons[]",
index 64303b7..73b01c7 100644 (file)
@@ -1086,11 +1086,12 @@ Pman.Dialog.CoreEmail = {
                             }
                            
                             new Pman.Request({
-                                url : baseURL + '/Crm/MessagePreview',
+                                url : baseURL + '/Core/MessagePreview',
                                 method : 'POST',
                                 mask: 'Sending',
                                 params : {
-                                    _id : id
+                                    _id : id,
+                                    _table : _this.data.module
                                 }, 
                                 success : function(res) { 
                                     if(res.data == 'SUCCESS'){