sync
[Pman.Admin] / Pman.Tab.AdminContactsGroup.bjs
index 605b31d..825387c 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Tab.AdminContactsGroup",
  "parent" : "Pman.Tab.AdminContactsManager",
  "title" : "Pman.Tab.AdminContactsGroup",
- "path" : "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminContactsGroup.bjs",
+ "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman.Admin/Pman.Tab.AdminContactsGroup.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
    "listeners" : {
     "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.ds.load({});\n    }\n}"
    },
+   "fitToframe" : true,
    "background" : true,
    "region" : "west",
-   "fitToframe" : true,
    "title" : "Groups",
    "xtype" : "GridPanel",
    "fitContainer" : true,
    "$ xns" : "Roo",
-   "tableName" : "Groups",
+   "tableName" : "core_group",
    "items" : [
     {
      "listeners" : {
@@ -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",
-     "xtype" : "Grid",
      "enableDrop" : true,
+     "xtype" : "Grid",
      "ddGroup" : "groupDD",
      "loadMask" : true,
      "$ xns" : "Roo.grid",
@@ -43,7 +43,7 @@
      "items" : [
       {
        "listeners" : {
-        "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    o.params.type =2;\n}",
+        "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    \n    o.params.type =2;\n    \n    o.params._add_everyone = 1;\n}",
         "load" : "function (_self, records, options)\n{\n    var sm = _this.grid.getSelectionModel();\n        if (!sm.getSelections().length) {\n            sm.selectFirstRow();\n        }\n        Pman.Tab.AdminContacts.grid.footer.onClick('first');\n}"
        },
        "xtype" : "Store",
@@ -53,9 +53,9 @@
        "* prop" : "dataSource",
        "items" : [
         {
-         "$ url" : "baseURL + '/Roo/Groups.php'",
-         "xtype" : "HttpProxy",
+         "$ url" : "baseURL + '/Roo/core_group'",
          "method" : "GET",
+         "xtype" : "HttpProxy",
          "$ 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",
-       "width" : 200,
        "header" : "Name",
+       "width" : 200,
        "$ 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[]",