{ "items" : [ { "$ xns" : "Roo", "closable" : true, "collapsible" : false, "height" : 500, "items" : [ { "$ xns" : "Roo", "* 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, "items" : [ { "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "$ xns" : "Roo.Toolbar", "items" : [ { "$ xns" : "Roo.menu", "* prop" : "menu", "items" : [ { "$ xns" : "Roo.menu", "listeners" : { "click" : [ "function (_self, e)", "{", " Pman.Dialog.CoreImportUrl.show({", " target : '/Core/ImportMailMessage.php'", " }, function(data) {", " if (data) {", " // Roo.log(data);", " _this.form.findField('bodytext').setValue(data);", " }", " });", "}" ] }, "text" : "URL", "xtype" : "Item" }, { "$ xns" : "Roo.menu", "listeners" : { "click" : [ "function (_self, e)", "{", " Pman.Dialog.Image.show({", " _url : baseURL + '/Core/ImportMailMessage.php'", " }, function(data) {", " if (data) {", " _this.form.findField('bodytext').setValue(data);", " }", " });", "}" ] }, "text" : "Html File", "xtype" : "Item" } ], "xtype" : "Menu" } ], "text" : "Import", "xtype" : "Button" }, { "$ xns" : "Roo.Toolbar", "items" : [ { "$ xns" : "Roo.menu", "* prop" : "menu", "items" : [ { "$ xns" : "Roo.menu", "listeners" : { "click" : [ "function (_self, e)", "{", "", " var l = document.location;", " new Pman.Request({", "", " url : baseURL + '/Core/ImportMailMessage.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" : "Item" } ], "xtype" : "Menu" } ], "text" : "Use template", "xtype" : "Button" }, { "$ xns" : "Roo.form", "allowBlank" : true, "alwaysQuery" : true, "displayField" : "file", "editable" : false, "emptyText" : "Select Template", "fieldLabel" : "Template", "forceSelection" : true, "hiddenName" : "template", "items" : [ { "$ sortInfo" : "{ direction : 'DESC', field: 'file' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Core/MailTemplateList.php'", "$ xns" : "Roo.data", "* prop" : "proxy", "method" : "GET", "xtype" : "HttpProxy" }, { "$ fields" : "[{\"name\":\"file\",\"type\":\"string\"},{\"name\":\"content\",\"type\":\"string\"}]", "$ xns" : "Roo.data", "* prop" : "reader", "id" : "name", "root" : "data", "totalProperty" : "total", "xtype" : "JsonReader" } ], "listeners" : { "|beforeload" : [ "function (_self, o){", " o.params = o.params || {};", " // set more here", " ", "}", "" ] }, "remoteSort" : true, "xtype" : "Store" } ], "listWidth" : 400, "listeners" : { "select" : [ "function (combo, record, index)", "{", " ", "/*", " (function() { ", " combo.setValue('');", " }).defer(100);", "*/ ", " if(!record){", " return;", " }", " _this.form.findField('bodytext').setValue(record.data.content);", "", "}" ] }, "loadingText" : "Searching...", "minChars" : 2, "name" : "template", "pageSize" : 20, "qtip" : "Select Template", "selectOnFocus" : true, "tpl" : "