From 064b208351cacc8d8473e61365dd39512e46daa5 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 11 Apr 2016 14:31:12 +0800 Subject: [PATCH] Pman.Tab.AdminNotify.bjs Pman.Tab.AdminNotify.js --- Pman.Tab.AdminNotify.bjs | 2 +- Pman.Tab.AdminNotify.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Pman.Tab.AdminNotify.bjs b/Pman.Tab.AdminNotify.bjs index 151b6c4..8c14ad0 100644 --- a/Pman.Tab.AdminNotify.bjs +++ b/Pman.Tab.AdminNotify.bjs @@ -110,7 +110,7 @@ }, { "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}" + "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.event_id;\n if (id *1 < 0) {\n \n this.viewPanel.setContent(\"No Event for this line\"); \n return;\n }\n _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });\n \n}" }, "xtype" : "RowSelectionModel", "singleSelect" : true, diff --git a/Pman.Tab.AdminNotify.js b/Pman.Tab.AdminNotify.js index 9467eb1..e9e95bb 100644 --- a/Pman.Tab.AdminNotify.js +++ b/Pman.Tab.AdminNotify.js @@ -560,7 +560,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({ this.viewPanel.setContent("Nothing Selected"); return; } - var id = this.getSelected().data.id; + var id = this.getSelected().data.event_id; + if (id *1 < 0) { + + this.viewPanel.setContent("No Event for this line"); + return; + } _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" }); } -- 2.39.2