From: Alan Knowles Date: Mon, 11 Apr 2016 06:31:12 +0000 (+0800) Subject: Pman.Tab.AdminNotify.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=064b208351cacc8d8473e61365dd39512e46daa5 Pman.Tab.AdminNotify.bjs Pman.Tab.AdminNotify.js --- 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" }); }