Pman.Tab.BAdminCompany.bjs
authorKH Lau <khlau@roojs.com>
Tue, 22 Aug 2017 05:24:48 +0000 (13:24 +0800)
committerKH Lau <khlau@roojs.com>
Tue, 22 Aug 2017 05:24:48 +0000 (13:24 +0800)
Pman.Tab.BAdminCompany.js

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

index ea4f2cc..80e0052 100644 (file)
@@ -26,6 +26,7 @@
  "items" : [
   {
    "xtype" : "Nest",
+   "String region" : "center",
    "$ xns" : "Roo.bootstrap.panel",
    "String title" : "Companies",
    "items" : [
      "$ xns" : "Roo.bootstrap.layout",
      "* prop" : "layout",
      "items" : [
+      {
+       "xtype" : "Region",
+       "$ xns" : "Roo.bootstrap.layout",
+       "* prop" : "center"
+      },
       {
        "listeners" : {
         "activate" : "function (_self)\n{\n \n    if (_this.table) {\n      _this.table.store.load({});\n      _this.dialog = Pman.Dialog.BAdminCompany;\n      }\n}",
@@ -72,7 +78,7 @@
               },
               {
                "listeners" : {
-                "click" : "function (_self, e)\n{\n    var s = _this.grid.grid.selModel.getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) {\n        return;\n    }\n    _this.dialog.show(s[0].data, function() {\n        if (_this.table) {\n            _this.table.store.load({});\n        }\n    }); \n    \n}"
+                "click" : "function (_self, e)\n{\n    var s = _this.grid.grid.selModel.getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.bootstrap.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) {\n        return;\n    }\n    _this.dialog.show(s[0].data, function() {\n        if (_this.table) {\n            _this.table.store.load({});\n        }\n    }); \n    \n}"
                },
                "String weight" : "primary",
                "xtype" : "Button",
index fc4df09..a6e1e0e 100644 (file)
@@ -38,6 +38,7 @@ Pman.Tab.BAdminCompany = new Roo.XComponent({
    var MODULE = this;
    return {
    xtype : 'Nest',
+   region : 'center',
    title : _this._strings['edefbda3a2bdd979e42d8944b7325b79'] /* Companies */,
    xns : Roo.bootstrap.panel,
    '|xns' : 'Roo.bootstrap.panel',
@@ -45,6 +46,11 @@ Pman.Tab.BAdminCompany = new Roo.XComponent({
     xtype : 'Border',
     xns : Roo.bootstrap.layout,
     '|xns' : 'Roo.bootstrap.layout',
+    center : {
+     xtype : 'Region',
+     xns : Roo.bootstrap.layout,
+     '|xns' : 'Roo.bootstrap.layout'
+    },
     items  : [
      {
       xtype : 'Grid',
@@ -119,7 +125,7 @@ Pman.Tab.BAdminCompany = new Roo.XComponent({
                {
                    var s = _this.grid.grid.selModel.getSelections();
                    if (!s.length || (s.length > 1))  {
-                       Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
+                       Roo.bootstrap.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
                        return;
                    }
                    if (!_this.dialog) {