Pman.Dialog.CoreMailingListMessagePreview.bjs
authorEdward <edward@roojs.com>
Thu, 20 Feb 2014 05:44:05 +0000 (13:44 +0800)
committerEdward <edward@roojs.com>
Thu, 20 Feb 2014 05:44:05 +0000 (13:44 +0800)
Pman.Dialog.CoreMailingListMessagePreview.js

Pman.Dialog.CoreMailingListMessagePreview.bjs
Pman.Dialog.CoreMailingListMessagePreview.js

index 9e3c55c..0148f09 100644 (file)
@@ -7,7 +7,7 @@
     "items": [
         {
             "listeners": {
-                "show": "function (_self)\n{\n    _self.layout.getRegion('center').showPanel(0);\n    _this.panel.load({ \n        url: baseURL + '/Crm/MessagePreview', \n        params  : {\n            _id : _this.data.id\n        },\n        method : 'GET'\n    });\n    _this.hpanel.load({ \n        url: baseURL + '/Crm/MessagePreview', \n        params  : {\n            _as_html : 1,\n            _id : _this.data.id\n        },\n        method : 'GET'\n    });\n        \n}"
+                "show": "function (_self)\n{\n    var m = 'Core';\n    \n    if(_this.data.module = 'crm'){\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}"
             },
             "autoScroll": true,
             "closable": true,
index 99bc784..8d68ef7 100644 (file)
@@ -33,16 +33,22 @@ Pman.Dialog.CoreMailingListMessagePreview = {
             listeners : {
                 show : function (_self)
                 {
+                    var m = 'Core';
+                    
+                    if(_this.data.module = 'crm'){
+                        M = 'Crm';
+                    }
+                    
                     _self.layout.getRegion('center').showPanel(0);
                     _this.panel.load({ 
-                        url: baseURL + '/Crm/MessagePreview', 
+                        url: baseURL + '/' + m + '/MessagePreview', 
                         params  : {
                             _id : _this.data.id
                         },
                         method : 'GET'
                     });
                     _this.hpanel.load({ 
-                        url: baseURL + '/Crm/MessagePreview', 
+                        url: baseURL + '/' + m + '/MessagePreview', 
                         params  : {
                             _as_html : 1,
                             _id : _this.data.id