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

Pman.Dialog.CoreEmailPreview.bjs
Pman.Dialog.CoreEmailPreview.js

index 487e3f8..e6ad5aa 100644 (file)
@@ -7,7 +7,7 @@
     "items": [
         {
             "listeners": {
-                "show": "function (_self)\n{\n    var m = 'Core';\n    \n    if(_this.data.module == 'crm_mailing_list_message'){\n        m = 'Crm';\n    }\n\n    _self.layout.getRegion('center').showPanel(0);\n    _this.panel.load({ \n        url: baseURL + '/' + m + '/MessagePreview', \n        params  : {\n            _id : _this.data.id\n        },\n        method : 'GET'\n    });\n    _this.hpanel.load({ \n        url: baseURL + '/' + m + '/MessagePreview', \n        params  : {\n            _as_html : 1,\n            _id : _this.data.id\n        },\n        method : 'GET'\n    });\n        \n}"
+                "show": "function (_self)\n{\n    \n    _self.layout.getRegion('center').showPanel(0);\n    _this.panel.load({ \n        url: baseURL + '/Core/MessagePreview', \n        params  : {\n            _id : _this.data.id,\n            _table : _this.data.module\n        },\n        method : 'GET'\n    });\n    _this.hpanel.load({ \n        url: baseURL + '/Core/MessagePreview', \n        params  : {\n            _as_html : 1,\n            _id : _this.data.id,\n            _table : _this.data.module\n        },\n        method : 'GET'\n    });\n        \n}"
             },
             "autoScroll": true,
             "closable": true,
index 2deea42..fb7c4ad 100644 (file)
@@ -33,25 +33,22 @@ Pman.Dialog.CoreEmailPreview = {
             listeners : {
                 show : function (_self)
                 {
-                    var m = 'Core';
                     
-                    if(_this.data.module == 'crm_mailing_list_message'){
-                        m = 'Crm';
-                    }
-                
                     _self.layout.getRegion('center').showPanel(0);
                     _this.panel.load({ 
-                        url: baseURL + '/' + m + '/MessagePreview', 
+                        url: baseURL + '/Core/MessagePreview', 
                         params  : {
-                            _id : _this.data.id
+                            _id : _this.data.id,
+                            _table : _this.data.module
                         },
                         method : 'GET'
                     });
                     _this.hpanel.load({ 
-                        url: baseURL + '/' + m + '/MessagePreview', 
+                        url: baseURL + '/Core/MessagePreview', 
                         params  : {
                             _as_html : 1,
-                            _id : _this.data.id
+                            _id : _this.data.id,
+                            _table : _this.data.module
                         },
                         method : 'GET'
                     });