Pman.Dialog.CoreMailingListMessage.bjs
authorEdward <edward@roojs.com>
Thu, 20 Feb 2014 06:42:56 +0000 (14:42 +0800)
committerEdward <edward@roojs.com>
Thu, 20 Feb 2014 06:42:56 +0000 (14:42 +0800)
Pman.Dialog.CoreMailingListMessage.js

Pman.Dialog.CoreMailingListMessage.bjs
Pman.Dialog.CoreMailingListMessage.js

index 1abb9aa..b9faeb8 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 + '/Core/MessagePreview',\n        method : 'POST',\n        mask: 'Sending',\n        params : {\n            _id : id,\n            _action : 'html'\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            _ontable : (_this.data.module) ? _this.data.module + '_mailing_list_message' : 'core_mailing_list_message'\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 e7e021d..b9728ae 100644 (file)
@@ -1089,7 +1089,7 @@ Pman.Dialog.CoreMailingListMessage = {
                                 mask: 'Sending',
                                 params : {
                                     _id : id,
-                                    _action : 'html'
+                                    _ontable : (_this.data.module) ? _this.data.module + '_mailing_list_message' : 'core_mailing_list_message'
                                 }, 
                                 success : function(res) { 
                                     if(res.data == 'SUCCESS'){