Pman.Tab.AdminContacts.bjs
authorbenny <benny@roojs.com>
Fri, 13 Jul 2018 02:12:13 +0000 (10:12 +0800)
committerbenny <benny@roojs.com>
Fri, 13 Jul 2018 02:12:13 +0000 (10:12 +0800)
Pman.Tab.AdminContacts.js

Pman.Tab.AdminContacts.bjs
Pman.Tab.AdminContacts.js

index cff126d..ec4c369 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Tab.AdminContacts",
  "parent" : "Pman.Tab.AdminContactsManager",
  "title" : "Pman.Tab.AdminContacts",
- "path" : "/home/benny/gitlive/Pman.Admin/Pman.Tab.AdminContacts.bjs",
+ "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman/Admin/Pman.Tab.AdminContacts.bjs",
  "permname" : "Core.Person",
  "modOrder" : "001",
  "strings" : {
@@ -21,7 +21,6 @@
   "9675747b5ab12d05f18518761e68a533" : "Select Companies",
   "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person",
   "f1174ecbbc232f948717979daf04cf08" : "No Person found",
-  "ec3249f16ee5880d4c1acb752e5c925f" : "Switch to Selected User",
   "a93806efd0cc7a149f0f03e2b9a0f862" : "Bulk Add",
   "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
   "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
@@ -29,6 +28,7 @@
   "bbbabdbe1b262f75d99d62880b953be1" : "Role",
   "4d3d769b812b6faa6b76e1a8abaece2d" : "Active",
   "d4d25ad0a12e8d30e9d8d35230f6d1d3" : "Show Removed",
+  "e43cdd616be213ba8ce7270d471b96c9" : "Switch to Selected User ok",
   "9810aa2b9f44401be4bf73188ef2b67d" : "Fax"
  },
  "items" : [
@@ -49,8 +49,8 @@
     {
      "listeners" : {
       "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) {\n        return;\n    }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
-      "|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}",
-      "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        if (di != 'active') {\n            return;\n        }\n         \n        var rec = _this.grid.ds.getAt(rowIndex);\n        \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        if (di != 'active') {\n            return;\n        }\n         \n        var rec = _this.grid.ds.getAt(rowIndex);\n        \n        rec.set('active', rec.data.active ? 0 : 1);\n        rec.commit();\n         \n        \n}",
+      "|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}"
      },
      "autoExpandColumn" : "name",
      "xtype" : "Grid",
@@ -73,8 +73,8 @@
        "items" : [
         {
          "$ url" : "baseURL + '/Roo/Person.php'",
-         "xtype" : "HttpProxy",
          "method" : "GET",
+         "xtype" : "HttpProxy",
          "$ xns" : "Roo.data",
          "* prop" : "proxy"
         },
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_company'",
-             "xtype" : "HttpProxy",
              "method" : "GET",
+             "xtype" : "HttpProxy",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
          "listeners" : {
           "click" : "function (_self, e)\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if(s.length != 1){\n        Roo.MessageBox.alert(\"Error\", \"Select a Person\");\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Login.php',\n        method : 'GET',\n        params : {\n            'switch' : s[0].data.id\n        },\n        success : function (){\n            document.location = baseURL + '?ts=' + Math.random();\n        },\n        failure : function (d){\n            Roo.log(d);\n            Roo.MessageBox.alert(\"Error\", d);\n        }\n    });\n}"
          },
-         "text" : "Switch to Selected User",
+         "text" : "Switch to Selected User ok",
          "xtype" : "Button",
          "$ xns" : "Roo.Toolbar"
         },
       },
       {
        "xtype" : "ColumnModel",
-       "width" : 100,
        "header" : "Role",
+       "width" : 100,
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "width" : 100,
        "header" : "Phone",
+       "width" : 100,
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "width" : 100,
        "header" : "Fax",
+       "width" : 100,
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "width" : 75,
        "header" : "Active",
+       "width" : 75,
        "$ renderer" : "function(v) {  \n    var state = v> 0 ?  '-checked' : '';\n\n    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n                \n }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
index 43c4032..71a7838 100644 (file)
@@ -22,7 +22,6 @@ Pman.Tab.AdminContacts = new Roo.XComponent({
   '9675747b5ab12d05f18518761e68a533' :"Select Companies",
   '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person",
   'f1174ecbbc232f948717979daf04cf08' :"No Person found",
-  'ec3249f16ee5880d4c1acb752e5c925f' :"Switch to Selected User",
   'a93806efd0cc7a149f0f03e2b9a0f862' :"Bulk Add",
   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
   'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
@@ -30,6 +29,7 @@ Pman.Tab.AdminContacts = new Roo.XComponent({
   'bbbabdbe1b262f75d99d62880b953be1' :"Role",
   '4d3d769b812b6faa6b76e1a8abaece2d' :"Active",
   'd4d25ad0a12e8d30e9d8d35230f6d1d3' :"Show Removed",
+  'e43cdd616be213ba8ce7270d471b96c9' :"Switch to Selected User ok",
   '9810aa2b9f44401be4bf73188ef2b67d' :"Fax"
  },
  _named_strings : {
@@ -297,7 +297,7 @@ Pman.Tab.AdminContacts = new Roo.XComponent({
       },
       {
        xtype : 'Button',
-       text : _this._strings['ec3249f16ee5880d4c1acb752e5c925f'] /* Switch to Selected User */,
+       text : _this._strings['e43cdd616be213ba8ce7270d471b96c9'] /* Switch to Selected User ok */,
        listeners : {
         click : function (_self, e)
          {