From d2db8180368a6593746acc29e30b801aa26519af Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 28 Sep 2020 11:48:33 +0800 Subject: [PATCH] enable nest to be set so it can be used. --- Pman.Tab.AdminNotify.bjs | 27 +++++++++++++++------------ Pman.Tab.AdminNotify.js | 6 ++++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Pman.Tab.AdminNotify.bjs b/Pman.Tab.AdminNotify.bjs index 8537178..9475c42 100644 --- a/Pman.Tab.AdminNotify.bjs +++ b/Pman.Tab.AdminNotify.bjs @@ -2,7 +2,7 @@ "name" : "Pman.Tab.AdminNotify", "parent" : "Pman.Tab.AdminWatchNotify", "title" : "Pman.Tab.AdminNotify", - "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman.Admin/Pman.Tab.AdminNotify.bjs", + "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotify.bjs", "permname" : "", "modOrder" : "001", "strings" : { @@ -30,9 +30,12 @@ }, "items" : [ { + "listeners" : { + "render" : "function (_self)\n{\n _this.nest = this;\n}" + }, "xtype" : "NestedLayoutPanel", - "String region" : "center", "$ xns" : "Roo", + "String region" : "center", "String title" : "Current Notifications", "Boolean background" : false, "items" : [ @@ -48,8 +51,8 @@ }, { "autoScroll" : true, - "String collapsedTitle" : "View Details", "xtype" : "LayoutRegion", + "String collapsedTitle" : "View Details", "$ xns" : "Roo", "Boolean collapsible" : true, "split" : true, @@ -63,8 +66,8 @@ "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n \n}" }, "bool background" : true, - "region" : "center", "fitToframe" : true, + "region" : "center", "title" : "Current Notifications", "xtype" : "GridPanel", "fitContainer" : true, @@ -93,8 +96,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_notify.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -168,8 +171,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_notify.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -226,8 +229,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -350,8 +353,8 @@ }, { "xtype" : "ColumnModel", - "width" : 150, "header" : "Ontable", + "width" : 150, "$ renderer" : "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -359,8 +362,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Who to notify", + "width" : 100, "$ renderer" : "function(v,x,r) {\n\n var pt = r.data.person_table.toLowerCase() ;\n var pt = pt.length ? pt : 'person';\n var ecol = pt + '_id_email' ;\n var ncol = pt + '_id_name' ;\n return String.format('{0} <{1}>', r.data[ncol], r.data[ecol]); \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -368,8 +371,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Triggered by", + "width" : 100, "$ renderer" : "function(v,x,r) {\n return String.format(\n '{0} : {1} {2}', \n r.data.trigger_event_id_on_table, \n r.data.trigger_event_id_on_id, \n r.data.trigger_event_id_remarks\n ); \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -377,8 +380,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Msgid", "width" : 200, + "header" : "Msgid", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -386,8 +389,8 @@ }, { "xtype" : "ColumnModel", - "width" : 300, "header" : "Event", + "width" : 300, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", diff --git a/Pman.Tab.AdminNotify.js b/Pman.Tab.AdminNotify.js index 74bf5b9..1451ce7 100644 --- a/Pman.Tab.AdminNotify.js +++ b/Pman.Tab.AdminNotify.js @@ -46,6 +46,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({ background : false, region : 'center', title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */, + listeners : { + render : function (_self) + { + _this.nest = this; + } + }, xns : Roo, '|xns' : 'Roo', layout : { -- 2.39.2