Pman.Tab.AdminContactsGroup.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 31 May 2017 04:30:49 +0000 (12:30 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 31 May 2017 04:30:49 +0000 (12:30 +0800)
Pman.Tab.AdminContactsGroup.js

Pman.Tab.AdminContactsGroup.bjs
Pman.Tab.AdminContactsGroup.js

index 3c73884..a11bb7a 100644 (file)
@@ -19,9 +19,9 @@
    "listeners" : {
     "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.ds.load({});\n    }\n}"
    },
+   "region" : "west",
    "fitToframe" : true,
    "background" : true,
-   "region" : "west",
    "title" : "Groups",
    "xtype" : "GridPanel",
    "fitContainer" : true,
@@ -34,8 +34,8 @@
       "|render" : "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.Groups;\n    if (_this.panel.active) {\n        _this.grid.ds.load({});\n    }\n}"
      },
      "autoExpandColumn" : "name",
-     "enableDrop" : true,
      "xtype" : "Grid",
+     "enableDrop" : true,
      "ddGroup" : "groupDD",
      "loadMask" : true,
      "$ xns" : "Roo.grid",
@@ -54,8 +54,8 @@
        "items" : [
         {
          "$ url" : "baseURL + '/Roo/core_group'",
-         "method" : "GET",
          "xtype" : "HttpProxy",
+         "method" : "GET",
          "$ xns" : "Roo.data",
          "* prop" : "proxy"
         },
             },
             {
              "listeners" : {
-              "|click" : "function()\n{\n     Pman.genericDelete(_this, 'Groups'); \n}\n        "
+              "|click" : "function()\n{\n     Pman.genericDelete(_this, 'core_group'); \n}\n        "
              },
              "text" : "Delete",
              "xtype" : "Item",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Name",
        "width" : 200,
+       "header" : "Name",
        "$ renderer" : "function(v,x,r) { \n    if (r.data.id == -1) {\n        return '<b>' + \"Not in a Group\" + '</b>';\n    }\n    if ((r.data.id == 0) && (_this.type == 0)) {\n        return '<b>' + \"All Staff (Default Permissions)\" + '</b>';\n    }\n    if ((r.data.id == 0) && (_this.type == 2)) {\n        return '<b>' + \"Everybody\" + '</b>';\n    }\n    if (r.data.id == 0) {\n        return '<b>' + \"All Staff\" + '</b>';\n    }\n    if (v == 'Administrators') {\n        return '<b>' + \"Adminstrators\" + '</b>';\n    }\n    if (r.data.leader) {\n        return v + ' (' + r.data.leader_name + ')';\n    }\n    \n    return v;\n}",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
index 95f1d88..db5bb5f 100644 (file)
@@ -146,7 +146,7 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
           listeners : {
            click : function()
             {
-                 Pman.genericDelete(_this, 'Groups'); 
+                 Pman.genericDelete(_this, 'core_group'); 
             }
           },
           xns : Roo.menu,