Pman.Tab.AdminContactsGroup.bjs
authoredward <edward@roojs.com>
Fri, 19 Aug 2016 06:13:46 +0000 (14:13 +0800)
committeredward <edward@roojs.com>
Fri, 19 Aug 2016 06:13:46 +0000 (14:13 +0800)
Pman.Tab.AdminContactsGroup.js

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

index e533db8..3399afd 100644 (file)
@@ -9,19 +9,19 @@
   "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
   "a37ede293936e29279ed543129451ec3" : "Groups",
   "7dce122004969d56ae2e0245cb754d35" : "Edit",
+  "b891a85b57a6261132a613eabd235f32" : "Manage Groups????",
   "4d1c8263ba1036754f8db14a98f9f006" : "Reload",
   "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
-  "49ee3087348e8d44e1feda1917443987" : "Name",
-  "aba9f7d7443652e858969bfc280690b1" : "Manage Groups"
+  "49ee3087348e8d44e1feda1917443987" : "Name"
  },
  "items" : [
   {
    "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,
@@ -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/Groups.php'",
-         "method" : "GET",
          "xtype" : "HttpProxy",
+         "method" : "GET",
          "$ xns" : "Roo.data",
          "* prop" : "proxy"
         },
@@ -76,7 +76,7 @@
        "* prop" : "toolbar",
        "items" : [
         {
-         "text" : "Manage Groups",
+         "text" : "Manage Groups????",
          "xtype" : "Button",
          "$ xns" : "Roo.Toolbar",
          "items" : [
       },
       {
        "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 d92291d..b6411e1 100644 (file)
@@ -10,10 +10,10 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
   'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
   'a37ede293936e29279ed543129451ec3' :"Groups",
   '7dce122004969d56ae2e0245cb754d35' :"Edit",
+  'b891a85b57a6261132a613eabd235f32' :"Manage Groups????",
   '4d1c8263ba1036754f8db14a98f9f006' :"Reload",
   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
-  '49ee3087348e8d44e1feda1917443987' :"Name",
-  'aba9f7d7443652e858969bfc280690b1' :"Manage Groups"
+  '49ee3087348e8d44e1feda1917443987' :"Name"
  },
 
   part     :  ["Admin", "ContactsGroup" ],
@@ -28,15 +28,13 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
    var _this = this;
    var MODULE = this;
    return {
+   xtype : 'GridPanel',
    background : true,
    fitContainer : true,
    fitToframe : true,
    region : 'west',
    tableName : 'Groups',
    title : _this._strings['a37ede293936e29279ed543129451ec3'] /* Groups */,
-   xns : Roo,
-   '|xns' : 'Roo',
-   xtype : 'GridPanel',
    listeners : {
     activate : function() {
          _this.panel = this;
@@ -45,14 +43,14 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
          }
      }
    },
+   xns : Roo,
+   '|xns' : 'Roo',
    grid : {
+    xtype : 'Grid',
     autoExpandColumn : 'name',
     ddGroup : 'groupDD',
     enableDrop : true,
     loadMask : true,
-    xns : Roo.grid,
-    '|xns' : 'Roo.grid',
-    xtype : 'Grid',
     listeners : {
      render : function() 
       {
@@ -76,28 +74,28 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
           }); 
       }
     },
+    xns : Roo.grid,
+    '|xns' : 'Roo.grid',
     toolbar : {
+     xtype : 'Toolbar',
      xns : Roo,
      '|xns' : 'Roo',
-     xtype : 'Toolbar',
      items  : [
       {
-       text : _this._strings['aba9f7d7443652e858969bfc280690b1'] /* Manage Groups */,
+       xtype : 'Button',
+       text : _this._strings['b891a85b57a6261132a613eabd235f32'] /* Manage Groups???? */,
        xns : Roo.Toolbar,
        '|xns' : 'Roo.Toolbar',
-       xtype : 'Button',
        menu : {
+        xtype : 'Menu',
         xns : Roo.menu,
         '|xns' : 'Roo.menu',
-        xtype : 'Menu',
         items  : [
          {
+          xtype : 'Item',
           cls : 'x-btn-text-icon',
           icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
           text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
-          xns : Roo.menu,
-          '|xns' : 'Roo.menu',
-          xtype : 'Item',
           listeners : {
            click : function()
             {
@@ -108,15 +106,15 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
                      _this.grid.ds.load({});
                }); 
             }
-          }
+          },
+          xns : Roo.menu,
+          '|xns' : 'Roo.menu'
          },
          {
+          xtype : 'Item',
           cls : 'x-btn-text-icon',
           icon : Roo.rootURL + 'images/default/tree/leaf.gif',
           text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
-          xns : Roo.menu,
-          '|xns' : 'Roo.menu',
-          xtype : 'Item',
           listeners : {
            click : function()
             {
@@ -136,38 +134,40 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
                 }); 
                 
             }
-          }
+          },
+          xns : Roo.menu,
+          '|xns' : 'Roo.menu'
          },
          {
+          xtype : 'Item',
           cls : 'x-btn-text-icon',
           icon : rootURL + '/Pman/templates/images/trash.gif',
           text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
-          xns : Roo.menu,
-          '|xns' : 'Roo.menu',
-          xtype : 'Item',
           listeners : {
            click : function()
             {
                  Pman.genericDelete(_this, 'Groups'); 
             }
-          }
+          },
+          xns : Roo.menu,
+          '|xns' : 'Roo.menu'
          },
          {
+          xtype : 'Separator',
           xns : Roo.menu,
-          '|xns' : 'Roo.menu',
-          xtype : 'Separator'
+          '|xns' : 'Roo.menu'
          },
          {
-          text : _this._strings['4d1c8263ba1036754f8db14a98f9f006'] /* Reload */,
-          xns : Roo.menu,
-          '|xns' : 'Roo.menu',
           xtype : 'Item',
+          text : _this._strings['4d1c8263ba1036754f8db14a98f9f006'] /* Reload */,
           listeners : {
            click : function (_self, e)
             {
               _this.grid.ds.load({});
             }
-          }
+          },
+          xns : Roo.menu,
+          '|xns' : 'Roo.menu'
          }
         ]
        }
