Pman.Tab.AdminNotify.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 11 Apr 2016 06:31:12 +0000 (14:31 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 11 Apr 2016 06:31:12 +0000 (14:31 +0800)
Pman.Tab.AdminNotify.js

Pman.Tab.AdminNotify.bjs
Pman.Tab.AdminNotify.js

index 151b6c4..8c14ad0 100644 (file)
           },
           {
            "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,
index 9467eb1..e9e95bb 100644 (file)
@@ -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" });
               
           }