Fix #6685 - more changes as per inspection master xls
authorAlan Knowles <alan@roojs.com>
Tue, 27 Apr 2021 09:52:36 +0000 (17:52 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 27 Apr 2021 09:52:36 +0000 (17:52 +0800)
Pman.Dialog.AdminPerson.bjs [new file with mode: 0644]
Pman.Dialog.AdminPerson.js [new file with mode: 0644]
Pman.Tab.AdminContacts.bjs
Pman.Tab.AdminContacts.js
Pman.Tab.AdminSettings.bjs [new file with mode: 0644]
Pman.Tab.AdminSettings.js [new file with mode: 0644]
Pman.Tab.Group_Members.js
Pman.Tab.PersonStaff.js
old/Pman.Tab.AdminPermManager.bjs
old/Pman.Tab.AdminPermManager.js

diff --git a/Pman.Dialog.AdminPerson.bjs b/Pman.Dialog.AdminPerson.bjs
new file mode 100644 (file)
index 0000000..f42f1c2
--- /dev/null
@@ -0,0 +1,361 @@
+{
+ "name" : "Pman.Dialog.AdminPerson",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminPerson.bjs",
+ "permname" : "",
+ "modOrder" : "001",
+ "strings" : {
+  "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
+  "7573b7fd7836c9118dbfb69f3abf3858" : "Change / Set Password",
+  "abb1d799e06329cb0c38276ea918300b" : "Secure passwords",
+  "2b0d7f748b64304e6657207cb03cd8f2" : "Edit / Create Staff Details",
+  "7e17f8478e121357b78646ca5b5d5ac9" : "Displaying Settings  {0} - {1} of {2}",
+  "bcc254b55c4a1babdf1dcb82c207506b" : "Phone",
+  "1243daf593fa297e07ab03bf06d925af" : "Searching...",
+  "3544848f820b9d94a3f3871a382cf138" : "New password",
+  "689202409e48743b914713f96d93947c" : "Value",
+  "8a25a3ae30ab6e8ceb5b8c4009a3336f" : "Role / Position",
+  "be5f40c0d2692cf4e9f8be8d389737a5" : "Department / Office",
+  "315fce99b77b7f392bf68d5eb14f88c7" : "Password (type again to confirm)",
+  "ea4788705e6873b424c65e91c2846b19" : "Cancel",
+  "e4709a73a287a5f033f5b1b5142cb74d" : "System Settings",
+  "49ee3087348e8d44e1feda1917443987" : "Name",
+  "a5da1d5de4f3a80e2acf5227283c630d" : "Staff Details",
+  "c373dd4bd4ba0b5d3e0c7522c5629880" : "Select Office",
+  "662de0725ac8055bff7edae51fbf3c78" : "No Settings Found",
+  "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
+  "e55f75a29310d7b60f7ac1d390c8ae42" : "Module",
+  "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
+  "c9cc8cce247e49bae79f15173ce97354" : "Save"
+ },
+ "named_strings" : {
+  "secure_password_fieldLabel" : "abb1d799e06329cb0c38276ea918300b",
+  "role_fieldLabel" : "8a25a3ae30ab6e8ceb5b8c4009a3336f",
+  "name_fieldLabel" : "49ee3087348e8d44e1feda1917443987",
+  "office_id_name_emptyText" : "be5f40c0d2692cf4e9f8be8d389737a5",
+  "phone_fieldLabel" : "bcc254b55c4a1babdf1dcb82c207506b",
+  "passwd1_fieldLabel" : "315fce99b77b7f392bf68d5eb14f88c7",
+  "office_id_name_fieldLabel" : "be5f40c0d2692cf4e9f8be8d389737a5",
+  "office_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
+  "email_fieldLabel" : "ce8ae9da5b7cd6c3df2929543a9af92d",
+  "office_id_name_qtip" : "c373dd4bd4ba0b5d3e0c7522c5629880"
+ },
+ "items" : [
+  {
+   "Boolean modal" : true,
+   "collapsible" : false,
+   "title" : "Edit / Create Staff Details",
+   "xtype" : "LayoutDialog",
+   "width" : 450,
+   "$ xns" : "Roo",
+   "closable" : false,
+   "resizable" : false,
+   "height" : 400,
+   "items" : [
+    {
+     "xtype" : "LayoutRegion",
+     "$ xns" : "Roo",
+     "* prop" : "center"
+    },
+    {
+     "region" : "center",
+     "xtype" : "ContentPanel",
+     "$ xns" : "Roo",
+     "String title" : "Staff Details",
+     "items" : [
+      {
+       "listeners" : {
+        "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        _this.dialog.layout.getRegion('center').showPanel(0);\n       //_this.dialog.el.mask(\"Loading\");\n       if ( _this.data.id* 1 > 0) { \n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n            return;\n        }\n        this.form.findField('company_id').setValue(Pman.Login.authUser.company_id);\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
+        "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
+       },
+       "$ url" : "baseURL + '/Roo/core_person'",
+       "xtype" : "Form",
+       "method" : "POST",
+       "style" : "margin:10px;",
+       "$ xns" : "Roo.form",
+       "Number labelWidth" : 120,
+       "items" : [
+        {
+         "fieldLabel" : "Name",
+         "xtype" : "TextField",
+         "allowBlank" : true,
+         "width" : 250,
+         "$ xns" : "Roo.form",
+         "name" : "name"
+        },
+        {
+         "fieldLabel" : "Email",
+         "xtype" : "TextField",
+         "allowBlank" : false,
+         "width" : 250,
+         "$ xns" : "Roo.form",
+         "name" : "email"
+        },
+        {
+         "fieldLabel" : "Role / Position",
+         "xtype" : "TextField",
+         "width" : 250,
+         "$ xns" : "Roo.form",
+         "name" : "role"
+        },
+        {
+         "fieldLabel" : "Phone",
+         "xtype" : "TextField",
+         "width" : 150,
+         "$ xns" : "Roo.form",
+         "name" : "phone"
+        },
+        {
+         "xtype" : "Hidden",
+         "$ xns" : "Roo.form",
+         "name" : "company_id"
+        },
+        {
+         "listeners" : {
+          "beforequery" : "function (combo, query, forceAll, cancel, e)\n{\n        var coid = _this.form.findField('company_id').getValue();\n        if (coid < 1 ) {\n            Ext.MessageBox.alert(\"Error\", \"Select An Company First\");\n            return false;\n        }\n}"
+         },
+         "listWidth" : 400,
+         "triggerAction" : "all",
+         "fieldLabel" : "Department / Office",
+         "forceSelection" : true,
+         "selectOnFocus" : true,
+         "pageSize" : 20,
+         "displayField" : "name",
+         "emptyText" : "Department / Office",
+         "hiddenName" : "office_id",
+         "minChars" : 2,
+         "valueField" : "id",
+         "xtype" : "ComboBox",
+         "allowBlank" : true,
+         "typeAhead" : true,
+         "editable" : false,
+         "width" : 250,
+         "$ xns" : "Roo.form",
+         "name" : "office_id_name",
+         "qtip" : "Select Office",
+         "queryParam" : "query[name]",
+         "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
+         "loadingText" : "Searching...",
+         "items" : [
+          {
+           "listeners" : {
+            "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    var coid = _this.form.findField('company_id').getValue();\n    o.params.company_id = coid;\n}\n"
+           },
+           "xtype" : "Store",
+           "remoteSort" : true,
+           "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
+           "$ xns" : "Roo.data",
+           "* prop" : "store",
+           "items" : [
+            {
+             "$ url" : "baseURL + '/Roo/core_office'",
+             "xtype" : "HttpProxy",
+             "method" : "GET",
+             "$ xns" : "Roo.data",
+             "* prop" : "proxy"
+            },
+            {
+             "id" : "id",
+             "root" : "data",
+             "xtype" : "JsonReader",
+             "$ xns" : "Roo.data",
+             "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
+             "* prop" : "reader",
+             "totalProperty" : "total"
+            }
+           ]
+          }
+         ]
+        },
+        {
+         "xtype" : "Hidden",
+         "$ xns" : "Roo.form",
+         "name" : "id"
+        },
+        {
+         "xtype" : "FieldSet",
+         "$ xns" : "Roo.form",
+         "String legend" : "Change / Set Password",
+         "String/Object/Function style" : "width:370px",
+         "Number labelWidth" : 200,
+         "items" : [
+          {
+           "fieldLabel" : "New password",
+           "xtype" : "SecurePass",
+           "string inputType" : "password",
+           "width" : 150,
+           "$ xns" : "Roo.form",
+           "name" : "passwd1"
+          },
+          {
+           "fieldLabel" : "Password (type again to confirm)",
+           "xtype" : "TextField",
+           "allowBlank" : true,
+           "String inputType" : "password",
+           "width" : 150,
+           "$ xns" : "Roo.form",
+           "name" : "passwd1"
+          },
+          {
+           "listeners" : {
+            "check" : "function (_self, checked)\n{\n    this.form.findField('passwd1').insecure = false;\n        \n    if(!checked){\n        this.form.findField('passwd1').insecure = true;\n    }\n}"
+           },
+           "String name" : "secure_password",
+           "Boolean checked" : true,
+           "xtype" : "Checkbox",
+           "String valueOff" : 0,
+           "$ xns" : "Roo.form",
+           "String fieldLabel" : "Secure passwords",
+           "String inputValue" : 1
+          }
+         ]
+        }
+       ]
+      }
+     ]
+    },
+    {
+     "listeners" : {
+      "|activate" : "function() {\n    _this.panel = this;\n \n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
+     },
+     "region" : "center",
+     "fitToframe" : true,
+     "background" : true,
+     "title" : "System Settings",
+     "xtype" : "GridPanel",
+     "fitContainer" : true,
+     "$ xns" : "Roo",
+     "items" : [
+      {
+       "listeners" : {
+        "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) {\n         return;\n     }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('refresh');\n    }); \n}\n",
+        "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
+       },
+       "autoExpandColumn" : "data",
+       "xtype" : "Grid",
+       "loadMask" : true,
+       "$ xns" : "Roo.grid",
+       "* prop" : "grid",
+       "items" : [
+        {
+         "listeners" : {
+          "beforeload" : "function (_self, o)\n{\n  \n    o.params = o.params ? o.params : {};\n    o.params.person_id =  _this.form.findField('id').getValue();\n    \n   \n}"
+         },
+         "xtype" : "Store",
+         "remoteSort" : true,
+         "$ sortInfo" : "{ field : 'name', direction: 'ASC' }",
+         "$ xns" : "Roo.data",
+         "* prop" : "dataSource",
+         "items" : [
+          {
+           "$ url" : "baseURL + '/Roo/core_person_settings'",
+           "method" : "GET",
+           "xtype" : "HttpProxy",
+           "$ xns" : "Roo.data",
+           "* prop" : "proxy"
+          },
+          {
+           "id" : "id",
+           "root" : "data",
+           "xtype" : "JsonReader",
+           "$ xns" : "Roo.data",
+           "* prop" : "reader",
+           "totalProperty" : "total"
+          }
+         ]
+        },
+        {
+         "pageSize" : 25,
+         "xtype" : "PagingToolbar",
+         "emptyMsg" : "No Settings Found",
+         "$ xns" : "Roo",
+         "displayMsg" : "Displaying Settings  {0} - {1} of {2}",
+         "displayInfo" : true,
+         "* prop" : "footer"
+        },
+        {
+         "xtype" : "Toolbar",
+         "$ xns" : "Roo",
+         "* prop" : "toolbar",
+         "items" : [
+          {
+           "xtype" : "Fill",
+           "$ xns" : "Roo.Toolbar"
+          },
+          {
+           "listeners" : {
+            "|click" : "function()\n{\n     Pman.genericDelete(_this, 'core_person_settings'); \n}\n        "
+           },
+           "text" : "Delete",
+           "xtype" : "Button",
+           "cls" : "x-btn-text-icon",
+           "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+           "$ xns" : "Roo.Toolbar"
+          }
+         ]
+        },
+        {
+         "xtype" : "ColumnModel",
+         "sortable" : true,
+         "header" : "Module",
+         "width" : 120,
+         "$ xns" : "Roo.grid",
+         "* prop" : "colModel[]",
+         "dataIndex" : "scope"
+        },
+        {
+         "xtype" : "ColumnModel",
+         "sortable" : true,
+         "header" : "Description",
+         "width" : 150,
+         "$ renderer" : "function(v) { return String.format('{0}', v); }",
+         "$ xns" : "Roo.grid",
+         "* prop" : "colModel[]",
+         "dataIndex" : "description"
+        },
+        {
+         "xtype" : "ColumnModel",
+         "sortable" : true,
+         "header" : "Value",
+         "width" : 200,
+         "$ renderer" : "function(v) { return String.format('{0}', v); }",
+         "$ xns" : "Roo.grid",
+         "* prop" : "colModel[]",
+         "dataIndex" : "data"
+        },
+        {
+         "listeners" : {
+          "afterselectionchange" : "function (_self)\n{\n    // load project members.\n}"
+         },
+         "xtype" : "RowSelectionModel",
+         "singleSelect" : true,
+         "$ xns" : "Roo.grid",
+         "* prop" : "sm"
+        }
+       ]
+      }
+     ]
+    },
+    {
+     "listeners" : {
+      "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
+     },
+     "text" : "Cancel",
+     "xtype" : "Button",
+     "$ xns" : "Roo",
+     "* prop" : "buttons[]"
+    },
+    {
+     "listeners" : {
+      "click" : "function (_self, e)\n{\n    // do some checks?\n     if (this.form.findField('passwd1')) {\n        \n        var p1 = this.form.findField('passwd1').getValue();\n        var p2 = this.form.findField('passwd2').getValue();\n        \n        if (this.sendAfterSave && !p1.length) {\n            Ext.MessageBox.alert(\"Error\", \"You must create a password to send introduction mail\");\n            return;\n        }\n        \n        if (Pman.Login.authUser.id < 0 && !p1.length) {\n            Ext.MessageBox.alert(\"Error\", \"You must create a password for the admin account\");\n            return;\n        }\n        \n        \n        if (p1.length || p2.length) {\n            if (p1 != p2) {\n                Ext.MessageBox.alert(\"Error\", \"Passwords do not match\");\n                return;\n            }\n        }\n        \n    \n    }\n    \n \n    _this.form.doAction(\"submit\");\n\n}"
+     },
+     "text" : "Save",
+     "xtype" : "Button",
+     "$ xns" : "Roo",
+     "* prop" : "buttons[]"
+    }
+   ]
+  }
+ ]
+}
\ No newline at end of file
diff --git a/Pman.Dialog.AdminPerson.js b/Pman.Dialog.AdminPerson.js
new file mode 100644 (file)
index 0000000..9f43bbd
--- /dev/null
@@ -0,0 +1,513 @@
+//<script type="text/javascript">
+
+// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+
+Roo.namespace('Pman.Dialog');
+
+Pman.Dialog.AdminPerson = {
+
+ _strings : {
+  'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
+  '7573b7fd7836c9118dbfb69f3abf3858' :"Change / Set Password",
+  'abb1d799e06329cb0c38276ea918300b' :"Secure passwords",
+  '2b0d7f748b64304e6657207cb03cd8f2' :"Edit / Create Staff Details",
+  '7e17f8478e121357b78646ca5b5d5ac9' :"Displaying Settings  {0} - {1} of {2}",
+  'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
+  '1243daf593fa297e07ab03bf06d925af' :"Searching...",
+  '3544848f820b9d94a3f3871a382cf138' :"New password",
+  '689202409e48743b914713f96d93947c' :"Value",
+  '8a25a3ae30ab6e8ceb5b8c4009a3336f' :"Role / Position",
+  'be5f40c0d2692cf4e9f8be8d389737a5' :"Department / Office",
+  '315fce99b77b7f392bf68d5eb14f88c7' :"Password (type again to confirm)",
+  'ea4788705e6873b424c65e91c2846b19' :"Cancel",
+  'e4709a73a287a5f033f5b1b5142cb74d' :"System Settings",
+  '49ee3087348e8d44e1feda1917443987' :"Name",
+  'a5da1d5de4f3a80e2acf5227283c630d' :"Staff Details",
+  'c373dd4bd4ba0b5d3e0c7522c5629880' :"Select Office",
+  '662de0725ac8055bff7edae51fbf3c78' :"No Settings Found",
+  'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
+  'e55f75a29310d7b60f7ac1d390c8ae42' :"Module",
+  'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
+  'c9cc8cce247e49bae79f15173ce97354' :"Save"
+ },
+ _named_strings : {
+  'secure_password_fieldLabel' : 'abb1d799e06329cb0c38276ea918300b' /* Secure passwords */ ,
+  'role_fieldLabel' : '8a25a3ae30ab6e8ceb5b8c4009a3336f' /* Role / Position */ ,
+  'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
+  'office_id_name_emptyText' : 'be5f40c0d2692cf4e9f8be8d389737a5' /* Department / Office */ ,
+  'phone_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
+  'passwd1_fieldLabel' : '315fce99b77b7f392bf68d5eb14f88c7' /* Password (type again to confirm) */ ,
+  'office_id_name_fieldLabel' : 'be5f40c0d2692cf4e9f8be8d389737a5' /* Department / Office */ ,
+  'office_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
+  'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
+  'office_id_name_qtip' : 'c373dd4bd4ba0b5d3e0c7522c5629880' /* Select Office */ 
+ },
+
+ dialog : false,
+ callback:  false,
+
+ show : function(data, cb)
+ {
+  if (!this.dialog) {
+   this.create();
+  }
+
+  this.callback = cb;
+  this.data = data;
+  this.dialog.show(this.data._el);
+  if (this.form) {
+   this.form.reset();
+   this.form.setValues(data);
+   this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
+  }
+
+ },
+
+ create : function()
+ {
+   var _this = this;
+   this.dialog = Roo.factory({
+    xtype : 'LayoutDialog',
+    closable : false,
+    collapsible : false,
+    height : 400,
+    modal : true,
+    resizable : false,
+    title : _this._strings['2b0d7f748b64304e6657207cb03cd8f2'] /* Edit / Create Staff Details */,
+    width : 450,
+    xns : Roo,
+    '|xns' : 'Roo',
+    center : {
+     xtype : 'LayoutRegion',
+     xns : Roo,
+     '|xns' : 'Roo'
+    },
+    buttons : [
+     {
+      xtype : 'Button',
+      text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
+      listeners : {
+       click : function (_self, e)
+        {
+            _this.dialog.hide();
+        }
+      },
+      xns : Roo,
+      '|xns' : 'Roo'
+     },
+     {
+      xtype : 'Button',
+      text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
+      listeners : {
+       click : function (_self, e)
+        {
+            // do some checks?
+             if (this.form.findField('passwd1')) {
+                
+                var p1 = this.form.findField('passwd1').getValue();
+                var p2 = this.form.findField('passwd2').getValue();
+                
+                if (this.sendAfterSave && !p1.length) {
+                    Ext.MessageBox.alert("Error", "You must create a password to send introduction mail");
+                    return;
+                }
+                
+                if (Pman.Login.authUser.id < 0 && !p1.length) {
+                    Ext.MessageBox.alert("Error", "You must create a password for the admin account");
+                    return;
+                }
+                
+                
+                if (p1.length || p2.length) {
+                    if (p1 != p2) {
+                        Ext.MessageBox.alert("Error", "Passwords do not match");
+                        return;
+                    }
+                }
+                
+            
+            }
+            
+         
+            _this.form.doAction("submit");
+        
+        }
+      },
+      xns : Roo,
+      '|xns' : 'Roo'
+     }
+    ],
+    items  : [
+     {
+      xtype : 'ContentPanel',
+      region : 'center',
+      title : _this._strings['a5da1d5de4f3a80e2acf5227283c630d'] /* Staff Details */,
+      xns : Roo,
+      '|xns' : 'Roo',
+      items  : [
+       {
+        xtype : 'Form',
+        labelWidth : 120,
+        method : 'POST',
+        style : 'margin:10px;',
+        url : baseURL + '/Roo/core_person',
+        listeners : {
+         actioncomplete : function(_self,action)
+          {
+              if (action.type == 'setdata') {
+                  _this.dialog.layout.getRegion('center').showPanel(0);
+                 //_this.dialog.el.mask("Loading");
+                 if ( _this.data.id* 1 > 0) { 
+                      this.load({ method: 'GET', params: { '_id' : _this.data.id }});
+                      return;
+                  }
+                  this.form.findField('company_id').setValue(Pman.Login.authUser.company_id);
+                 return;
+              }
+              if (action.type == 'load') {
+                  _this.dialog.el.unmask();
+                  return;
+              }
+              if (action.type =='submit') {
+              
+                  _this.dialog.el.unmask();
+                  _this.dialog.hide();
+              
+                   if (_this.callback) {
+                      _this.callback.call(_this, _this.form.getValues());
+                   }
+                   _this.form.reset();
+                   return;
+              }
+          },
+         rendered : function (form)
+          {
+              _this.form= form;
+          }
+        },
+        xns : Roo.form,
+        '|xns' : 'Roo.form',
+        items  : [
+         {
+          xtype : 'TextField',
+          allowBlank : true,
+          fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
+          name : 'name',
+          width : 250,
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
+         {
+          xtype : 'TextField',
+          allowBlank : false,
+          fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
+          name : 'email',
+          width : 250,
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
+         {
+          xtype : 'TextField',
+          fieldLabel : _this._strings['8a25a3ae30ab6e8ceb5b8c4009a3336f'] /* Role / Position */,
+          name : 'role',
+          width : 250,
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
+         {
+          xtype : 'TextField',
+          fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
+          name : 'phone',
+          width : 150,
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
+         {
+          xtype : 'Hidden',
+          name : 'company_id',
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
+         {
+          xtype : 'ComboBox',
+          allowBlank : true,
+          displayField : 'name',
+          editable : false,
+          emptyText : _this._strings['be5f40c0d2692cf4e9f8be8d389737a5'] /* Department / Office */,
+          fieldLabel : _this._strings['be5f40c0d2692cf4e9f8be8d389737a5'] /* Department / Office */,
+          forceSelection : true,
+          hiddenName : 'office_id',
+          listWidth : 400,
+          loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+          minChars : 2,
+          name : 'office_id_name',
+          pageSize : 20,
+          qtip : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
+          queryParam : 'query[name]',
+          selectOnFocus : true,
+          tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
+          triggerAction : 'all',
+          typeAhead : true,
+          valueField : 'id',
+          width : 250,
+          listeners : {
+           beforequery : function (combo, query, forceAll, cancel, e)
+            {
+                    var coid = _this.form.findField('company_id').getValue();
+                    if (coid < 1 ) {
+                        Ext.MessageBox.alert("Error", "Select An Company First");
+                        return false;
+                    }
+            }
+          },
+          xns : Roo.form,
+          '|xns' : 'Roo.form',
+          store : {
+           xtype : 'Store',
+           remoteSort : true,
+           sortInfo : { direction : 'ASC', field: 'id' },
+           listeners : {
+            beforeload : function (_self, o){
+                 o.params = o.params || {};
+                 var coid = _this.form.findField('company_id').getValue();
+                 o.params.company_id = coid;
+             }
+           },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
+           proxy : {
+            xtype : 'HttpProxy',
+            method : 'GET',
+            url : baseURL + '/Roo/core_office',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           },
+           reader : {
+            xtype : 'JsonReader',
+            fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
+            id : 'id',
+            root : 'data',
+            totalProperty : 'total',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           }
+          }
+         },
+         {
+          xtype : 'Hidden',
+          name : 'id',
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
+         },
+         {
+          xtype : 'FieldSet',
+          labelWidth : 200,
+          legend : _this._strings['7573b7fd7836c9118dbfb69f3abf3858'] /* Change / Set Password */,
+          style : 'width:370px',
+          xns : Roo.form,
+          '|xns' : 'Roo.form',
+          items  : [
+           {
+            xtype : 'SecurePass',
+            fieldLabel : _this._strings['3544848f820b9d94a3f3871a382cf138'] /* New password */,
+            inputType : 'password',
+            name : 'passwd1',
+            width : 150,
+            xns : Roo.form,
+            '|xns' : 'Roo.form'
+           },
+           {
+            xtype : 'TextField',
+            allowBlank : true,
+            fieldLabel : _this._strings['315fce99b77b7f392bf68d5eb14f88c7'] /* Password (type again to confirm) */,
+            inputType : 'password',
+            name : 'passwd1',
+            width : 150,
+            xns : Roo.form,
+            '|xns' : 'Roo.form'
+           },
+           {
+            xtype : 'Checkbox',
+            checked : true,
+            fieldLabel : _this._strings['abb1d799e06329cb0c38276ea918300b'] /* Secure passwords */,
+            inputValue : 1,
+            name : 'secure_password',
+            valueOff : 0,
+            listeners : {
+             check : function (_self, checked)
+              {
+                  this.form.findField('passwd1').insecure = false;
+                      
+                  if(!checked){
+                      this.form.findField('passwd1').insecure = true;
+                  }
+              }
+            },
+            xns : Roo.form,
+            '|xns' : 'Roo.form'
+           }
+          ]
+         }
+        ]
+       }
+      ]
+     },
+     {
+      xtype : 'GridPanel',
+      background : true,
+      fitContainer : true,
+      fitToframe : true,
+      region : 'center',
+      title : _this._strings['e4709a73a287a5f033f5b1b5142cb74d'] /* System Settings */,
+      listeners : {
+       activate : function() {
+            _this.panel = this;
+         
+            if (_this.grid) {
+                _this.grid.footer.onClick('first');
+            }
+        }
+      },
+      xns : Roo,
+      '|xns' : 'Roo',
+      grid : {
+       xtype : 'Grid',
+       autoExpandColumn : 'data',
+       loadMask : true,
+       listeners : {
+        render : function() 
+         {
+             _this.grid = this; 
+             //_this.dialog = Pman.Dialog.FILL_IN
+             if (_this.panel.active) {
+                this.footer.onClick('first');
+             }
+         },
+        rowdblclick : function (_self, rowIndex, e)
+         {
+             if (!_this.dialog) {
+                  return;
+              }
+             _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
+                 _this.grid.footer.onClick('refresh');
+             }); 
+         }
+       },
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
+       footer : {
+        xtype : 'PagingToolbar',
+        displayInfo : true,
+        displayMsg : _this._strings['7e17f8478e121357b78646ca5b5d5ac9'] /* Displaying Settings  {0} - {1} of {2} */,
+        emptyMsg : _this._strings['662de0725ac8055bff7edae51fbf3c78'] /* No Settings Found */,
+        pageSize : 25,
+        xns : Roo,
+        '|xns' : 'Roo'
+       },
+       toolbar : {
+        xtype : 'Toolbar',
+        xns : Roo,
+        '|xns' : 'Roo',
+        items  : [
+         {
+          xtype : 'Fill',
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar'
+         },
+         {
+          xtype : 'Button',
+          cls : 'x-btn-text-icon',
+          icon : rootURL + '/Pman/templates/images/trash.gif',
+          text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
+          listeners : {
+           click : function()
+            {
+                 Pman.genericDelete(_this, 'core_person_settings'); 
+            }
+          },
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar'
+         }
+        ]
+       },
+       dataSource : {
+        xtype : 'Store',
+        remoteSort : true,
+        sortInfo : { field : 'name', direction: 'ASC' },
+        listeners : {
+         beforeload : function (_self, o)
+          {
+            
+              o.params = o.params ? o.params : {};
+              o.params.person_id =  _this.form.findField('id').getValue();
+              
+             
+          }
+        },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
+        proxy : {
+         xtype : 'HttpProxy',
+         method : 'GET',
+         url : baseURL + '/Roo/core_person_settings',
+         xns : Roo.data,
+         '|xns' : 'Roo.data'
+        },
+        reader : {
+         xtype : 'JsonReader',
+         id : 'id',
+         root : 'data',
+         totalProperty : 'total',
+         xns : Roo.data,
+         '|xns' : 'Roo.data'
+        }
+       },
+       sm : {
+        xtype : 'RowSelectionModel',
+        singleSelect : true,
+        listeners : {
+         afterselectionchange : function (_self)
+          {
+              // load project members.
+          }
+        },
+        xns : Roo.grid,
+        '|xns' : 'Roo.grid'
+       },
+       colModel : [
+        {
+         xtype : 'ColumnModel',
+         dataIndex : 'scope',
+         header : _this._strings['e55f75a29310d7b60f7ac1d390c8ae42'] /* Module */,
+         sortable : true,
+         width : 120,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid'
+        },
+        {
+         xtype : 'ColumnModel',
+         dataIndex : 'description',
+         header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
+         renderer : function(v) { return String.format('{0}', v); },
+         sortable : true,
+         width : 150,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid'
+        },
+        {
+         xtype : 'ColumnModel',
+         dataIndex : 'data',
+         header : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
+         renderer : function(v) { return String.format('{0}', v); },
+         sortable : true,
+         width : 200,
+         xns : Roo.grid,
+         '|xns' : 'Roo.grid'
+        }
+       ]
+      }
+     }
+    ]
+   });
+ }
+};
index 1c947d4..b479ed4 100644 (file)
@@ -54,8 +54,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",
-      "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}"
+      "|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}"
      },
      "autoExpandColumn" : "name",
      "xtype" : "Grid",
@@ -78,8 +78,8 @@
        "items" : [
         {
          "$ url" : "baseURL + '/Roo/core_person'",
-         "method" : "GET",
          "xtype" : "HttpProxy",
+         "method" : "GET",
          "$ xns" : "Roo.data",
          "* prop" : "proxy"
         },
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_company'",
-             "method" : "GET",
              "xtype" : "HttpProxy",
+             "method" : "GET",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Role",
        "width" : 100,
+       "header" : "Role",
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Phone",
        "width" : 100,
+       "header" : "Phone",
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
        "$ renderer" : "function(v) { return String.format('{0}', v); }",
        "$ xns" : "Roo.grid",
        "* prop" : "colModel[]",
+       "Boolean hidden" : true,
        "dataIndex" : "fax"
       },
       {
       },
       {
        "xtype" : "ColumnModel",
-       "header" : "Active",
        "width" : 75,
+       "header" : "Active",
        "$ 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 8d37e53..7dec582 100644 (file)
@@ -595,6 +595,7 @@ Pman.Tab.AdminContacts = new Roo.XComponent({
       xtype : 'ColumnModel',
       dataIndex : 'fax',
       header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
+      hidden : true,
       renderer : function(v) { return String.format('{0}', v); },
       width : 100,
       xns : Roo.grid,
diff --git a/Pman.Tab.AdminSettings.bjs b/Pman.Tab.AdminSettings.bjs
new file mode 100644 (file)
index 0000000..5fdddf6
--- /dev/null
@@ -0,0 +1,151 @@
+{
+ "name" : "Pman.Tab.AdminSettings",
+ "parent" : "Pman.Tab.Admin",
+ "title" : "",
+ "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminSettings.bjs",
+ "permname" : "",
+ "modOrder" : "600",
+ "strings" : {
+  "7e17f8478e121357b78646ca5b5d5ac9" : "Displaying Settings  {0} - {1} of {2}",
+  "689202409e48743b914713f96d93947c" : "Value",
+  "e4709a73a287a5f033f5b1b5142cb74d" : "System Settings",
+  "662de0725ac8055bff7edae51fbf3c78" : "No Settings Found",
+  "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
+  "e55f75a29310d7b60f7ac1d390c8ae42" : "Module",
+  "49ee3087348e8d44e1feda1917443987" : "Name",
+  "b5a7adde1af5c87d7fd797b6245c2a39" : "Description"
+ },
+ "items" : [
+  {
+   "listeners" : {
+    "|activate" : "function() {\n    _this.panel = this;\n \n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
+   },
+   "fitToframe" : true,
+   "background" : true,
+   "region" : "center",
+   "title" : "System Settings",
+   "xtype" : "GridPanel",
+   "fitContainer" : true,
+   "$ xns" : "Roo",
+   "items" : [
+    {
+     "listeners" : {
+      "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) {\n         return;\n     }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('refresh');\n    }); \n}\n",
+      "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
+     },
+     "autoExpandColumn" : "val",
+     "xtype" : "Grid",
+     "loadMask" : true,
+     "$ xns" : "Roo.grid",
+     "* prop" : "grid",
+     "items" : [
+      {
+       "listeners" : {
+        "beforeload" : "function (_self, o)\n{\n  \n    o.params = o.params ? o.params : {};\n    \n   \n}"
+       },
+       "xtype" : "Store",
+       "remoteSort" : true,
+       "$ sortInfo" : "{ field : 'name', direction: 'ASC' }",
+       "$ xns" : "Roo.data",
+       "* prop" : "dataSource",
+       "items" : [
+        {
+         "$ url" : "baseURL + '/Roo/core_setting'",
+         "xtype" : "HttpProxy",
+         "method" : "GET",
+         "$ xns" : "Roo.data",
+         "* prop" : "proxy"
+        },
+        {
+         "id" : "id",
+         "root" : "data",
+         "xtype" : "JsonReader",
+         "$ xns" : "Roo.data",
+         "* prop" : "reader",
+         "totalProperty" : "total"
+        }
+       ]
+      },
+      {
+       "pageSize" : 25,
+       "xtype" : "PagingToolbar",
+       "emptyMsg" : "No Settings Found",
+       "$ xns" : "Roo",
+       "displayMsg" : "Displaying Settings  {0} - {1} of {2}",
+       "displayInfo" : true,
+       "* prop" : "footer"
+      },
+      {
+       "xtype" : "Toolbar",
+       "$ xns" : "Roo",
+       "* prop" : "toolbar",
+       "items" : [
+        {
+         "xtype" : "Fill",
+         "$ xns" : "Roo.Toolbar"
+        },
+        {
+         "listeners" : {
+          "|click" : "function()\n{\n     Pman.genericDelete(_this, 'core_setting'); \n}\n        "
+         },
+         "text" : "Delete",
+         "xtype" : "Button",
+         "cls" : "x-btn-text-icon",
+         "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+         "$ xns" : "Roo.Toolbar"
+        }
+       ]
+      },
+      {
+       "xtype" : "ColumnModel",
+       "sortable" : true,
+       "header" : "Module",
+       "width" : 120,
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "module"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "width" : 150,
+       "header" : "Name",
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "name"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "sortable" : true,
+       "header" : "Description",
+       "width" : 150,
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "description"
+      },
+      {
+       "xtype" : "ColumnModel",
+       "sortable" : true,
+       "header" : "Value",
+       "width" : 200,
+       "$ renderer" : "function(v) { return String.format('{0}', v); }",
+       "$ xns" : "Roo.grid",
+       "* prop" : "colModel[]",
+       "dataIndex" : "val"
+      },
+      {
+       "listeners" : {
+        "afterselectionchange" : "function (_self)\n{\n    // load project members.\n}"
+       },
+       "xtype" : "RowSelectionModel",
+       "singleSelect" : true,
+       "$ xns" : "Roo.grid",
+       "* prop" : "sm"
+      }
+     ]
+    }
+   ]
+  }
+ ]
+}
\ No newline at end of file
diff --git a/Pman.Tab.AdminSettings.js b/Pman.Tab.AdminSettings.js
new file mode 100644 (file)
index 0000000..e59d8d7
--- /dev/null
@@ -0,0 +1,194 @@
+//<script type="text/javascript">
+
+// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+
+Roo.namespace('Pman.Tab');
+
+Pman.Tab.AdminSettings = new Roo.XComponent({
+
+ _strings : {
+  '7e17f8478e121357b78646ca5b5d5ac9' :"Displaying Settings  {0} - {1} of {2}",
+  '689202409e48743b914713f96d93947c' :"Value",
+  'e4709a73a287a5f033f5b1b5142cb74d' :"System Settings",
+  '662de0725ac8055bff7edae51fbf3c78' :"No Settings Found",
+  'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
+  'e55f75a29310d7b60f7ac1d390c8ae42' :"Module",
+  '49ee3087348e8d44e1feda1917443987' :"Name",
+  'b5a7adde1af5c87d7fd797b6245c2a39' :"Description"
+ },
+
+  part     :  ["Admin", "Settings" ],
+  order    : '600-Pman.Tab.AdminSettings',
+  region   : 'center',
+  parent   : 'Pman.Tab.Admin',
+  name     : "unnamed module",
+  disabled : false, 
+  permname : '', 
+  _tree : function(_data)
+  {
+   var _this = this;
+   var MODULE = this;
+   return {
+   xtype : 'GridPanel',
+   background : true,
+   fitContainer : true,
+   fitToframe : true,
+   region : 'center',
+   title : _this._strings['e4709a73a287a5f033f5b1b5142cb74d'] /* System Settings */,
+   listeners : {
+    activate : function() {
+         _this.panel = this;
+      
+         if (_this.grid) {
+             _this.grid.footer.onClick('first');
+         }
+     }
+   },
+   xns : Roo,
+   '|xns' : 'Roo',
+   grid : {
+    xtype : 'Grid',
+    autoExpandColumn : 'val',
+    loadMask : true,
+    listeners : {
+     render : function() 
+      {
+          _this.grid = this; 
+          //_this.dialog = Pman.Dialog.FILL_IN
+          if (_this.panel.active) {
+             this.footer.onClick('first');
+          }
+      },
+     rowdblclick : function (_self, rowIndex, e)
+      {
+          if (!_this.dialog) {
+               return;
+           }
+          _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
+              _this.grid.footer.onClick('refresh');
+          }); 
+      }
+    },
+    xns : Roo.grid,
+    '|xns' : 'Roo.grid',
+    footer : {
+     xtype : 'PagingToolbar',
+     displayInfo : true,
+     displayMsg : _this._strings['7e17f8478e121357b78646ca5b5d5ac9'] /* Displaying Settings  {0} - {1} of {2} */,
+     emptyMsg : _this._strings['662de0725ac8055bff7edae51fbf3c78'] /* No Settings Found */,
+     pageSize : 25,
+     xns : Roo,
+     '|xns' : 'Roo'
+    },
+    toolbar : {
+     xtype : 'Toolbar',
+     xns : Roo,
+     '|xns' : 'Roo',
+     items  : [
+      {
+       xtype : 'Fill',
+       xns : Roo.Toolbar,
+       '|xns' : 'Roo.Toolbar'
+      },
+      {
+       xtype : 'Button',
+       cls : 'x-btn-text-icon',
+       icon : rootURL + '/Pman/templates/images/trash.gif',
+       text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
+       listeners : {
+        click : function()
+         {
+              Pman.genericDelete(_this, 'core_setting'); 
+         }
+       },
+       xns : Roo.Toolbar,
+       '|xns' : 'Roo.Toolbar'
+      }
+     ]
+    },
+    dataSource : {
+     xtype : 'Store',
+     remoteSort : true,
+     sortInfo : { field : 'name', direction: 'ASC' },
+     listeners : {
+      beforeload : function (_self, o)
+       {
+         
+           o.params = o.params ? o.params : {};
+           
+          
+       }
+     },
+     xns : Roo.data,
+     '|xns' : 'Roo.data',
+     proxy : {
+      xtype : 'HttpProxy',
+      method : 'GET',
+      url : baseURL + '/Roo/core_setting',
+      xns : Roo.data,
+      '|xns' : 'Roo.data'
+     },
+     reader : {
+      xtype : 'JsonReader',
+      id : 'id',
+      root : 'data',
+      totalProperty : 'total',
+      xns : Roo.data,
+      '|xns' : 'Roo.data'
+     }
+    },
+    sm : {
+     xtype : 'RowSelectionModel',
+     singleSelect : true,
+     listeners : {
+      afterselectionchange : function (_self)
+       {
+           // load project members.
+       }
+     },
+     xns : Roo.grid,
+     '|xns' : 'Roo.grid'
+    },
+    colModel : [
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'module',
+      header : _this._strings['e55f75a29310d7b60f7ac1d390c8ae42'] /* Module */,
+      sortable : true,
+      width : 120,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'name',
+      header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 150,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'description',
+      header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
+      renderer : function(v) { return String.format('{0}', v); },
+      sortable : true,
+      width : 150,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     },
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'val',
+      header : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
+      renderer : function(v) { return String.format('{0}', v); },
+      sortable : true,
+      width : 200,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     }
+    ]
+   }
+  };  }
+});
index f30f4db..2965064 100644 (file)
@@ -64,7 +64,8 @@ Pman.Tab.Group_Members = new  Pman.Tab.PersonList({
     },
     
     dialog: function () {
-        return Pman.Dialog.PersonStaff;
+        return Pman.Dialog.AdminPerson;
+        //return Pman.Dialog.PersonStaff;
     },
     bulkAdd : function() {
         //return Pman.Dialog.PersonBulkAdd
index 6d05cd6..69e87f8 100644 (file)
@@ -65,7 +65,8 @@ Pman.Tab.PersonStaff = new  Pman.Tab.PersonList({
     },
     
     dialog: function () {
-        return Pman.Dialog.PersonStaff;
+        return Pman.Dialog.AdminPerson;
+        //return Pman.Dialog.PersonStaff;
     },
     bulkAdd : function() {
         //return Pman.Dialog.PersonBulkAdd
index 97d173b..d8a5b9c 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Tab.AdminPermManager",
  "parent" : "Pman.Tab.Admin",
  "title" : "Pman.Tab.AdminPermManager",
- "path" : "/home/edward/gitlive/Pman.Admin/old/Pman.Tab.AdminPermManager.bjs",
+ "path" : "/home/alan/gitlive/Pman.Admin/old/Pman.Tab.AdminPermManager.bjs",
  "permname" : "Core.Groups",
  "modOrder" : "700",
  "strings" : {
      "items" : [
       {
        "xtype" : "LayoutRegion",
-       "$ xns" : "Roo",
        "tabPosition" : "top",
+       "$ xns" : "Roo",
        "* prop" : "center"
       },
       {
        "xtype" : "LayoutRegion",
-       "$ xns" : "Roo",
        "width" : 200,
+       "$ xns" : "Roo",
        "* prop" : "west"
       },
       {
        "listeners" : {
         "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.ds.load({});\n    }\n}"
        },
+       "background" : true,
        "region" : "west",
        "fitToframe" : true,
-       "background" : true,
        "title" : "Groups",
        "xtype" : "GridPanel",
        "fitContainer" : true,
@@ -59,8 +59,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",
@@ -79,8 +79,8 @@
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_group.php'",
-             "xtype" : "HttpProxy",
              "method" : "GET",
+             "xtype" : "HttpProxy",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
           },
           {
            "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[]",
           },
           {
            "listeners" : {
-            "over" : "function (source, e, data)\n{\n    // Roo.log(\"dragover\");\n     \n    //Roo.log(e);\n    var t = Roo.lib.Event.getTarget(e); \n       //  Roo.log(t);\n    var ri = _this.grid.view.findRowIndex(t);\n      //            Roo.log(ri);\n    \n    var rid  = false;\n    if (ri !== false) {\n        rid = _this.grid.getDataSource().getAt(ri).data;\n    }\n    \n    var s = _this.grid.getSelectionModel().getSelections();\n    \n    var isFromGroup = s.length ? s[0].data.id > 0 : false;\n    \n    var isToGroup = rid && rid.id > 0;\n    \n//    Roo.log(\"isToGroup:\"  + isToGroup + \", isFromGroup\" + isFromGroup);\n     \n    if (isFromGroup && isToGroup) {\n        this.valid = false;\n//        Roo.log('not valid');\n        return;\n    }\n    if (!isFromGroup && !isToGroup) {\n        this.valid = false;\n//        Roo.log('not valid');\n        return  \n    }\n    if (isFromGroup && !isToGroup) {\n        this.valid = 'ok-sub'; \n        return;\n    } \n    //if (!isFromGroup && isToGroup) {\n    this.valid = 'ok-add';\n//    Roo.log('add'); \n    //}\n}",
-            "drop" : "function (source, e, data)\n{\n    // Roo.log(\"DROP\");\n    var t = Roo.lib.Event.getTarget(e); \n    var ri = _this.grid.view.findRowIndex(t);\n    var rid  = false;\n    if (ri !== false) {\n        rid = _this.grid.getDataSource().getAt(ri).data;\n    }\n    var s = _this.grid.getSelectionModel().getSelections();\n      \n    //console.log(data);\n    var isFromGroup = s.length ? s[0].data.id > 0 : false;\n\n    var isToGroup = rid && rid.id > 0;\n    this.success = false;\n    if (isFromGroup && isToGroup) {\n        return;\n    }\n    if (!isFromGroup && !isToGroup) {\n        return;\n    }\n    var action = 'add';\n    if (isFromGroup && !isToGroup) {\n        action = 'sub';\n        //return 'x-dd-drop-ok-sub'; \n    }\n    // build a list of selections.\n    var sels = [];\n    for (var i=0; i < data.selections.length; i++) {\n        sels.push(data.selections[i].data.id);\n    }\n\n    Pman.request({\n        url: baseURL + '/Core/GroupMembers.php',\n        params: {\n            action : action,\n            group_id: action =='add' ? rid.id : s[0].data.id,\n            type: _this.type,\n            user_ids : sels.join(',')\n            \n        },  \n        method: 'POST',  \n        success : function(data) {\n            //refreshPager();\n            // \n            // do we need to do anything??\n            if (isFromGroup) {\n                Pman.Tab.AdminPermMembers.grid.footer.onClick('refresh');\n            }\n        }, \n        \n        failure: function() {\n            //Ext.get(document.body).unmask();\n            //if (cb) {\n            //    cb.call(false);\n            //}\n             \n        }\n    });\n\n    this.success = true;\n\n    //if (!isFromGroup && isToGroup) {\n        //return 'x-dd-drop-ok-add'; \n    return;\n    //}\n}"
+            "over" : "function (source, e, data)\n{\n     Roo.log(\"dragover\");\n     \n    //Roo.log(e);\n    var t = Roo.lib.Event.getTarget(e); \n       //  Roo.log(t);\n    var ri = _this.grid.view.findRowIndex(t);\n      //            Roo.log(ri);\n    \n    var rid  = false;\n    if (ri !== false) {\n        rid = _this.grid.getDataSource().getAt(ri).data;\n    }\n    \n    var s = _this.grid.getSelectionModel().getSelections();\n    \n    var isFromGroup = s.length ? s[0].data.id > 0 : false;\n    \n    var isToGroup = rid && rid.id > 0;\n    \n//    Roo.log(\"isToGroup:\"  + isToGroup + \", isFromGroup\" + isFromGroup);\n     \n    if (isFromGroup && isToGroup) {\n        this.valid = false;\n//        Roo.log('not valid');\n        return;\n    }\n    if (!isFromGroup && !isToGroup) {\n        this.valid = false;\n//        Roo.log('not valid');\n        return  \n    }\n    if (isFromGroup && !isToGroup) {\n        this.valid = 'ok-sub'; \n        return;\n    } \n    //if (!isFromGroup && isToGroup) {\n    this.valid = 'ok-add';\n//    Roo.log('add'); \n    //}\n}",
+            "drop" : "function (source, e, data)\n{\n      Roo.log(\"DROP\");\n    var t = Roo.lib.Event.getTarget(e); \n    var ri = _this.grid.view.findRowIndex(t);\n    var rid  = false;\n    if (ri !== false) {\n        rid = _this.grid.getDataSource().getAt(ri).data;\n    }\n    var s = _this.grid.getSelectionModel().getSelections();\n      \n    //console.log(data);\n    var isFromGroup = s.length ? s[0].data.id > 0 : false;\n\n    var isToGroup = rid && rid.id > 0;\n    this.success = false;\n    if (isFromGroup && isToGroup) {\n        return;\n    }\n    if (!isFromGroup && !isToGroup) {\n        return;\n    }\n    var action = 'add';\n    if (isFromGroup && !isToGroup) {\n        action = 'sub';\n        //return 'x-dd-drop-ok-sub'; \n    }\n    // build a list of selections.\n    var sels = [];\n    for (var i=0; i < data.selections.length; i++) {\n        sels.push(data.selections[i].data.id);\n    }\n\n    Pman.request({\n        url: baseURL + '/Core/GroupMembers.php',\n        params: {\n            action : action,\n            group_id: action =='add' ? rid.id : s[0].data.id,\n            type: _this.type,\n            user_ids : sels.join(',')\n            \n        },  \n        method: 'POST',  \n        success : function(data) {\n            //refreshPager();\n            // \n            // do we need to do anything??\n            if (isFromGroup) {\n                Pman.Tab.AdminPermMembers.grid.footer.onClick('refresh');\n            }\n        }, \n        \n        failure: function() {\n            //Ext.get(document.body).unmask();\n            //if (cb) {\n            //    cb.call(false);\n            //}\n             \n        }\n    });\n\n    this.success = true;\n\n    //if (!isFromGroup && isToGroup) {\n        //return 'x-dd-drop-ok-add'; \n    return;\n    //}\n}"
            },
            "xtype" : "DropTarget",
            "ddGroup" : "groupDD",
index a511c85..bdd15e0 100644 (file)
@@ -320,7 +320,7 @@ Pman.Tab.AdminPermManager = new Roo.XComponent({
         listeners : {
          drop : function (source, e, data)
           {
-              // Roo.log("DROP");
+                Roo.log("DROP");
               var t = Roo.lib.Event.getTarget(e); 
               var ri = _this.grid.view.findRowIndex(t);
               var rid  = false;
@@ -388,7 +388,7 @@ Pman.Tab.AdminPermManager = new Roo.XComponent({
           },
          over : function (source, e, data)
           {
-              // Roo.log("dragover");
+               Roo.log("dragover");
                
               //Roo.log(e);
               var t = Roo.lib.Event.getTarget(e);