@@ -175,11 +175,9 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
      ]
     },
     dataSource : {
+     xtype : 'Store',
      remoteSort : true,
      sortInfo : { field : 'name', direction: 'ASC' },
-     xns : Roo.data,
-     '|xns' : 'Roo.data',
-     xtype : 'Store',
      listeners : {
       beforeload : function (_self, o)
        {
@@ -195,14 +193,17 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
                Pman.Tab.AdminContacts.grid.footer.onClick('first');
        }
      },
+     xns : Roo.data,
+     '|xns' : 'Roo.data',
      proxy : {
+      xtype : 'HttpProxy',
       method : 'GET',
       url : baseURL + '/Roo/Groups.php',
       xns : Roo.data,
-      '|xns' : 'Roo.data',
-      xtype : 'HttpProxy'
+      '|xns' : 'Roo.data'
      },
      reader : {
+      xtype : 'JsonReader',
       fields : [
           {
               'name': 'id',
@@ -289,15 +290,12 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
       root : 'data',
       totalProperty : 'total',
       xns : Roo.data,
-      '|xns' : 'Roo.data',
-      xtype : 'JsonReader'
+      '|xns' : 'Roo.data'
      }
     },
     dropTarget : {
-     ddGroup : 'groupDD',
-     xns : Roo.dd,
-     '|xns' : 'Roo.dd',
      xtype : 'DropTarget',
+     ddGroup : 'groupDD',
      listeners : {
       drop : function (source, e, data)
        {
@@ -411,13 +409,13 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
        //    Roo.log('add'); 
            //}
        }
-     }
+     },
+     xns : Roo.dd,
+     '|xns' : 'Roo.dd'
     },
     sm : {
-     singleSelect : true,
-     xns : Roo.grid,
-     '|xns' : 'Roo.grid',
      xtype : 'RowSelectionModel',
+     singleSelect : true,
      listeners : {
       afterselectionchange : function (_self)
        {
@@ -426,10 +424,13 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
            c.getActivePanel().grid.footer.onClick('first');
            
        }
-     }
+     },
+     xns : Roo.grid,
+     '|xns' : 'Roo.grid'
     },
     colModel : [
      {
+      xtype : 'ColumnModel',
       dataIndex : 'name',
       header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
       renderer : function(v,x,r) { 
@@ -456,8 +457,7 @@ Pman.Tab.AdminContactsGroup = new Roo.XComponent({
       },
       width : 200,
       xns : Roo.grid,
-      '|xns' : 'Roo.grid',
-      xtype : 'ColumnModel'
+      '|xns' : 'Roo.grid'
      }
     ]
    }