{ "id": "roo-file-178", "name": "Pman.Dialog.CoreMailingListMessage", "parent": "", "title": "", "path": "/home/edward/gitlive/Pman.Core/Pman.Dialog.CoreMailingListMessage.bjs", "items": [ { "listeners": { "show": "function (_self)\n{\n \n _self.layout.getRegion('center').showPanel(0);\n var w = Roo.lib.Dom.getViewWidth();\r\n var h = Roo.lib.Dom.getViewHeight(); \r this.resizeTo(w-50, h-50);\r\n this.center();\r \n var ew = Math.max(250, w-320);\r\n var eh = Math.max(250, h-350) ;\r\n var e = _this.dialog.layout.getRegion('east');\n if (e.visible) {\n e.hide();\n }\n \n var el = _self.getEl();\n var elw = el.dom.clientWidth;\n \n var bdtext = _this.form.findField('bodytext');\n var ptext = _this.form.findField('plaintext');\n if(bdtext.resizeEl){\n bdtext.width = elw-100;\n bdtext.resizeEl.resizeTo.defer(110, bdtext.resizeEl,[ bdtext.width, bdtext.height ] );\n ptext.setSize(bdtext.width , bdtext.height);\n }\n \n}" }, "closable": true, "collapsible": false, "height": 500, "modal": true, "resizable": true, "title": "Edit / Create Message", "width": 800, "xtype": "LayoutDialog", "|xns": "Roo", "items": [ { "*prop": "center", "tabPosition": "top", "xtype": "LayoutRegion", "|xns": "Roo" }, { "*prop": "east", "hidden": true, "split": true, "title": "Images / Attachments", "titlebar": true, "width": 500, "xtype": "LayoutRegion", "|xns": "Roo" }, { "autoScroll": false, "fitContainer": true, "fitToFrame": true, "region": "center", "xtype": "NestedLayoutPanel", "|xns": "Roo", "items": [ { "|xns": "Roo", "xtype": "Toolbar", "*prop": "toolbar", "items": [ { "text": "Import", "xtype": "Button", "|xns": "Roo.Toolbar", "items": [ { "|xns": "Roo.menu", "xtype": "Menu", "*prop": "menu", "items": [ { "listeners": { "click": "function (_self, e)\n{\n Pman.Dialog.CoreImportUrl.show({\n target : '/Crm/ImportHtml.php'\n }, function(data) {\n if (data) {\n // Roo.log(data);\n _this.form.findField('bodytext').setValue(data);\n }\n });\n}" }, "text": "URL", "xtype": "Item", "|xns": "Roo.menu" }, { "listeners": { "click": "function (_self, e)\n{\n Pman.Dialog.Image.show({\n _url : baseURL + '/Crm/ImportHtml.php'\n }, function(data) {\n if (data) {\n _this.form.findField('bodytext').setValue(data);\n }\n });\n}" }, "text": "Html File", "xtype": "Item", "|xns": "Roo.menu" } ] } ] }, { "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" } ] } ] }, { "listeners": { "select": "function (combo, record, index)\n{\n Roo.log(record);\n/*\n (function() { \n combo.setValue('');\n }).defer(100);\n*/ \n _this.form.findField('bodytext').setValue(record.data.content);\n\n}" }, "allowBlank": true, "alwaysQuery": true, "displayField": "file", "editable": false, "emptyText": "Select Template", "fieldLabel": "Template", "forceSelection": true, "hiddenName": "template", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "template", "pageSize": 20, "qtip": "Select Template", "selectOnFocus": true, "tpl": "