From c2a8164451790fb375aa102a890ed3a1235778bd Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 13 Sep 2012 13:13:04 +0800 Subject: [PATCH] Pman.Tab.AdminContactsGroupRight.bjs Pman.Tab.AdminContactsGroupRight.js --- Pman.Tab.AdminContactsGroupRight.bjs | 2 +- Pman.Tab.AdminContactsGroupRight.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Pman.Tab.AdminContactsGroupRight.bjs b/Pman.Tab.AdminContactsGroupRight.bjs index e698380..b11b9cd 100644 --- a/Pman.Tab.AdminContactsGroupRight.bjs +++ b/Pman.Tab.AdminContactsGroupRight.bjs @@ -23,7 +23,7 @@ "listeners": { "|render": "function() \n{\n _this.grid = this; \n if (!_this.dialog) {\n _this.dialog = Pman.Dialog.PersonEdit;\n \n }\n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}", "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n _this.grid.footer.onClick('first');\n }); \n}\n", - "cellclick": "function (_self, rowIndex, columnIndex, e)\n{\n\n var di = this.colModel.getDataIndex(columnIndex);\n di.split('_').pop();\n if (di[0] != 'accessmask') {\n return;\n }\n\n var rec = _this.grid.ds.getAt(rowIndex);\n Roo.log(di);\n Roo.log(rec);\n rec.set('active', rec.data.active ? 0 : 1);\n //rec.commit();\n \n \n}" + "cellclick": "function (_self, rowIndex, columnIndex, e)\n{\n\n var di = this.colModel.getDataIndex(columnIndex);\n var i = di.split('_').shift();\n var k = di.split('_').pop();\n \n if (i != 'accessmask') {\n return;\n }\n\n var rec = _this.grid.ds.getAt(rowIndex);\n Roo.log(di);\n Roo.log(rec);\n rec.set(i+'_'+k, rec.data[i+'_'+k] ? 0 : 1);\n //rec.commit();\n \n \n}" }, "*prop": "grid", "ddGroup": "groupDD", diff --git a/Pman.Tab.AdminContactsGroupRight.js b/Pman.Tab.AdminContactsGroupRight.js index ea909e9..83a6d80 100644 --- a/Pman.Tab.AdminContactsGroupRight.js +++ b/Pman.Tab.AdminContactsGroupRight.js @@ -59,15 +59,17 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({ { var di = this.colModel.getDataIndex(columnIndex); - di.split('_').pop(); - if (di[0] != 'accessmask') { + var i = di.split('_').shift(); + var k = di.split('_').pop(); + + if (i != 'accessmask') { return; } var rec = _this.grid.ds.getAt(rowIndex); - Roo.log(di); + Roo.log(di); Roo.log(rec); - rec.set('active', rec.data.active ? 0 : 1); + rec.set(i+'_'+k, rec.data[i+'_'+k] ? 0 : 1); //rec.commit(); -- 2.39.2