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

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

index 96c030a..b364e85 100644 (file)
                                     "items": [
                                         {
                                             "listeners": {
-                                                "|actioncomplete": "function(_self,action)\n{\n   \n    if (action.type == 'setdata') {\n    \n        _this.data.module = _this.data.module || 'crm';\n        \n        _this.form.url = baseURL + '/Roo/' + _this.data.module + '_mailing_list_message.php';\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';\n        \n        _this.form.url = baseURL + '/Roo/' + _this.data.module + '_mailing_list_message.php';\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\n            _this.html_preview.show();\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 04b23f2..bd4ef0c 100644 (file)
@@ -312,9 +312,8 @@ Pman.Dialog.CoreMailingListMessage = {
                                                     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'){
-                                                            _this.html_preview.show();
-                                                        }
+                                            
+                                                        _this.html_preview.show();
                                                         _this.preview_btn.show();
                                                         
                                                     } else {