"name" : "Pman.Dialog.CoreEmail",
"parent" : "",
"title" : "",
- "path" : "/home/edward/gitlive/Pman.Core/Pman.Dialog.CoreEmail.bjs",
+ "path" : "/home/johns/gitlive/Pman.Core/Pman.Dialog.CoreEmail.bjs",
"permname" : "",
"modOrder" : "001",
"strings" : {
"items" : [
{
"xtype" : "LayoutRegion",
- "$ xns" : "Roo",
"tabPosition" : "top",
+ "$ xns" : "Roo",
"* prop" : "center"
},
{
"hidden" : true,
- "xtype" : "LayoutRegion",
"title" : "Images / Attachments",
+ "xtype" : "LayoutRegion",
"width" : 500,
"$ xns" : "Roo",
"split" : true,
},
{
"autoScroll" : false,
- "region" : "center",
"fitToFrame" : true,
+ "region" : "center",
"xtype" : "NestedLayoutPanel",
"fitContainer" : true,
"$ xns" : "Roo",
"items" : [
{
"$ url" : "baseURL + '/Core/MailTemplateList.php'",
- "method" : "GET",
"xtype" : "HttpProxy",
+ "method" : "GET",
"$ xns" : "Roo.data",
"* prop" : "proxy"
},
"render" : "function (_self, width, height)\n{\n \n Roo.log(\"RESIZE, \" + width + ',' + height);\n \n var ew = Math.max(250, width-50);\n var eh = Math.max(250,height-50) ;\n \n \n\n}"
},
"autoScroll" : false,
- "fitToFrame" : true,
"background" : false,
+ "fitToFrame" : true,
"region" : "center",
"title" : "Message",
"xtype" : "ContentPanel",
"* prop" : "store",
"items" : [
{
- "$ url" : "baseURL + '/Roo/Groups'",
- "xtype" : "HttpProxy",
+ "$ url" : "baseURL + '/Roo/Core_group'",
"method" : "GET",
+ "xtype" : "HttpProxy",
"$ xns" : "Roo.data",
"* prop" : "proxy"
},
"items" : [
{
"hideLabels" : true,
- "legend" : "Html Editor",
"style" : "text-align:center;",
+ "legend" : "Html Editor",
"xtype" : "FieldSet",
"$ xns" : "Roo.form",
"items" : [
"items" : [
{
"$ url" : "baseURL + '/Roo/Images.php'",
- "xtype" : "HttpProxy",
"method" : "GET",
+ "xtype" : "HttpProxy",
"$ xns" : "Roo.data",
"* prop" : "proxy"
},
"items" : [
{
"listeners" : {
- "click" : "function (_self, e)\n{\n var h = _this.form.findField('bodytext').getValue();\n var p = _this.form.findField('plaintext');\n \n new Pman.Request({\r\n url : baseURL + '/Core/ImportMailMessage.php',\r\n method : 'POST',\r\n params : {\n bodytext : h,\r\n _convertToPlain : true,\n _check_unsubscribe : true\r\n }, \r\n success : function(res) {\r\n if(res.success == true){\n p.setValue(res.data);\n }\r\n }\r\n }); \n \n}"
+ "click" : "function (_self, e)\n{\n var h = _this.form.findField('bodytext').getValue();\n var p = _this.form.findField('plaintext');\n \n new Pman.Request({\r\n url : baseURL + '/Core/ImportMailMessage.php',\r\n method : 'POST',\r\n params : {\n bodytext : h,\r\n _convertToPlain : true,\n _check_unsubscribe : true\r\n }, \r\n success : function(res) {\r\n if(res.success == true){\n p.setValue(res.data);\n }\r\n }\r\n });\n \n}"
},
"text" : "Convert Html to Text",
"xtype" : "Button",
"items" : [
{
"hideLabels" : true,
- "legend" : "Plain Text",
"style" : "text-align:center;",
+ "legend" : "Plain Text",
"xtype" : "FieldSet",
"$ xns" : "Roo.form",
"items" : [
"|activate" : "function() {\n _this.ipanel = this;\n if (_this.igrid) {\n _this.igrid.ds.load({});\n }\n}"
},
"autoScroll" : false,
- "fitToframe" : true,
"background" : false,
+ "fitToframe" : true,
"region" : "east",
"title" : "Images / Attachments",
"xtype" : "GridPanel",
"items" : [
{
"$ url" : "baseURL + '/Roo/Images.php'",
- "xtype" : "HttpProxy",
"method" : "GET",
+ "xtype" : "HttpProxy",
"$ xns" : "Roo.data",
"* prop" : "proxy"
},
"items" : [
{
"listeners" : {
- "|click" : "function()\n{\n var id = _this.form.findField('id').getValue();\n \n if(id*1 < 1){\n Roo.MessageBox.alert('Error', 'Please save the email template first');\n return;\n }\n \n var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';\n \n Pman.Dialog.Image.show( { id : 0, onid: id, ontable: ontable }, function() {\n _this.igrid.getDataSource().load({});\n }); \n}\n"
+ "|click" : "function()\n{\n var id = _this.form.findField('id').getValue();\n \n if(id*1 < 1){\n Roo.MessageBox.alert('Error', 'Please save the email template first');\n return;\n }\n \n var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';\n \n Pman.Dialog.Image.show( { id : 0, onid: id, ontable: ontable }, function() {\n _this.igrid.getDataSource().load({});\n });\n}\n"
},
"text" : "Add",
"xtype" : "Button",
},
{
"xtype" : "ColumnModel",
- "width" : 300,
"header" : "Filename",
+ "width" : 300,
"$ renderer" : "function(v,x,r)\n{\n var width = r.data.width;\n var height = r.data.height;\n \n if(width > 50){\n height = Math.round(height * 50 / width);\n width = 50;\n }\n \n return '<img src=\"' + baseURL + '/Images/' + r.data.id + '/' + r.data.filename + '\" width=\"' + width + '\" height=\"' + height + '\" />';\n}",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
},
{
"xtype" : "ColumnModel",
- "header" : "Displayorder",
"width" : 75,
+ "header" : "Displayorder",
"$ renderer" : "function(v) { return String.format('{0}', v); }",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
},
{
"xtype" : "ColumnModel",
- "width" : 75,
"header" : "Title",
+ "width" : 75,
"$ renderer" : "function(v) { return String.format('{0}', v); }",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
{
"listeners" : {
"render" : "function (_self)\n{\n _this.html_preview = _self;\n}",
- "click" : "function (_self, e)\n{\n //_this.dialog.hide();\n \n var id = _this.form.findField('id').getValue();\n \n if(id*1 < 1){\n Roo.MessageBox.alert('Error', 'Please save the message frist!');\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Core/MessagePreview',\n method : 'POST',\n mask: 'Sending',\n params : {\n _id : id,\n _table : _this.data.module\n }, \n success : function(res) { \n if(res.data == 'SUCCESS'){\n Roo.MessageBox.alert(\"Email Sent\", 'The report was sent to your email (HTML format).');\n }\n }\n });\n}"
+ "click" : "function (_self, e)\n{\n //_this.dialog.hide();\n\n var id = _this.form.findField('id').getValue();\n \n if(id*1 < 1){\n Roo.MessageBox.alert('Error', 'Please save the message frist!');\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Core/MessagePreview',\n method : 'POST',\n mask: 'Sending',\n params : {\n _id : id,\n _table : _this.data.module\n }, \n success : function(res) { \n if(res.data == 'SUCCESS'){\n Roo.MessageBox.alert(\"Email Sent\", 'The report was sent to your email (HTML format).');\n }\n }\n });\n}"
},
"text" : "Send me a test copy",
"xtype" : "Button",