Pman.Dialog.CoreMailingListMessage.bjs
authorEdward <edward@roojs.com>
Wed, 19 Feb 2014 06:12:44 +0000 (14:12 +0800)
committerEdward <edward@roojs.com>
Wed, 19 Feb 2014 06:12:44 +0000 (14:12 +0800)
Pman.Dialog.CoreMailingListMessage.js

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

index 24a05b1..5eed57d 100644 (file)
                                         }
                                     ]
                                 },
+                                {
+                                    "text": "Use template",
+                                    "xtype": "Button",
+                                    "|xns": "Roo.Toolbar",
+                                    "items": [
+                                        {
+                                            "|xns": "Roo.menu",
+                                            "xtype": "Menu",
+                                            "*prop": "menu",
+                                            "items": [
+                                                {
+                                                    "listeners": {
+                                                        "click": "function (_self, e)\n{\n\n    var l = document.location;\n    new Pman.Request({\n\n        url : baseURL + '/Crm/ImportHtml.php',\n\n        method: 'POST',\n        mask : \"Loading\",\n        params : {\n              importUrl : l.protocol +'//' + l.host +   rootURL + '/Pman/Crm/mail_templates/responsive1.html',\n       },\n        success : function (res) {\n\n         _this.form.findField('bodytext').setValue(res.data);\n        }\n  \n    });\n}"
+                                                    },
+                                                    "text": "Responsive Email (1)",
+                                                    "xtype": "Item",
+                                                    "|xns": "Roo.menu"
+                                                }
+                                            ]
+                                        }
+                                    ]
+                                },
                                 {
                                     "|xns": "Roo.Toolbar",
                                     "xtype": "Fill"
index 1ca4cc5..bd8000d 100644 (file)
@@ -161,6 +161,44 @@ Pman.Dialog.CoreMailingListMessage = {
                                     ]
                                 }
                             },
+                            {
+                                xtype: 'Button',
+                                xns: Roo.Toolbar,
+                                text : "Use template",
+                                menu : {
+                                    xtype: 'Menu',
+                                    xns: Roo.menu,
+                                    items : [
+                                        {
+                                            xtype: 'Item',
+                                            xns: Roo.menu,
+                                            listeners : {
+                                                click : function (_self, e)
+                                                {
+                                                
+                                                    var l = document.location;
+                                                    new Pman.Request({
+                                                
+                                                        url : baseURL + '/Crm/ImportHtml.php',
+                                                
+                                                        method: 'POST',
+                                                        mask : "Loading",
+                                                        params : {
+                                                              importUrl : l.protocol +'//' + l.host +   rootURL + '/Pman/Crm/mail_templates/responsive1.html',
+                                                       },
+                                                        success : function (res) {
+                                                
+                                                         _this.form.findField('bodytext').setValue(res.data);
+                                                        }
+                                                  
+                                                    });
+                                                }
+                                            },
+                                            text : "Responsive Email (1)"
+                                        }
+                                    ]
+                                }
+                            },
                             {
                                 xtype: 'Fill',
                                 xns: Roo.Toolbar