Pman.Tab.BAdminCompany.bjs
authoredward <edward@roojs.com>
Tue, 6 Feb 2018 08:49:52 +0000 (16:49 +0800)
committeredward <edward@roojs.com>
Tue, 6 Feb 2018 08:49:52 +0000 (16:49 +0800)
Pman.Tab.BAdminCompany.js

Pman.Tab.BAdminCompany.bjs
Pman.Tab.BAdminCompany.js

index 192f145..835f2dd 100644 (file)
         },
         {
          "listeners" : {
-          "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n    if (!_this.dialog) {\n        return;\n    }\n    _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {\n        if (_this.table) {\n            _this.table.footer.onClick('first');\n        }\n    });\n}",
+          "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n    var s = _this.table.store.getAt(rowIndex);\n    \n    if(!s || s.data.id * 1 < 1){\n        return;\n    }\n    \n    Pman.Dialog.BAdminCompany.show({\n        id : s.data.id\n    }, function() {\n        if (_this.table) {\n            _this.table.footer.onClick('first');\n        }\n    });\n}",
           "render" : "function (_self)\n{\n    _this.table = this;\n}"
          },
          "String cls" : "table-fixed",
index c37cecb..25081b6 100644 (file)
@@ -185,10 +185,15 @@ Pman.Tab.BAdminCompany = new Roo.XComponent({
          },
         rowdblclick : function (_self, el, rowIndex, e)
          {
-             if (!_this.dialog) {
+             var s = _this.table.store.getAt(rowIndex);
+             
+             if(!s || s.data.id * 1 < 1){
                  return;
              }
-             _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
+             
+             Pman.Dialog.BAdminCompany.show({
+                 id : s.data.id
+             }, function() {
                  if (_this.table) {
                      _this.table.footer.onClick('first');
                  }