sync
[Pman.Admin] / Pman.Tab.AdminLogDrill.bjs
index 7950bdb..637e31b 100644 (file)
 {
-    "id": "roo-file-265",
-    "name": "Pman.Tab.AdminLogDrill",
-    "parent": "Pman.Tab.AdminLogs",
-    "title": "Pman.Tab.AdminLogDrill",
-    "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminLogDrill.bjs",
-    "items": [
+ "name" : "Pman.Tab.AdminLogDrill",
+ "parent" : "Pman.Tab.AdminLogs",
+ "title" : "Pman.Tab.AdminLogDrill",
+ "path" : "/home/johns/gitlive/web.coba/Pman/Admin/Pman.Admin/Pman.Admin/Pman.Admin/Pman.Admin/Pman.Admin/Pman.Tab.AdminLogDrill.bjs",
+ "permname" : "",
+ "modOrder" : "003",
+ "strings" : {
+  "7a11042f53957727d8667732d7de1102" : "Ipaddr",
+  "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
+  "87f9f735a1d36793ceaecd4e47124b63" : "Events",
+  "490aa6e856ccf208a054389e47ce0d06" : "Id",
+  "739cea2b85156183f917f2ccaa10a50c" : "#ID",
+  "591933c26da312455c63b6bc1ec046bc" : "(function() { var d = new Date();d =  d.add(Date.MONTH, 1) ; return d.format('Y-m-01'); })()",
+  "d9578744f1d4b13d40a51fbb8b9d6ea5" : "Person name",
+  "e1edab2a061a49e21790204249b1aee9" : "(function() { var d = new Date(); return d.format('Y-m-01'); })()",
+  "1243daf593fa297e07ab03bf06d925af" : "Searching...",
+  "51c45b795d5d18a3e4e0c37e8b20a141" : "Table",
+  "6be4aa550791c310e098cd6c234af7d8" : "Event when",
+  "679308a758de538c5f39c4c6cdba6593" : "Select Affects",
+  "c112bb3542e98308d12d5ecb10a67abc" : "Changes",
+  "a254c25adc7d10d7e9c4889484f875a5" : "Detail",
+  "7205d42d6d975c911bc1147259d78935" : "Displaying Events{0} - {1} of {2}",
+  "39b9e051f9fe75e65c7a330bb00499d4" : "Date Range",
+  "a8929eb5c1553d3f70497f862d25d0ce" : "Select Action",
+  "004bf6c9a40003140292e97330236c53" : "Action",
+  "f971b3a2cc583b475332380649a4fa05" : "Daily summary",
+  "0668a37e3eb3480f0444f8da7bc446ba" : "Event Drilldown",
+  "b5fe0746885b906c8ed9b7cc06023c35" : "#Affected",
+  "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found"
+ },
+ "items" : [
+  {
+   "background" : true,
+   "region" : "center",
+   "title" : "Event Drilldown",
+   "xtype" : "NestedLayoutPanel",
+   "$ xns" : "Roo",
+   "items" : [
+    {
+     "xtype" : "Toolbar",
+     "$ xns" : "Roo",
+     "* prop" : "toolbar",
+     "items" : [
+      {
+       "text" : "Date Range",
+       "xtype" : "TextItem",
+       "$ xns" : "Roo.Toolbar"
+      },
+      {
+       "listeners" : {
+        "render" : "function (_self)\n{\n  _this.dateFrom = _self;\n}",
+        "change" : "function (_self, newValue, oldValue)\n{\n  _this.dategrid.ds.load({});\n}"
+       },
+       "format" : "Y-m-d",
+       "| value" : "(function() { var d = new Date(); return d.format('Y-m-01'); })()",
+       "xtype" : "DateField",
+       "$ xns" : "Roo.form"
+      },
+      {
+       "listeners" : {
+        "render" : "function (_self)\n{\n  _this.dateTo = _self;\n}",
+        "change" : "function (_self, newValue, oldValue)\n{\n  _this.dategrid.ds.load({});\n}"
+       },
+       "format" : "Y-m-d",
+       "xtype" : "DateField",
+       "| value" : "(function() { var d = new Date();d =  d.add(Date.MONTH, 1) ; return d.format('Y-m-01'); })()",
+       "$ xns" : "Roo.form"
+      },
+      {
+       "listeners" : {
+        "|render" : "function (_self)\n{\n  _this.actionSel = _self;\n}",
+        "|select" : "function (combo, record, index)\n{\n   _this.dategrid.ds.load({});\n}"
+       },
+       "listWidth" : 300,
+       "triggerAction" : "all",
+       "forceSelection" : true,
+       "selectOnFocus" : true,
+       "pageSize" : 20,
+       "displayField" : "action",
+       "emptyText" : "Select Action",
+       "minChars" : 2,
+       "valueField" : "action",
+       "xtype" : "ComboBox",
+       "allowBlank" : true,
+       "typeAhead" : true,
+       "editable" : true,
+       "width" : 150,
+       "$ xns" : "Roo.form",
+       "name" : "action",
+       "qtip" : "Select Action",
+       "queryParam" : "query[action]",
+       "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
+       "loadingText" : "Searching...",
+       "items" : [
         {
-            "region": "center",
-            "title": "Event Drilldown",
-            "xtype": "NestedLayoutPanel",
-            "|xns": "Roo",
-            "items": [
-                {
-                    "|xns": "Roo",
-                    "xtype": "BorderLayout",
-                    "*prop": "layout",
-                    "items": [
-                        {
-                            "*prop": "west",
-                            "split": true,
-                            "width": 270,
-                            "xtype": "LayoutRegion",
-                            "|xns": "Roo"
-                        },
-                        {
-                            "|xns": "Roo",
-                            "xtype": "LayoutRegion",
-                            "*prop": "center"
-                        },
-                        {
-                            "*prop": "east",
-                            "split": true,
-                            "tabPosition": "top",
-                            "width": 600,
-                            "xtype": "LayoutRegion",
-                            "|xns": "Roo"
-                        },
-                        {
-                            "listeners": {
-                                "|activate": "function() {\n    _this.datepanel = this;\n    if (_this.dategrid) {\n        _this.dategrid.ds.load({});\n    }\n}"
-                            },
-                            "background": true,
-                            "fitContainer": true,
-                            "fitToframe": true,
-                            "region": "west",
-                            "tableName": "Events",
-                            "title": "Events",
-                            "xtype": "GridPanel",
-                            "|xns": "Roo",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "|render": "function() \n{\n    _this.dategrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.ds.load({});\n    }\n}",
-                                        "rowclick": "function (_self, rowIndex, e)\n{\n    _this.tablegrid.footer.onClick('first');\n}"
-                                    },
-                                    "*prop": "grid",
-                                    "autoExpandColumn": "person_name",
-                                    "loadMask": true,
-                                    "xtype": "Grid",
-                                    "|xns": "Roo.grid",
-                                    "items": [
-                                        {
-                                            "listeners": {
-                                                "beforeload": "function (_self, o)\n{\n    if (! _this.dateFrom) {\n     return;\n    }\n    o.params = o.params || {};\n     \n    var act = _this.actionSel ? _this.actionSel.getValue() : '';\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel ? _this.affectSel.getValue() : '';\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n    \n    \n    \n    o.params['query[person_sum]'] = 1;\n    o.params._columns = 'person_id,person_id_name,person_id_email,qty';\n    o.params.limit = 999;\n \n}"
-                                            },
-                                            "*prop": "dataSource",
-                                            "remoteSort": true,
-                                            "xtype": "Store",
-                                            "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
-                                                {
-                                                    "*prop": "proxy",
-                                                    "xtype": "HttpProxy",
-                                                    "method": "GET",
-                                                    "|url": "baseURL + '/Roo/Events.php'",
-                                                    "|xns": "Roo.data"
-                                                },
-                                                {
-                                                    "|xns": "Roo.data",
-                                                    "xtype": "JsonReader",
-                                                    "totalProperty": "total",
-                                                    "root": "data",
-                                                    "*prop": "reader",
-                                                    "id": "id",
-                                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                }
-                                            ]
-                                        },
-                                        {
-                                            "*prop": "toolbar",
-                                            "xtype": "Toolbar",
-                                            "listeners": {},
-                                            "|xns": "Roo",
-                                            "items": [
-                                                {
-                                                    "text": "Date Range",
-                                                    "xtype": "TextItem",
-                                                    "|xns": "Roo.Toolbar"
-                                                },
-                                                {
-                                                    "listeners": {
-                                                        "render": "function (_self)\n{\n  _this.dateFrom = _self;\n}",
-                                                        "change": "function (_self, newValue, oldValue)\n{\n  _this.dategrid.ds.load({});\n}"
-                                                    },
-                                                    "format": "Y-m-d",
-                                                    "xtype": "DateField",
-                                                    "|value": "(function() { var d = new Date(); return d.format('Y-m-01'); })()",
-                                                    "|xns": "Roo.form"
-                                                },
-                                                {
-                                                    "listeners": {
-                                                        "render": "function (_self)\n{\n  _this.dateTo = _self;\n}",
-                                                        "change": "function (_self, newValue, oldValue)\n{\n  _this.dategrid.ds.load({});\n}"
-                                                    },
-                                                    "format": "Y-m-d",
-                                                    "|value": "(function() { var d = new Date();d =  d.add(Date.MONTH, 1) ; return d.format('Y-m-01'); })()",
-                                                    "xtype": "DateField",
-                                                    "|xns": "Roo.form"
-                                                }
-                                            ]
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "person_id_name",
-                                            "header": "Person name",
-                                            "sortable": true,
-                                            "width": 200,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v,x,r) {\n     return String.format('{0} &lt;<a href=\"mailto:{1}\">{1}</a>&gt;', v, r.data.person_id_email); \n }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "qty",
-                                            "header": "Changes",
-                                            "sortable": true,
-                                            "width": 70,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        }
-                                    ]
-                                }
-                            ]
-                        },
-                        {
-                            "listeners": {
-                                "|activate": "function() {\n    _this.tablepanel = this;\n    if (_this.tablegrid) {\n        _this.tablegrid.footer.onClick('first');\n    }\n}"
-                            },
-                            "background": true,
-                            "fitContainer": true,
-                            "fitToframe": true,
-                            "region": "center",
-                            "tableName": "Events",
-                            "title": "Events",
-                            "xtype": "GridPanel",
-                            "|xns": "Roo",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "|render": "function() \n{\n    _this.tablegrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.tablepanel.active) {\n       this.footer.onClick('first');\n    }\n}",
-                                        "rowclick": "function (_self, rowIndex, e)\n{\n    _this.detailgrid.footer.onClick('first');\n}"
-                                    },
-                                    "*prop": "grid",
-                                    "autoExpandColumn": "person_name",
-                                    "loadMask": true,
-                                    "xtype": "Grid",
-                                    "|xns": "Roo.grid",
-                                    "items": [
-                                        {
-                                            "listeners": {
-                                                "beforeload": "function (_self, o)\n{\n     if (! _this.dategrid) {\n     return;\n    }\n    \n    var s = _this.dategrid.selModel.getSelected();\n    if (!s) {\n        _this.tablegrid.view.el.mask(\"Select a person\");\n        return false;\n    }\n    _this.tablegrid.view.el.unmask();\n \n    o.params = o.params || {};\n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n \n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n    o.params.person_id = s.data.person_id;\n    o.params['query[table_sum]'] = 1;\n    o.params._columns = 'on_table,qty,uqty';\n\n    \n}"
-                                            },
-                                            "*prop": "dataSource",
-                                            "remoteSort": true,
-                                            "xtype": "Store",
-                                            "|sortInfo": "{ field : 'on_table', direction: 'ASC' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
-                                                {
-                                                    "*prop": "proxy",
-                                                    "xtype": "HttpProxy",
-                                                    "method": "GET",
-                                                    "|url": "baseURL + '/Roo/Events.php'",
-                                                    "|xns": "Roo.data"
-                                                },
-                                                {
-                                                    "|xns": "Roo.data",
-                                                    "xtype": "JsonReader",
-                                                    "totalProperty": "total",
-                                                    "root": "data",
-                                                    "*prop": "reader",
-                                                    "id": "id",
-                                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                }
-                                            ]
-                                        },
-                                        {
-                                            "*prop": "footer",
-                                            "xtype": "PagingToolbar",
-                                            "pageSize": 25,
-                                            "displayInfo": true,
-                                            "displayMsg": "Displaying Events{0} - {1} of {2}",
-                                            "emptyMsg": "No Events found",
-                                            "|xns": "Roo"
-                                        },
-                                        {
-                                            "*prop": "toolbar",
-                                            "xtype": "Toolbar",
-                                            "listeners": {},
-                                            "|xns": "Roo",
-                                            "items": [
-                                                {
-                                                    "listeners": {
-                                                        "|select": "function (combo, record, index)\n{\n   _this.dategrid.ds.load({});\n}",
-                                                        "|render": "function (_self)\n{\n  _this.actionSel = _self;\n}"
-                                                    },
-                                                    "allowBlank": true,
-                                                    "displayField": "action",
-                                                    "editable": false,
-                                                    "emptyText": "Select Action",
-                                                    "forceSelection": true,
-                                                    "listWidth": 300,
-                                                    "loadingText": "Searching...",
-                                                    "minChars": 2,
-                                                    "name": "action",
-                                                    "pageSize": 20,
-                                                    "qtip": "Select Action",
-                                                    "queryParam": "query[action]",
-                                                    "selectOnFocus": true,
-                                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
-                                                    "triggerAction": "all",
-                                                    "typeAhead": true,
-                                                    "valueField": "action",
-                                                    "width": 150,
-                                                    "xtype": "ComboBox",
-                                                    "|xns": "Roo.form",
-                                                    "items": [
-                                                        {
-                                                            "listeners": {
-                                                                "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    // staff can see all logs, other companies can only see their own.\n    if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n        o.params.company_id = Pman.Login.authUser.company_id;\n    }\n    o.params._distinct = 'action';\n    o.params._columns ='action';\n}"
-                                                            },
-                                                            "*prop": "store",
-                                                            "remoteSort": true,
-                                                            "xtype": "Store",
-                                                            "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
-                                                            "|xns": "Roo.data",
-                                                            "items": [
-                                                                {
-                                                                    "*prop": "proxy",
-                                                                    "method": "GET",
-                                                                    "xtype": "HttpProxy",
-                                                                    "|url": "baseURL + '/Roo/Events.php'",
-                                                                    "|xns": "Roo.data"
-                                                                },
-                                                                {
-                                                                    "|xns": "Roo.data",
-                                                                    "xtype": "JsonReader",
-                                                                    "totalProperty": "total",
-                                                                    "root": "data",
-                                                                    "*prop": "reader",
-                                                                    "id": "id",
-                                                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                                }
-                                                            ]
-                                                        }
-                                                    ]
-                                                },
-                                                {
-                                                    "listeners": {
-                                                        "|select": "function (combo, record, index)\n{\n   _this.dategrid.ds.load({});\n}",
-                                                        "|render": "function (_self)\n{\n  _this.affectSel = _self;\n}"
-                                                    },
-                                                    "allowBlank": true,
-                                                    "displayField": "on_table",
-                                                    "editable": false,
-                                                    "emptyText": "Select Affects",
-                                                    "forceSelection": true,
-                                                    "listWidth": 300,
-                                                    "loadingText": "Searching...",
-                                                    "minChars": 2,
-                                                    "name": "on_table",
-                                                    "pageSize": 20,
-                                                    "qtip": "Select Action",
-                                                    "queryParam": "query[on_table]",
-                                                    "selectOnFocus": true,
-                                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
-                                                    "triggerAction": "all",
-                                                    "typeAhead": true,
-                                                    "valueField": "action",
-                                                    "width": 150,
-                                                    "xtype": "ComboBox",
-                                                    "|xns": "Roo.form",
-                                                    "items": [
-                                                        {
-                                                            "listeners": {
-                                                                "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    // staff can see all logs, other companies can only see their own.\n    if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n        o.params.company_id = Pman.Login.authUser.company_id;\n    }\n    o.params._distinct = 'on_table';\n    o.params._columns ='on_table';\n}"
-                                                            },
-                                                            "*prop": "store",
-                                                            "remoteSort": true,
-                                                            "xtype": "Store",
-                                                            "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
-                                                            "|xns": "Roo.data",
-                                                            "items": [
-                                                                {
-                                                                    "*prop": "proxy",
-                                                                    "method": "GET",
-                                                                    "xtype": "HttpProxy",
-                                                                    "|url": "baseURL + '/Roo/Events.php'",
-                                                                    "|xns": "Roo.data"
-                                                                },
-                                                                {
-                                                                    "|xns": "Roo.data",
-                                                                    "xtype": "JsonReader",
-                                                                    "totalProperty": "total",
-                                                                    "root": "data",
-                                                                    "*prop": "reader",
-                                                                    "id": "id",
-                                                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                                }
-                                                            ]
-                                                        }
-                                                    ]
-                                                }
-                                            ]
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "on_table",
-                                            "header": "Table",
-                                            "sortable": true,
-                                            "width": 200,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "uqty",
-                                            "header": "#Affected",
-                                            "sortable": true,
-                                            "width": 70,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "qty",
-                                            "header": "Changes",
-                                            "sortable": true,
-                                            "width": 70,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        }
-                                    ]
-                                }
-                            ]
-                        },
-                        {
-                            "listeners": {
-                                "|activate": "function() {\n    _this.detailpanel = this;\n    if (_this.detailgrid) {\n        _this.detailgrid.footer.onClick('first');\n    }\n}"
-                            },
-                            "background": true,
-                            "fitContainer": true,
-                            "fitToframe": true,
-                            "region": "east",
-                            "tableName": "Events",
-                            "title": "Detail",
-                            "xtype": "GridPanel",
-                            "|xns": "Roo",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "|render": "function() \n{\n    _this.detailgrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.detailpanel.active) {\n       this.footer.onClick('first');\n    }\n}"
-                                    },
-                                    "*prop": "grid",
-                                    "autoExpandColumn": "person_name",
-                                    "loadMask": true,
-                                    "xtype": "Grid",
-                                    "|xns": "Roo.grid",
-                                    "items": [
-                                        {
-                                            "listeners": {
-                                                "beforeload": "function (_self, o)\n{\n     if (! _this.dategrid) {\n         return false;\n    }\n    \n    o.params = o.params || {};\n    \n    var s = _this.dategrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a person\");\n        return false;\n    }\n    \n    o.params.person_id = s.data.person_id;    \n    \n    var s = _this.tablegrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a table\");\n        return false;\n    }\n    o.params.on_table = s.data.on_table;        \n    \n    _this.detailgrid.view.el.unmask();\n \n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n     \n \n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n\n    //o.params['query[table_d]'] = 1;\n    //o.params._columns = 'on_table,qty,uqty';\n\n    \n}"
-                                            },
-                                            "*prop": "dataSource",
-                                            "remoteSort": true,
-                                            "xtype": "Store",
-                                            "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
-                                                {
-                                                    "*prop": "proxy",
-                                                    "xtype": "HttpProxy",
-                                                    "method": "GET",
-                                                    "|url": "baseURL + '/Roo/Events.php'",
-                                                    "|xns": "Roo.data"
-                                                },
-                                                {
-                                                    "|xns": "Roo.data",
-                                                    "xtype": "JsonReader",
-                                                    "totalProperty": "total",
-                                                    "root": "data",
-                                                    "*prop": "reader",
-                                                    "id": "id",
-                                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                }
-                                            ]
-                                        },
-                                        {
-                                            "*prop": "footer",
-                                            "xtype": "PagingToolbar",
-                                            "pageSize": 25,
-                                            "displayInfo": true,
-                                            "displayMsg": "Displaying Events{0} - {1} of {2}",
-                                            "emptyMsg": "No Events found",
-                                            "|xns": "Roo"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "id",
-                                            "header": "Id",
-                                            "width": 50,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "xtype": "ColumnModel",
-                                            "header": "Event when",
-                                            "width": 75,
-                                            "dataIndex": "event_when",
-                                            "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "action",
-                                            "header": "Action",
-                                            "width": 50,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "ipaddr",
-                                            "header": "Ipaddr",
-                                            "width": 100,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "on_id",
-                                            "header": "#ID",
-                                            "width": 75,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "xtype": "ColumnModel",
-                                            "header": "Remarks",
-                                            "width": 200,
-                                            "dataIndex": "remarks",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
-                                        }
-                                    ]
-                                }
-                            ]
-                        },
-                        {
-                            "listeners": {
-                                "|activate": "function() {\n    _this.daypanel = this;\n    if (_this.daygrid) {\n        _this.daygrid.footer.onClick('first');\n    }\n}"
-                            },
-                            "background": true,
-                            "fitContainer": true,
-                            "fitToframe": true,
-                            "region": "east",
-                            "tableName": "Events",
-                            "title": "Daily summary",
-                            "xtype": "GridPanel",
-                            "|xns": "Roo",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "|render": "function() \n{\n    _this.daygrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.daypanel.active) {\n       this.footer.onClick('first');\n    }\n}"
-                                    },
-                                    "*prop": "grid",
-                                    "autoExpandColumn": "person_name",
-                                    "loadMask": true,
-                                    "xtype": "Grid",
-                                    "|xns": "Roo.grid",
-                                    "items": [
-                                        {
-                                            "listeners": {
-                                                "beforeload": "function (_self, o)\n{\n     if (! _this.dategrid) {\n         return false;\n    }\n    \n    o.params = o.params || {};\n    \n    var s = _this.dategrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a person\");\n        return false;\n    }\n    \n    o.params.person_id = s.data.person_id;    \n    \n    var s = _this.tablegrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a table\");\n        return false;\n    }\n    o.params.on_table = s.data.on_table;        \n    \n    _this.detailgrid.view.el.unmask();\n \n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n     \n \n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n\n    o.params['query[day_sum]'] = 1;\n    o.params._columns = 'on_day,qty,uqty';\n\n    \n}"
-                                            },
-                                            "*prop": "dataSource",
-                                            "remoteSort": true,
-                                            "xtype": "Store",
-                                            "|sortInfo": "{ field : 'on_day', direction: 'ASC' }",
-                                            "|xns": "Roo.data",
-                                            "items": [
-                                                {
-                                                    "*prop": "proxy",
-                                                    "xtype": "HttpProxy",
-                                                    "method": "GET",
-                                                    "|url": "baseURL + '/Roo/Events.php'",
-                                                    "|xns": "Roo.data"
-                                                },
-                                                {
-                                                    "|xns": "Roo.data",
-                                                    "xtype": "JsonReader",
-                                                    "totalProperty": "total",
-                                                    "root": "data",
-                                                    "*prop": "reader",
-                                                    "id": "id",
-                                                    "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                }
-                                            ]
-                                        },
-                                        {
-                                            "*prop": "footer",
-                                            "xtype": "PagingToolbar",
-                                            "pageSize": 25,
-                                            "displayInfo": true,
-                                            "displayMsg": "Displaying Events{0} - {1} of {2}",
-                                            "emptyMsg": "No Events found",
-                                            "|xns": "Roo"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "on_day",
-                                            "header": "Event when",
-                                            "width": 75,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "uqty",
-                                            "header": "#Affected",
-                                            "sortable": true,
-                                            "width": 70,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "qty",
-                                            "header": "Changes",
-                                            "sortable": true,
-                                            "width": 70,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid"
-                                        }
-                                    ]
-                                }
-                            ]
-                        }
-                    ]
-                }
-            ]
+         "listeners" : {
+          "|beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    // staff can see all logs, other companies can only see their own.\n    if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n        o.params.company_id = Pman.Login.authUser.company_id;\n    }\n    o.params._distinct = 'action';\n    o.params._columns ='action';\n}"
+         },
+         "xtype" : "Store",
+         "remoteSort" : true,
+         "$ sortInfo" : "{ field : 'action' , direction : 'ASC' }",
+         "$ xns" : "Roo.data",
+         "* prop" : "store",
+         "items" : [
+          {
+           "$ url" : "baseURL + '/Roo/Events.php'",
+           "method" : "GET",
+           "xtype" : "HttpProxy",
+           "timeout" : 50000,
+           "$ xns" : "Roo.data",
+           "* prop" : "proxy"
+          },
+          {
+           "id" : "id",
+           "root" : "data",
+           "xtype" : "JsonReader",
+           "$ xns" : "Roo.data",
+           "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]",
+           "* prop" : "reader",
+           "totalProperty" : "total"
+          }
+         ]
         }
