Pman.Tab.AdminEmailTemplates.js
"items" : [
{
"listeners" : {
- "|click" : "function()\n{\n var sel = _this.grid.selModel.getSelected();\n if (!sel) {\n Roo.MessageBox.alert(\"Error\", \"Select a message to copy\");\n return;\n }\nnew Pman.Request({\n url : baseURL + '/Roo/Core_email',\n method : 'POST',\n params : {\n id : sel.data.id,\n _make_copy : 1\n },\n success : function() {\n _this.grid.footer.onClick('refresh');\n }\n});\n \n}\n"
+ "|click" : "function()\n{\n \nnew Pman.Download({\n url : baseURL + '/Roo/Core_email',\n method : 'GET',\n params : {\n csvCols : '*',\n csvTitles : '*',\n }\n});\nRoo.MessageBox.alert(\"Notice\", \"Should be downloading now\");\n \n}\n"
},
"text" : "Download to Excel",
"xtype" : "Button",
listeners : {
click : function()
{
- var sel = _this.grid.selModel.getSelected();
- if (!sel) {
- Roo.MessageBox.alert("Error", "Select a message to copy");
- return;
- }
- new Pman.Request({
+
+ new Pman.Download({
url : baseURL + '/Roo/Core_email',
- method : 'POST',
+ method : 'GET',
params : {
- id : sel.data.id,
- _make_copy : 1
- },
- success : function() {
- _this.grid.footer.onClick('refresh');
+ csvCols : '*',
+ csvTitles : '*',
}
});
+ Roo.MessageBox.alert("Notice", "Should be downloading now");
}
},