{ "items" : [ { "$ xns" : "Roo", "items" : [ { "$ xns" : "Roo", "* prop" : "layout", "items" : [ { "$ xns" : "Roo", "* prop" : "center", "autoScroll" : false, "split" : true, "xtype" : "LayoutRegion" }, { "$ xns" : "Roo", "* prop" : "south", "height" : 300, "split" : true, "titlebar" : true, "xtype" : "LayoutRegion" }, { "$ xns" : "Roo", "background" : true, "fitContainer" : true, "fitToframe" : true, "items" : [ { "$ xns" : "Roo.grid", "* prop" : "grid", "autoExpandColumn" : "subject", "items" : [ { "$ xns" : "Roo.grid", "* prop" : "sm", "singleSelect" : true, "xtype" : "RowSelectionModel" }, { "$ sortInfo" : "{ field : 'description', direction: 'ASC' }", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "$ url" : "baseURL + '/Roo/Core_email.php'", "$ xns" : "Roo.data", "* prop" : "proxy", "method" : "GET", "xtype" : "HttpProxy" }, { "$ fields" : [ "[", " {", " \"name\":\"name\",", " \"type\":\"string\"", " },", " {", " \"name\":\"subject\",", " \"type\":\"string\"", " }", "]" ], "$ xns" : "Roo.data", "* prop" : "reader", "id" : "id", "root" : "data", "totalProperty" : "total", "xtype" : "JsonReader" } ], "listeners" : { "beforeload" : [ "function (_self, options)", "{", " options.params = options.params || {};", " ", " var s = _this.searchBox.getValue();", " ", " if(s.length){", " options.params['search[nameortitle]'] = s;", " }", "", "}" ] }, "remoteSort" : true, "xtype" : "Store" }, { "$ xns" : "Roo", "* prop" : "footer", "displayInfo" : true, "displayMsg" : "Displaying Message{0} - {1} of {2}", "emptyMsg" : "Nothing found", "items" : [ { "$ xns" : "Roo.Toolbar", "listeners" : { "|click" : [ "function()", "{", " ", "new Pman.Download({", " url : baseURL + '/Roo/Core_email',", " method : 'GET',", " params : {", " csvCols : '*',", " csvTitles : '*'", " }", "});", "Roo.MessageBox.alert(\"Notice\", \"Should be downloading now\");", " ", "}", "" ] }, "text" : "Download to Excel", "xtype" : "Button" } ], "pageSize" : 25, "xtype" : "PagingToolbar" }, { "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "$ xns" : "Roo.form", "listeners" : { "render" : [ "function (_self)", "{", " _this.searchBox = _self;", "}" ], "specialkey" : [ "function (_self, e)", "{", " _this.grid.footer.onClick('first');", "}" ] }, "xtype" : "TextField" }, { "$ icon" : "rootURL + '/Pman/templates/images/search.gif'", "$ xns" : "Roo.Toolbar", "cls" : "x-btn-icon", "listeners" : { "click" : [ "function (_self, e)", "{", " _this.grid.footer.onClick('first');", "}" ] }, "xtype" : "Button" }, { "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'", "$ xns" : "Roo.Toolbar", "cls" : "x-btn-icon", "listeners" : { "click" : [ "function (_self, e)", "{", " _this.searchBox.setValue('');\r", " _this.grid.footer.onClick('first');\r", "}" ] }, "xtype" : "Button" }, { "$ xns" : "Roo.Toolbar", "xtype" : "Fill" }, { "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'", "$ xns" : "Roo.Toolbar", "cls" : "x-btn-text-icon", "listeners" : { "|click" : [ "function()", "{", " var sel = _this.grid.selModel.getSelected();", " if (!sel) {", " Roo.MessageBox.alert(\"Error\", \"Select a message to copy\");", " return;", " }", "new Pman.Request({", " url : baseURL + '/Roo/Core_email',", " method : 'POST',", " params : {", " id : sel.data.id,", " _make_copy : 1", " },", " success : function() {", " _this.grid.footer.onClick('refresh');", " }", "});", " ", "}", "" ] }, "text" : "Copy", "xtype" : "Button" }, { "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'", "$ xns" : "Roo.Toolbar", "cls" : "x-btn-text-icon", "listeners" : { "|click" : [ "function()", "{", " if (!_this.dialog) {", " return;", " }", " _this.dialog.show( { id : 0, module : 'core_email' } , function() {", " _this.grid.footer.onClick('first');", " }); ", "}", "" ] }, "text" : "Add", "xtype" : "Button" }, { "$ xns" : "Roo.Toolbar", "xtype" : "Separator" }, { "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'", "$ xns" : "Roo.Toolbar", "cls" : "x-btn-text-icon", "listeners" : { "|click" : [ "function()", "{", " Pman.genericDelete(_this, 'core_email');", " ", "}", "" ] }, "text" : "Delete", "xtype" : "Button" } ], "xtype" : "Toolbar" }, { "$ renderer" : [ "function(v,x,r) ", "{ ", " if (r.data.description.length > 0) {", " v = r.data.description;", " }", " ", " ", " if(r.data.active * 1 < 1){", " return String.format('{0}', v ? v : ''); ", " }", " ", " return String.format('{0}', v ? v : ''); ", "}" ], "$ xns" : "Roo.grid", "* prop" : "cm[]", "Boolean sortable" : true, "dataIndex" : "name", "header" : "Name", "width" : 250, "xtype" : "ColumnModel" }, { "$ renderer" : [ "function(v,x,r) ", "{ ", " if(r.data.active * 1 < 1){", " return String.format('{0}', v ? v : ''); ", " }", " ", " return String.format('{0}', v ? v : ''); ", "}" ], "$ xns" : "Roo.grid", "* prop" : "cm[]", "Boolean sortable" : true, "dataIndex" : "subject", "header" : "Title", "width" : 300, "xtype" : "ColumnModel" }, { "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }", "$ xns" : "Roo.grid", "* prop" : "cm[]", "Boolean sortable" : true, "dataIndex" : "from_name", "header" : "From Name", "width" : 150, "xtype" : "ColumnModel" }, { "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }", "$ xns" : "Roo.grid", "* prop" : "cm[]", "Boolean sortable" : true, "dataIndex" : "from_email", "header" : "From Email", "width" : 150, "xtype" : "ColumnModel" }, { "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }", "$ xns" : "Roo.grid", "* prop" : "cm[]", "Boolean sortable" : true, "dataIndex" : "bcc_group_name", "header" : "BCC Group", "width" : 150, "xtype" : "ColumnModel" } ], "listeners" : { "rowclick" : [ "function (_self, rowIndex, e)", "{", " // _this.grid.ds.load({});", " _this.viewPanel.view.store.load({});", "}" ], "|render" : [ "function() ", "{", " _this.grid = this; ", " _this.dialog = Pman.Dialog.CoreEmail;", " if (_this.panel.active) {", " _this.grid.footer.onClick('first');", " }", "}" ], "|rowdblclick" : [ "function (_self, rowIndex, e)", "{", " if (!_this.dialog) { ", " return;", " }", " var data = this.getDataSource().getAt(rowIndex).data;", " _this.dialog.show( {id : data.id, module : 'core_email'} , function() {", " _this.grid.footer.onClick('first');", " }); ", "}", "" ] }, "loadMask" : true, "xtype" : "Grid" } ], "listeners" : { "|activate" : [ "function() {", " _this.panel = this;", " if (_this.grid) {", " _this.grid.footer.onClick('first');", " }", "}" ] }, "region" : "center", "tableName" : "core_email", "title" : "core_email", "xtype" : "GridPanel" }, { "$ xns" : "Roo", "Boolean autoScroll" : true, "Boolean fitContainer" : true, "Boolean fitToFrame" : true, "background" : false, "items" : [ { "$ tpl" : "new Roo.DomTemplate({url : rootURL+'/Pman/Crm/domtemplates/crm_mail.html'})", "$ xns" : "Roo", "* prop" : "view", "items" : [ { "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL+'/Roo/Core_email.php'", "$ xns" : "Roo.data", "* prop" : "proxy", "method" : "GET", "xtype" : "HttpProxy" }, { "$ xns" : "Roo.data", "* prop" : "reader", "id" : "id", "root" : "data", "totalProperty" : "total", "xtype" : "JsonReader" } ], "listeners" : { "beforeload" : [ "function (_self, options)", "{", " options.params = options.params || {};", " var p = _this.grid.selModel.getSelected();", " if (!p || !p.data.id) {", " this.removeAll();", " return false;", " }", " ", " options.params['id'] = p.data.id;", " ", "}" ], "load" : [ "function (_self, records, options)", "{", " var p = _this.grid.selModel.getSelected();", " // Roo.log(p);", " if (!p || !p.data.id) {", " this.removeAll();", " return false;", " }", " ", "}" ] }, "xtype" : "Store" } ], "listeners" : { "preparedata" : [ "function (_self, data, i, rec)", "{", " // Roo.log(data);", " //Roo.apply(data, rec.json);", "}" ] }, "xtype" : "View" } ], "listeners" : { "render" : [ "function (_self)", "{", " _this.viewPanel = _self;", "}" ] }, "region" : "south", "title" : "View Message", "xtype" : "ContentPanel" } ], "xtype" : "BorderLayout" } ], "listeners" : { "render" : [ "function (_self)", "{", " _this.nest = this;", "}" ] }, "region" : "center", "title" : "Email Template", "xtype" : "NestedLayoutPanel" } ], "modOrder" : "999", "name" : "Pman.Tab.AdminEmailTemplates", "parent" : "Pman.Tab.Admin", "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminEmailTemplates.bjs", "permname" : "", "strings" : { "00d6e06d2f3c092b4f5e1e708a360b0f" : "Displaying Message{0} - {1} of {2}", "01bd6a16732dfa2b760dc8566c58afae" : "Download to Excel", "49ee3087348e8d44e1feda1917443987" : "Name", "4a4a8fe0c6dfb6bd2a41755d15eb6f0b" : "From Name", "4ca679a383343ab3d4ca1cd7c91b43f7" : "From Email", "5fb63579fc981698f97d55bfecb213ea" : "Copy", "68b00d723d37122f64da8d9939f836f0" : "BCC Group", "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found", "9e11143e29a031212f2cdefcf61f39e9" : "View Message", "b78a3223503896721cca1303f776159b" : "Title", "c7d299bf3f9e37c77ab646f7e5366696" : "core_email", "ec211f7c20af43e742bf2570c3cb84f9" : "Add", "f2a6c498fb90ee345d997f888fce3b18" : "Delete", "f49559cda3fb906fbd7736f8b8a0e37d" : "Email Template" }, "title" : "Manage Email Templates" }