-    ],
-    "permname": "",
-    "modOrder": "003"
+       ]
+      },
+      {
+       "listeners" : {
+        "|render" : "function (_self)\n{\n  _this.affectSel = _self;\n}",
+        "|select" : "function (combo, record, index)\n{\n   _this.dategrid.ds.load({});\n}"
+       },
+       "listWidth" : 300,
+       "triggerAction" : "all",
+       "forceSelection" : true,
+       "selectOnFocus" : true,
+       "pageSize" : 20,
+       "displayField" : "on_table",
+       "emptyText" : "Select Affects",
+       "minChars" : 2,
+       "valueField" : "action",
+       "xtype" : "ComboBox",
+       "allowBlank" : true,
+       "typeAhead" : true,
+       "editable" : true,
+       "width" : 150,
+       "$ xns" : "Roo.form",
+       "name" : "on_table",
+       "qtip" : "Select Action",
+       "queryParam" : "query[on_table]",
+       "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
+       "loadingText" : "Searching...",
+       "items" : [
+        {
+         "listeners" : {
+          "|beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    // staff can see all logs, other companies can only see their own.\n    if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n        o.params.company_id = Pman.Login.authUser.company_id;\n    }\n    o.params._distinct = 'on_table';\n    o.params._columns ='on_table';\n}"
+         },
+         "xtype" : "Store",
+         "remoteSort" : true,
+         "$ sortInfo" : "{ field : 'on_table' , direction : 'ASC' }",
+         "$ xns" : "Roo.data",
+         "* prop" : "store",
+         "items" : [
+          {
+           "$ url" : "baseURL + '/Roo/Events.php'",
+           "method" : "GET",
+           "xtype" : "HttpProxy",
+           "timeout" : 60000,
+           "$ xns" : "Roo.data",
+           "* prop" : "proxy"
+          },
+          {
+           "id" : "id",
+           "root" : "data",
+           "xtype" : "JsonReader",
+           "$ xns" : "Roo.data",
+           "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]",
+           "* prop" : "reader",
+           "totalProperty" : "total"
+          }
+         ]
+        }
+       ]
+      }
+     ]
+    },
+    {
+     "xtype" : "BorderLayout",
+     "$ xns" : "Roo",
+     "* prop" : "layout",
+     "items" : [
+      {
+       "xtype" : "LayoutRegion",
+       "width" : 300,
+       "$ xns" : "Roo",
+       "split" : true,
+       "* prop" : "west"
+      },
+      {
+       "xtype" : "LayoutRegion",
+       "$ xns" : "Roo",
+       "* prop" : "center"
+      },
+      {
+       "xtype" : "LayoutRegion",
+       "tabPosition" : "top",
+       "width" : 600,
+       "$ xns" : "Roo",
+       "split" : true,
+       "* prop" : "east"
+      },
+      {
+       "listeners" : {
+        "|activate" : "function() {\n    _this.datepanel = this;\n    if (_this.dategrid) {\n        _this.dategrid.ds.load({});\n    }\n}"
+       },
+       "fitToframe" : true,
+       "background" : false,
+       "region" : "west",
+       "title" : "Events",
+       "xtype" : "GridPanel",
+       "fitContainer" : true,
+       "$ xns" : "Roo",
+       "tableName" : "Events",
+       "items" : [
+        {
+         "listeners" : {
+          "|render" : "function() \n{\n    _this.dategrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.ds.load({});\n    }\n}",
+          "rowclick" : "function (_self, rowIndex, e)\n{\n    _this.tablegrid.footer.onClick('first');\n}"
+         },
+         "autoExpandColumn" : "person_name",
+         "xtype" : "Grid",
+         "loadMask" : true,
+         "$ xns" : "Roo.grid",
+         "* prop" : "grid",
+         "items" : [
+          {
+           "listeners" : {
+            "beforeload" : "function (_self, o)\n{\n    \n    \n    if (! _this.dateFrom) {\n        return;\n    }\n\n     try {\n         _this.tablegrid.ds.removeAll();\n         _this.panel.layout.getRegion('east').getActivePanel().grid.ds.removeAll();\n         \n    } catch (e) {\n        // do nothing..\n    }\n    o.params = o.params || {};\n     \n    var act = _this.actionSel ? _this.actionSel.getValue() : '';\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel ? _this.affectSel.getValue() : '';\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n    \n    \n    \n    o.params['query[person_sum]'] = 1;\n    o.params._columns = 'person_id,person_id_name,person_id_email,qty,uqty';\n    o.params.limit = 999;\n \n}"
+           },
+           "xtype" : "Store",
+           "remoteSort" : true,
+           "$ sortInfo" : "{ field : 'person_id_name', direction: 'ASC' }",
+           "$ xns" : "Roo.data",
+           "* prop" : "dataSource",
+           "items" : [
+            {
+             "$ url" : "baseURL + '/Roo/Events.php'",
+             "method" : "GET",
+             "xtype" : "HttpProxy",
+             "$ xns" : "Roo.data",
+             "* prop" : "proxy"
+            },
+            {
+             "id" : "id",
+             "root" : "data",
+             "xtype" : "JsonReader",
+             "$ xns" : "Roo.data",
+             "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]",
+             "* prop" : "reader",
+             "totalProperty" : "total"
+            }
+           ]
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Person name",
+           "width" : 200,
+           "$ renderer" : "function(v,x,r) {\n     return String.format('{0} &lt;<a href=\"mailto:{1}\">{1}</a>&gt;', v, r.data.person_id_email); \n }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "person_id_name"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "#Affected",
+           "width" : 70,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "uqty"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Changes",
+           "width" : 70,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "qty"
+          }
+         ]
+        }
+       ]
+      },
+      {
+       "listeners" : {
+        "|activate" : "function() {\n    _this.tablepanel = this;\n    if (_this.tablegrid) {\n        _this.tablegrid.footer.onClick('first');\n    }\n}"
+       },
+       "fitToframe" : true,
+       "background" : false,
+       "region" : "center",
+       "title" : "Events",
+       "xtype" : "GridPanel",
+       "fitContainer" : true,
+       "$ xns" : "Roo",
+       "tableName" : "Events",
+       "items" : [
+        {
+         "listeners" : {
+          "|render" : "function() \n{\n    _this.tablegrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.tablepanel.active) {\n       this.footer.onClick('first');\n    }\n}",
+          "rowclick" : "function (_self, rowIndex, e)\n{\n \n    _this.panel.layout.getRegion('east').getActivePanel().grid.footer.onClick('first');\n}"
+         },
+         "autoExpandColumn" : "person_name",
+         "xtype" : "Grid",
+         "loadMask" : true,
+         "$ xns" : "Roo.grid",
+         "* prop" : "grid",
+         "items" : [
+          {
+           "listeners" : {
+            "beforeload" : "function (_self, o)\n{\n     if (! _this.dategrid) {\n     return;\n    }\n    try {\n         _this.panel.layout.getRegion('east').getActivePanel().grid.ds.removeAll();\n         \n    } catch (e) {\n        // do nothing..\n    }\n    \n    var s = _this.dategrid.selModel.getSelected();\n    if (!s) {\n        _this.tablegrid.view.el.mask(\"Select a person\");\n        return false;\n    }\n    _this.tablegrid.view.el.unmask();\n \n    o.params = o.params || {};\n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n \n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n    o.params.person_id = s.data.person_id;\n    o.params['query[table_sum]'] = 1;\n    o.params._columns = 'on_table,qty,uqty';\n\n    \n}"
+           },
+           "xtype" : "Store",
+           "remoteSort" : true,
+           "$ sortInfo" : "{ field : 'on_table', direction: 'ASC' }",
+           "$ xns" : "Roo.data",
+           "* prop" : "dataSource",
+           "items" : [
+            {
+             "$ url" : "baseURL + '/Roo/Events.php'",
+             "method" : "GET",
+             "xtype" : "HttpProxy",
+             "$ xns" : "Roo.data",
+             "* prop" : "proxy"
+            },
+            {
+             "id" : "id",
+             "root" : "data",
+             "xtype" : "JsonReader",
+             "$ xns" : "Roo.data",
+             "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]",
+             "* prop" : "reader",
+             "totalProperty" : "total"
+            }
+           ]
+          },
+          {
+           "pageSize" : 25,
+           "xtype" : "PagingToolbar",
+           "emptyMsg" : "No Events found",
+           "$ xns" : "Roo",
+           "displayInfo" : true,
+           "displayMsg" : "Displaying Events{0} - {1} of {2}",
+           "* prop" : "footer"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Table",
+           "width" : 200,
+           "$ renderer" : "function(v) { \n    if (!v.length) {\n        return \"Login / Logout / Errors\";\n    }\n    return String.format('{0}', v); \n}",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "on_table"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "#Affected",
+           "width" : 70,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "uqty"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Changes",
+           "width" : 70,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "qty"
+          }
+         ]
+        }
+       ]
+      },
+      {
+       "listeners" : {
+        "|activate" : "function() {\n    _this.detailpanel = this;\n    if (_this.detailgrid) {\n        _this.detailgrid.footer.onClick('first');\n    }\n}"
+       },
+       "fitToframe" : true,
+       "background" : true,
+       "region" : "east",
+       "title" : "Detail",
+       "xtype" : "GridPanel",
+       "fitContainer" : true,
+       "$ xns" : "Roo",
+       "tableName" : "Events",
+       "items" : [
+        {
+         "listeners" : {
+          "|render" : "function() \n{\n    _this.detailgrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.detailpanel.active) {\n       this.footer.onClick('first');\n    }\n}"
+         },
+         "autoExpandColumn" : "person_name",
+         "xtype" : "Grid",
+         "loadMask" : true,
+         "$ xns" : "Roo.grid",
+         "* prop" : "grid",
+         "items" : [
+          {
+           "listeners" : {
+            "beforeload" : "function (_self, o)\n{\n     if (! _this.dategrid) {\n         return false;\n    }\n    \n    o.params = o.params || {};\n    \n    var s = _this.dategrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a person\");\n        return false;\n    }\n    \n    o.params.person_id = s.data.person_id;    \n    \n    var s = _this.tablegrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a table\");\n        return false;\n    }\n    o.params.on_table = s.data.on_table;        \n    \n    _this.detailgrid.view.el.unmask();\n \n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n     \n \n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n\n    //o.params['query[table_d]'] = 1;\n    //o.params._columns = 'on_table,qty,uqty';\n\n    \n}"
+           },
+           "xtype" : "Store",
+           "remoteSort" : true,
+           "$ sortInfo" : "{ field : 'event_when', direction: 'DESC' }",
+           "$ xns" : "Roo.data",
+           "* prop" : "dataSource",
+           "items" : [
+            {
+             "$ url" : "baseURL + '/Roo/Events.php'",
+             "method" : "GET",
+             "xtype" : "HttpProxy",
+             "$ xns" : "Roo.data",
+             "* prop" : "proxy"
+            },
+            {
+             "id" : "id",
+             "root" : "data",
+             "xtype" : "JsonReader",
+             "$ xns" : "Roo.data",
+             "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]",
+             "* prop" : "reader",
+             "totalProperty" : "total"
+            }
+           ]
+          },
+          {
+           "pageSize" : 25,
+           "xtype" : "PagingToolbar",
+           "emptyMsg" : "No Events found",
+           "$ xns" : "Roo",
+           "displayInfo" : true,
+           "displayMsg" : "Displaying Events{0} - {1} of {2}",
+           "* prop" : "footer"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Id",
+           "width" : 50,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "id"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "width" : 75,
+           "header" : "Event when",
+           "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "event_when"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Action",
+           "width" : 50,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "action"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Ipaddr",
+           "width" : 100,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "ipaddr"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "#ID",
+           "width" : 75,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "on_id"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "width" : 200,
+           "header" : "Remarks",
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "remarks"
+          }
+         ]
+        }
+       ]
+      },
+      {
+       "listeners" : {
+        "|activate" : "function() {\n    _this.daypanel = this;\n    if (_this.daygrid) {\n        _this.daygrid.footer.onClick('first');\n    }\n}"
+       },
+       "fitToframe" : true,
+       "background" : true,
+       "region" : "east",
+       "title" : "Daily summary",
+       "xtype" : "GridPanel",
+       "fitContainer" : true,
+       "$ xns" : "Roo",
+       "tableName" : "Events",
+       "items" : [
+        {
+         "listeners" : {
+          "|render" : "function() \n{\n    _this.daygrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.daypanel.active) {\n       this.footer.onClick('first');\n    }\n}"
+         },
+         "autoExpandColumn" : "person_name",
+         "xtype" : "Grid",
+         "loadMask" : true,
+         "$ xns" : "Roo.grid",
+         "* prop" : "grid",
+         "items" : [
+          {
+           "listeners" : {
+            "beforeload" : "function (_self, o)\n{\n     if (! _this.dategrid) {\n         return false;\n    }\n    \n    o.params = o.params || {};\n    \n    var s = _this.dategrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a person\");\n        return false;\n    }\n    \n    o.params.person_id = s.data.person_id;    \n    \n    var s = _this.tablegrid.selModel.getSelected();\n    if (!s) {\n        _this.detailgrid.view.el.mask(\"Select a table\");\n        return false;\n    }\n    o.params.on_table = s.data.on_table;        \n    \n    _this.detailgrid.view.el.unmask();\n \n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n     \n \n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n\n    o.params['query[day_sum]'] = 1;\n    o.params._columns = 'on_day,qty,uqty';\n\n    \n}"
+           },
+           "xtype" : "Store",
+           "remoteSort" : true,
+           "$ sortInfo" : "{ field : 'on_day', direction: 'ASC' }",
+           "$ xns" : "Roo.data",
+           "* prop" : "dataSource",
+           "items" : [
+            {
+             "$ url" : "baseURL + '/Roo/Events.php'",
+             "method" : "GET",
+             "xtype" : "HttpProxy",
+             "$ xns" : "Roo.data",
+             "* prop" : "proxy"
+            },
+            {
+             "id" : "id",
+             "root" : "data",
+             "xtype" : "JsonReader",
+             "$ xns" : "Roo.data",
+             "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]",
+             "* prop" : "reader",
+             "totalProperty" : "total"
+            }
+           ]
+          },
+          {
+           "pageSize" : 25,
+           "xtype" : "PagingToolbar",
+           "emptyMsg" : "No Events found",
+           "$ xns" : "Roo",
+           "displayInfo" : true,
+           "displayMsg" : "Displaying Events{0} - {1} of {2}",
+           "* prop" : "footer"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Event when",
+           "width" : 75,
+           "$ renderer" : "function(v) { return String.format('{0}', v  ); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "on_day"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "#Affected",
+           "width" : 70,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "uqty"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Changes",
+           "width" : 70,
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "qty"
+          }
+         ]
+        }
+       ]
+      }
+     ]
+    }
+   ]
+  }
+ ]
 }
\ No newline at end of file