From: Alan Knowles Date: Mon, 11 Apr 2016 06:29:52 +0000 (+0800) Subject: Pman.Tab.AdminNotify.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=bcc97a120c882364c7386b52233bb0bb994b7fe6 Pman.Tab.AdminNotify.bjs Pman.Tab.AdminNotify.js --- diff --git a/Pman.Tab.AdminNotify.bjs b/Pman.Tab.AdminNotify.bjs index d1655db..151b6c4 100644 --- a/Pman.Tab.AdminNotify.bjs +++ b/Pman.Tab.AdminNotify.bjs @@ -108,6 +108,15 @@ } ] }, + { + "listeners" : { + "afterselectionchange" : "function (_self)\n{\n // load detail log in _this.viewPanel;\n if (!this.getSelected()) {\n this.viewPanel.setContent(\"Nothing Selected\");\n return;\n }\n var id = this.getSelected().data.id;\n _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });\n \n}" + }, + "xtype" : "RowSelectionModel", + "singleSelect" : true, + "$ xns" : "Roo.grid", + "* prop" : "sm" + }, { "pageSize" : 25, "xtype" : "PagingToolbar", diff --git a/Pman.Tab.AdminNotify.js b/Pman.Tab.AdminNotify.js index cc06eee..9467eb1 100644 --- a/Pman.Tab.AdminNotify.js +++ b/Pman.Tab.AdminNotify.js @@ -547,6 +547,25 @@ Pman.Tab.AdminNotify = new Roo.XComponent({ xtype : 'JsonReader' } }, + sm : { + singleSelect : true, + xns : Roo.grid, + '|xns' : 'Roo.grid', + xtype : 'RowSelectionModel', + listeners : { + afterselectionchange : function (_self) + { + // load detail log in _this.viewPanel; + if (!this.getSelected()) { + this.viewPanel.setContent("Nothing Selected"); + return; + } + var id = this.getSelected().data.id; + _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" }); + + } + } + }, colModel : [ { dataIndex : 'id',