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

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

index b78de98..9aa1a6d 100644 (file)
                                     "items": [
                                         {
                                             "listeners": {
-                                                "|actioncomplete": "function(_self,action)\n{\n   \n    if (action.type == 'setdata') {\n    \n        _this.data.module = _this.data.module || 'crm_mailing_list_message';\n        \n        _this.form.url = baseURL + '/Roo/' + _this.data.module;\n        \n        _this.html_preview.hide();\n        _this.preview_btn.hide();\n            \n        if(_this.data.id*1 > 0){\n            _this.dialog.el.mask(\"Loading\");\n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n            if(_this.data.module == 'crm'){\n                _this.html_preview.show();\n            }\n            _this.preview_btn.show();\n            \n        } else {\n            _this.form.setValues({\n                'from_name' : Pman.Login.authUser.name,\n                'from_email' : Pman.Login.authUser.email\n            });\n        }\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, action.result.data);\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
+                                                "|actioncomplete": "function(_self,action)\n{\n   \n    if (action.type == 'setdata') {\n    \n        _this.data.module = _this.data.module || 'crm_mailing_list_message';\n        \n        _this.form.url = baseURL + '/Roo/' + _this.data.module;\n        \n        _this.html_preview.hide();\n        _this.preview_btn.hide();\n            \n        if(_this.data.id*1 > 0){\n            _this.dialog.el.mask(\"Loading\");\n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n            if(_this.data.module == 'crm_mailing_list_message'){\n                _this.html_preview.show();\n            }\n            _this.preview_btn.show();\n            \n        } else {\n            _this.form.setValues({\n                'from_name' : Pman.Login.authUser.name,\n                'from_email' : Pman.Login.authUser.email\n            });\n        }\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, action.result.data);\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
                                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
                                             },
                                             "labelAlign": "right",
index 670b9dc..73f3be7 100644 (file)
@@ -315,7 +315,7 @@ Pman.Dialog.CoreEmail = {
                                                     if(_this.data.id*1 > 0){
                                                         _this.dialog.el.mask("Loading");
                                                         this.load({ method: 'GET', params: { '_id' : _this.data.id }});
-                                                        if(_this.data.module == 'crm'){
+                                                        if(_this.data.module == 'crm_mailing_list_message'){
                                                             _this.html_preview.show();
                                                         }
                                                         _this.preview_btn.show();