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

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

index 24e345a..6065b39 100644 (file)
                                                                                     "items": [
                                                                                         {
                                                                                             "listeners": {
-                                                                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n\n    var id = _this.form.findField('id').getValue() * 1;    \n    if (!id) {\n        Roo.MessageBox.alert(\"Error\", \"Save email template first\");\n        return false;\n    }\n    o.params.onid = id\n    o.params.ontable = 'core_mailing_list_message';\n    \n   // o.params.imgtype = 'PressRelease';\n    //o.params['query[imagesize]'] = '150x150';\n    // set more here\n}\n"
+                                                                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n\n    var id = _this.form.findField('id').getValue() * 1;    \n    if (!id) {\n        Roo.MessageBox.alert(\"Error\", \"Save email template first\");\n        return false;\n    }\n    o.params.onid = id\n    o.params.ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';\n    \n   // o.params.imgtype = 'PressRelease';\n    //o.params['query[imagesize]'] = '150x150';\n    // set more here\n}\n"
                                                                                             },
                                                                                             "*prop": "store",
                                                                                             "remoteSort": true,
index 5d9bcee..cb0432d 100644 (file)
@@ -576,7 +576,7 @@ Pman.Dialog.CoreEmail = {
                                                                                                 return false;
                                                                                             }
                                                                                             o.params.onid = id
-                                                                                            o.params.ontable = 'core_mailing_list_message';
+                                                                                            o.params.ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';
                                                                                             
                                                                                            // o.params.imgtype = 'PressRelease';
                                                                                             //o.params['query[imagesize]'] = '150x150';