From 3363d86e7e456b1fa7af2e7c5ef6070651634ef8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 4 Mar 2021 18:05:13 +0800 Subject: [PATCH] Fix #6624 - import expiried templates --- Pman.Tab.AdminEmailTemplates.bjs | 27 ++++++++++++------------ Pman.Tab.AdminEmailTemplates.js | 36 +------------------------------- 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/Pman.Tab.AdminEmailTemplates.bjs b/Pman.Tab.AdminEmailTemplates.bjs index 38c167e..eaad9ce 100644 --- a/Pman.Tab.AdminEmailTemplates.bjs +++ b/Pman.Tab.AdminEmailTemplates.bjs @@ -27,8 +27,8 @@ "render" : "function (_self)\n{\n _this.nest = this;\n}" }, "region" : "center", - "title" : "Email Template", "xtype" : "NestedLayoutPanel", + "title" : "Email Template", "$ xns" : "Roo", "items" : [ { @@ -44,7 +44,6 @@ "* prop" : "center" }, { - "autoScroll" : false, "xtype" : "LayoutRegion", "$ xns" : "Roo", "split" : true, @@ -56,9 +55,9 @@ "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, + "background" : true, "region" : "center", "fitToframe" : true, - "background" : true, "title" : "core_email", "xtype" : "GridPanel", "fitContainer" : true, @@ -95,8 +94,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Core_email.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -203,8 +202,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Name", "width" : 250, + "header" : "Name", "$ renderer" : "function(v,x,r) \n{ \n if (r.data.description.length > 0) {\n v = r.data.description;\n }\n \n \n if(r.data.active * 1 < 1){\n return String.format('{0}', v ? v : ''); \n }\n \n return String.format('{0}', v ? v : ''); \n}", "$ xns" : "Roo.grid", "Boolean sortable" : true, @@ -213,8 +212,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Title", "width" : 300, + "header" : "Title", "$ renderer" : "function(v,x,r) \n{ \n if(r.data.active * 1 < 1){\n return String.format('{0}', v ? v : ''); \n }\n \n return String.format('{0}', v ? v : ''); \n}", "$ xns" : "Roo.grid", "Boolean sortable" : true, @@ -223,8 +222,8 @@ }, { "xtype" : "ColumnModel", - "header" : "From Name", "width" : 150, + "header" : "From Name", "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }", "$ xns" : "Roo.grid", "Boolean sortable" : true, @@ -233,8 +232,8 @@ }, { "xtype" : "ColumnModel", - "width" : 150, "header" : "From Email", + "width" : 150, "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }", "$ xns" : "Roo.grid", "Boolean sortable" : true, @@ -243,8 +242,8 @@ }, { "xtype" : "ColumnModel", - "header" : "BCC Group", "width" : 150, + "header" : "BCC Group", "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }", "$ xns" : "Roo.grid", "Boolean sortable" : true, @@ -259,14 +258,14 @@ "listeners" : { "render" : "function (_self)\n{\n _this.viewPanel = _self;\n}" }, - "autoScroll" : true, - "fitToFrame" : true, "background" : false, "region" : "south", + "Boolean fitContainer" : true, "title" : "View Message", "xtype" : "ContentPanel", - "fitContainer" : true, + "Boolean fitToFrame" : true, "$ xns" : "Roo", + "Boolean autoScroll" : true, "items" : [ { "listeners" : { @@ -280,7 +279,7 @@ { "listeners" : { "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n var p = _this.grid.selModel.getSelected();\n if (!p || !p.data.id) {\n this.removeAll();\n return false;\n }\n \n options.params['id'] = p.data.id;\n \n}", - "load" : "function (_self, records, options)\n{\n var p = _this.grid.selModel.getSelected();\n // Roo.log(p);\n if (!p || !p.data.id) {\n this.removeAll();\n return false;\n }\n /* \n new Pman.Request({\n url : baseURL + '/Roo/crm_action.php',\n method : 'GET',\n params : {\n person_id : p.data.id,\n sort : 'action_dt',\n dir : 'DESC'\n },\n success : function(res) {\n if(res.success){\n var el = _this.cpanel.el.select('.crm-history-content').first();\n _this.historyTemplate.overwrite(el, res);\n el.select('.crm-history-log').on('click', Pman.Crm.auditToggle);\n //Roo.log(res);\n }\n },\n failure : function(e) {\n //Roo.log(e);\n _this.grid.ds.load({});\n }\n \n });\n */\n\n//_this.historyTemplate = new Roo.DomTemplate({url : rootURL+'/Pman/Crm/domtemplates/crm_history.html'})\n\n/*\n new pman request ([\n \n } successs(data)\n el = _this.elemmnt.select('.services')\n _this.serviceTemplate.overwite(el, data)\n */\n}" + "load" : "function (_self, records, options)\n{\n var p = _this.grid.selModel.getSelected();\n // Roo.log(p);\n if (!p || !p.data.id) {\n this.removeAll();\n return false;\n }\n \n}" }, "xtype" : "Store", "$ xns" : "Roo.data", @@ -288,8 +287,8 @@ "items" : [ { "$ url" : "baseURL+'/Roo/Core_email.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, diff --git a/Pman.Tab.AdminEmailTemplates.js b/Pman.Tab.AdminEmailTemplates.js index 013f396..1415de2 100644 --- a/Pman.Tab.AdminEmailTemplates.js +++ b/Pman.Tab.AdminEmailTemplates.js @@ -59,7 +59,6 @@ Pman.Tab.AdminEmailTemplates = new Roo.XComponent({ }, south : { xtype : 'LayoutRegion', - autoScroll : false, height : 300, split : true, titlebar : true, @@ -447,40 +446,7 @@ Pman.Tab.AdminEmailTemplates = new Roo.XComponent({ this.removeAll(); return false; } - /* - new Pman.Request({ - url : baseURL + '/Roo/crm_action.php', - method : 'GET', - params : { - person_id : p.data.id, - sort : 'action_dt', - dir : 'DESC' - }, - success : function(res) { - if(res.success){ - var el = _this.cpanel.el.select('.crm-history-content').first(); - _this.historyTemplate.overwrite(el, res); - el.select('.crm-history-log').on('click', Pman.Crm.auditToggle); - //Roo.log(res); - } - }, - failure : function(e) { - //Roo.log(e); - _this.grid.ds.load({}); - } - - }); - */ - - //_this.historyTemplate = new Roo.DomTemplate({url : rootURL+'/Pman/Crm/domtemplates/crm_history.html'}) - - /* - new pman request ([ - - } successs(data) - el = _this.elemmnt.select('.services') - _this.serviceTemplate.overwite(el, data) - */ + } }, xns : Roo.data, -- 2.39.2