From: Edward Date: Thu, 8 May 2014 09:31:26 +0000 (+0800) Subject: Pman.Dialog.CoreAutoSavePreview.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=51a6ea43f04e1b3297ab7f4fd10af59adfd8bfdf Pman.Dialog.CoreAutoSavePreview.bjs Pman.Dialog.CoreAutoSavePreview.js --- diff --git a/Pman.Dialog.CoreAutoSavePreview.bjs b/Pman.Dialog.CoreAutoSavePreview.bjs index 356ced2a..73f4ef74 100644 --- a/Pman.Dialog.CoreAutoSavePreview.bjs +++ b/Pman.Dialog.CoreAutoSavePreview.bjs @@ -54,6 +54,9 @@ "|xns": "Roo.grid", "items": [ { + "listeners": { + "afterselectionchange": "function (_self)\n{\n var selected = this.getSelected();\n \n if (!selected) {\n _this.viewPanel.setContent(\"Nothing Selected\");\n return;\n }\n Roo.log(selected);\n _this.viewPanel.setContent(\"Data Selected\");\n}" + }, "*prop": "sm", "singleSelect": true, "xtype": "RowSelectionModel", diff --git a/Pman.Dialog.CoreAutoSavePreview.js b/Pman.Dialog.CoreAutoSavePreview.js index 4f770674..ea012855 100644 --- a/Pman.Dialog.CoreAutoSavePreview.js +++ b/Pman.Dialog.CoreAutoSavePreview.js @@ -78,6 +78,19 @@ Pman.Dialog.CoreAutoSavePreview = { sm : { xtype: 'RowSelectionModel', xns: Roo.grid, + listeners : { + afterselectionchange : function (_self) + { + var selected = this.getSelected(); + + if (!selected) { + _this.viewPanel.setContent("Nothing Selected"); + return; + } + Roo.log(selected); + _this.viewPanel.setContent("Data Selected"); + } + }, singleSelect : true }, dataSource : {