Pman.Tab.AdminEnum.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 17 Apr 2015 03:55:43 +0000 (11:55 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 17 Apr 2015 03:55:43 +0000 (11:55 +0800)
Pman.Tab.AdminEnum.js

Pman.Tab.AdminEnum.bjs
Pman.Tab.AdminEnum.js

index 79f6ce5..b8596b5 100644 (file)
           "keypress" : "function (e)\n{\n    if(e.keyCode == 13){\n        _this.grid.footer.onClick('first');\n    }\n}",
           "beforeedit" : "function (e)\n{\n    if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){\n        return false;\n    }\n}",
           "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
-          "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        var rec = _this.grid.ds.getAt(rowIndex);\n            \n        if (di == 'active') {\n            \n            rec.set('active', rec.data.active ? 0 : 1);\n            rec.commit();\n            return;\n        }\n        if (di == 'id' ) {\n            rec.set('sel', rec.data.sel ? 0 : 1);\n        }\n         \n\n         \n        \n}",
+          "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        var rec = _this.grid.ds.getAt(rowIndex);\n            \n        if (di == 'active') {\n            \n            rec.set('active', rec.data.active ? 0 : 1);\n            rec.commit();\n            return;\n        }\n        if (di == 'id' ) {\n            rec.selected = rec.selected ? 0 : 1;\n            rec.set('sel', rec.data.sel ? 0 : 1);\n        }\n         \n\n         \n        \n}",
           "afteredit" : "function (e)\n{\n   e.record.commit();     \n}"
          },
          "autoExpandColumn" : "display_name",
index dca2fd0..031e553 100644 (file)
@@ -738,6 +738,7 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                      return;
                  }
                  if (di == 'id' ) {
+                     rec.selected = rec.selected ? 0 : 1;
                      rec.set('sel', rec.data.sel ? 0 : 1);
                  }