Pman.Tab.AdminLogEvents.bjs
[Pman.Admin] / Pman.Tab.AdminLogEvents.bjs
1 {
2     "id": "roo-file-121",
3     "name": "Pman.Tab.AdminLogEvents",
4     "parent": "Pman.Tab.AdminLogs",
5     "title": "Admin - Logs - Events",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminLogEvents.bjs",
7     "items": [
8         {
9             "region": "center",
10             "title": "Events",
11             "xtype": "NestedLayoutPanel",
12             "|xns": "Roo",
13             "items": [
14                 {
15                     "|xns": "Roo",
16                     "xtype": "BorderLayout",
17                     "*prop": "layout",
18                     "items": [
19                         {
20                             "|xns": "Roo",
21                             "xtype": "LayoutRegion",
22                             "*prop": "center"
23                         },
24                         {
25                             "*prop": "south",
26                             "height": 100,
27                             "xtype": "LayoutRegion",
28                             "|xns": "Roo"
29                         },
30                         {
31                             "region": "south",
32                             "xtype": "ContentPanel",
33                             "|xns": "Roo"
34                         },
35                         {
36                             "listeners": {
37                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
38                             },
39                             "background": true,
40                             "fitContainer": true,
41                             "fitToframe": true,
42                             "region": "center",
43                             "tableName": "Events",
44                             "title": "Events",
45                             "xtype": "GridPanel",
46                             "|xns": "Roo",
47                             "items": [
48                                 {
49                                     "*prop": "grid",
50                                     "xtype": "Grid",
51                                     "autoExpandColumn": "remarks",
52                                     "loadMask": true,
53                                     "listeners": {
54                                         "|render": "function() { \n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
55                                     },
56                                     "|xns": "Roo.grid",
57                                     "items": [
58                                         {
59                                             "listeners": {
60                                                 "|beforeload": "function (_self, o)\n{\n   if (! _this.personSel) {\n    return;\n    }\n    o.params = o.params || {};\n    o.params.person_id = _this.personSel.getValue();\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    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    act = _this.groupedCombo.getValue();\n    o.params['query[grouped]'] = act;\n    if (o.params['query[grouped]'] == 'gr') {\n    \n        if (!tbl.length) {\n            Roo.MessageBox.alert(\"Error\", \"Select a table to group results on\");\n            return false;\n        }\n//        o.params['_columns']  = \n        o.params['_distinct'] = 'on_id';\n        \n        \n    }\n    \n    */\n\n    \n}"
61                                             },
62                                             "*prop": "dataSource",
63                                             "remoteSort": true,
64                                             "xtype": "Store",
65                                             "|reader": "Pman.Readers.Events",
66                                             "|sortInfo": "{ field: 'event_when', direction: 'DESC'}",
67                                             "|xns": "Roo.data",
68                                             "items": [
69                                                 {
70                                                     "|xns": "Roo.data",
71                                                     "xtype": "JsonReader",
72                                                     "totalProperty": "total",
73                                                     "root": "data",
74                                                     "*prop": "reader",
75                                                     "id": "id",
76                                                     "|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]"
77                                                 },
78                                                 {
79                                                     "*prop": "proxy",
80                                                     "xtype": "HttpProxy",
81                                                     "method": "GET",
82                                                     "|url": "baseURL + '/Roo/Events.php'",
83                                                     "listeners": {},
84                                                     "|xns": "Roo.data"
85                                                 }
86                                             ]
87                                         },
88                                         {
89                                             "*prop": "footer",
90                                             "xtype": "PagingToolbar",
91                                             "pageSize": 25,
92                                             "displayInfo": true,
93                                             "displayMsg": "Displaying Events  {0} - {1} of {2}",
94                                             "emptyMsg": "No Events found",
95                                             "|xns": "Roo",
96                                             "items": [
97                                                 {
98                                                     "listeners": {
99                                                         "click": "function (_self, e)\n{\n \n    var params = {\n        'sort' : 'event_when',\n        'dir' : 'DESC',\n        'start' : 0,\n        'limit' : 900,\n        person_id : _this.personSel.getValue(), \n        'csvTitles[0]' : 'When',   'csvCols[0]' : 'event_when', \n        'csvTitles[1]' : 'Staff',   'csvCols[1]' : 'person_id_name', \n        'csvTitles[2]' : 'Action',   'csvCols[2]' : 'action', \n        'csvTitles[3]' : 'Record ID',   'csvCols[3]' : 'on_id'       ,\n        'csvTitles[4]' : 'Record Type',   'csvCols[4]' : 'on_table',\n        'csvTitles[5]' : 'Remarks',   'csvCols[5]' : 'remarks'        \n    }\n        \n    o.params.person_id = _this.personSel.getValue();\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    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    new Pman.download({\n        url : baseURL + '/Roo/Events.php',\n        params : params,\n        newWindow: true\n        \n    });\n}"
100                                                     },
101                                                     "text": "Download to Excel",
102                                                     "xtype": "Button",
103                                                     "|xns": "Roo.Toolbar"
104                                                 }
105                                             ]
106                                         },
107                                         {
108                                             "*prop": "toolbar",
109                                             "xtype": "Toolbar",
110                                             "listeners": {},
111                                             "|xns": "Roo",
112                                             "items": [
113                                                 {
114                                                     "xtype": "TextItem",
115                                                     "|xns": "Roo.Toolbar",
116                                                     "text": "Show",
117                                                     "listeners": {}
118                                                 },
119                                                 {
120                                                     "listeners": {
121                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n  \n}",
122                                                         "|render": "function (_self)\n{\n  _this.personSel = _self;\n}"
123                                                     },
124                                                     "allowBlank": true,
125                                                     "displayField": "name",
126                                                     "editable": true,
127                                                     "emptyText": "Select Person ",
128                                                     "fieldLabel": "Person ",
129                                                     "forceSelection": true,
130                                                     "listWidth": 600,
131                                                     "loadingText": "Searching...",
132                                                     "minChars": 2,
133                                                     "name": "person_id_name",
134                                                     "pageSize": 20,
135                                                     "qtip": "Select Person ",
136                                                     "queryParam": "query[name]",
137                                                     "selectOnFocus": true,
138                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> ({company_id_name}) &lt;{email}&gt; </div>",
139                                                     "triggerAction": "all",
140                                                     "typeAhead": true,
141                                                     "valueField": "id",
142                                                     "width": 150,
143                                                     "xtype": "ComboBox",
144                                                     "|xns": "Roo.form",
145                                                     "items": [
146                                                         {
147                                                             "listeners": {
148                                                                 "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    o.company_id = Pman.Login.authUser.company_id;\n}"
149                                                             },
150                                                             "*prop": "store",
151                                                             "|sortInfo": "{ field : 'name' , direction : 'ASC' }",
152                                                             "xtype": "Store",
153                                                             "|xns": "Roo.data",
154                                                             "items": [
155                                                                 {
156                                                                     "*prop": "proxy",
157                                                                     "xtype": "HttpProxy",
158                                                                     "|url": "baseURL + '/Roo/Person.php'",
159                                                                     "method": "GET",
160                                                                     "|xns": "Roo.data"
161                                                                 },
162                                                                 {
163                                                                     "*prop": "reader",
164                                                                     "id": "id",
165                                                                     "root": "data",
166                                                                     "totalProperty": "total",
167                                                                     "xtype": "JsonReader",
168                                                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'phone',\n        'type': 'string'\n    },\n    {\n        'name': 'fax',\n        'type': 'string'\n    },\n    {\n        'name': 'email',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'role',\n        'type': 'string'\n    },\n    {\n        'name': 'active',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'lang',\n        'type': 'string'\n    },\n    {\n        'name': 'no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'office_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'office_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'office_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_address',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'office_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_address',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_tel',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_isOwner',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_logo_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_background_color',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_comptype',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_url',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_main_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_created_by',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_created_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'company_id_updated_by',\n        'type': 'int'\n    },\n    {\n        'name': 'company_id_updated_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'company_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_dispatch_port',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_province',\n        'type': 'string'\n    },\n    {\n        'name': 'company_id_country',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_client_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_team_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_file_location',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_open_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_open_by',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_close_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_countries',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_languages',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_agency_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_dt',\n        'type': 'date'\n    }\n]",
169                                                                     "|xns": "Roo.data"
170                                                                 }
171                                                             ]
172                                                         }
173                                                     ]
174                                                 },
175                                                 {
176                                                     "listeners": {
177                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n}",
178                                                         "|render": "function (_self)\n{\n  _this.actionSel = _self;\n}"
179                                                     },
180                                                     "allowBlank": true,
181                                                     "displayField": "action",
182                                                     "editable": false,
183                                                     "emptyText": "Select Action",
184                                                     "forceSelection": true,
185                                                     "listWidth": 300,
186                                                     "loadingText": "Searching...",
187                                                     "minChars": 2,
188                                                     "name": "action",
189                                                     "pageSize": 20,
190                                                     "qtip": "Select Action",
191                                                     "queryParam": "query[action]",
192                                                     "selectOnFocus": true,
193                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
194                                                     "triggerAction": "all",
195                                                     "typeAhead": true,
196                                                     "valueField": "action",
197                                                     "width": 150,
198                                                     "xtype": "ComboBox",
199                                                     "|xns": "Roo.form",
200                                                     "items": [
201                                                         {
202                                                             "listeners": {
203                                                                 "|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}"
204                                                             },
205                                                             "*prop": "store",
206                                                             "remoteSort": true,
207                                                             "xtype": "Store",
208                                                             "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
209                                                             "|xns": "Roo.data",
210                                                             "items": [
211                                                                 {
212                                                                     "*prop": "proxy",
213                                                                     "method": "GET",
214                                                                     "xtype": "HttpProxy",
215                                                                     "|url": "baseURL + '/Roo/Events.php'",
216                                                                     "|xns": "Roo.data"
217                                                                 },
218                                                                 {
219                                                                     "|xns": "Roo.data",
220                                                                     "xtype": "JsonReader",
221                                                                     "totalProperty": "total",
222                                                                     "root": "data",
223                                                                     "*prop": "reader",
224                                                                     "id": "id",
225                                                                     "|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]"
226                                                                 }
227                                                             ]
228                                                         }
229                                                     ]
230                                                 },
231                                                 {
232                                                     "listeners": {
233                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n}",
234                                                         "|render": "function (_self)\n{\n  _this.affectSel = _self;\n}"
235                                                     },
236                                                     "allowBlank": true,
237                                                     "displayField": "on_table",
238                                                     "editable": false,
239                                                     "emptyText": "Select Affects",
240                                                     "forceSelection": true,
241                                                     "listWidth": 300,
242                                                     "loadingText": "Searching...",
243                                                     "minChars": 2,
244                                                     "name": "on_table",
245                                                     "pageSize": 20,
246                                                     "qtip": "Select Action",
247                                                     "queryParam": "query[on_table]",
248                                                     "selectOnFocus": true,
249                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
250                                                     "triggerAction": "all",
251                                                     "typeAhead": true,
252                                                     "valueField": "action",
253                                                     "width": 150,
254                                                     "xtype": "ComboBox",
255                                                     "|xns": "Roo.form",
256                                                     "items": [
257                                                         {
258                                                             "listeners": {
259                                                                 "|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}"
260                                                             },
261                                                             "*prop": "store",
262                                                             "remoteSort": true,
263                                                             "xtype": "Store",
264                                                             "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
265                                                             "|xns": "Roo.data",
266                                                             "items": [
267                                                                 {
268                                                                     "*prop": "proxy",
269                                                                     "method": "GET",
270                                                                     "xtype": "HttpProxy",
271                                                                     "|url": "baseURL + '/Roo/Events.php'",
272                                                                     "|xns": "Roo.data"
273                                                                 },
274                                                                 {
275                                                                     "|xns": "Roo.data",
276                                                                     "xtype": "JsonReader",
277                                                                     "totalProperty": "total",
278                                                                     "root": "data",
279                                                                     "*prop": "reader",
280                                                                     "id": "id",
281                                                                     "|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]"
282                                                                 }
283                                                             ]
284                                                         }
285                                                     ]
286                                                 },
287                                                 {
288                                                     "text": "Date Range",
289                                                     "xtype": "TextItem",
290                                                     "|xns": "Roo.Toolbar"
291                                                 },
292                                                 {
293                                                     "listeners": {
294                                                         "render": "function (_self)\n{\n  _this.dateFrom = _self;\n}",
295                                                         "change": "function (_self, newValue, oldValue)\n{\n  _this.grid.footer.onClick('first');\n}"
296                                                     },
297                                                     "format": "Y-m-d",
298                                                     "xtype": "DateField",
299                                                     "|xns": "Roo.form"
300                                                 },
301                                                 {
302                                                     "listeners": {
303                                                         "render": "function (_self)\n{\n  _this.dateTo = _self;\n}",
304                                                         "change": "function (_self, newValue, oldValue)\n{\n  _this.grid.footer.onClick('first');\n}"
305                                                     },
306                                                     "format": "Y-m-d",
307                                                     "xtype": "DateField",
308                                                     "|xns": "Roo.form"
309                                                 }
310                                             ]
311                                         },
312                                         {
313                                             "*prop": "colModel[]",
314                                             "dataIndex": "event_when",
315                                             "header": "When",
316                                             "width": 100,
317                                             "xtype": "ColumnModel",
318                                             "|renderer": "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }",
319                                             "|xns": "Roo.grid"
320                                         },
321                                         {
322                                             "*prop": "colModel[]",
323                                             "dataIndex": "id",
324                                             "header": "#id",
325                                             "width": 100,
326                                             "xtype": "ColumnModel",
327                                             "|xns": "Roo.grid"
328                                         },
329                                         {
330                                             "*prop": "colModel[]",
331                                             "dataIndex": "person_id_name",
332                                             "header": "Staff",
333                                             "width": 150,
334                                             "xtype": "ColumnModel",
335                                             "|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}",
336                                             "|xns": "Roo.grid"
337                                         },
338                                         {
339                                             "xtype": "ColumnModel",
340                                             "header": "Action",
341                                             "width": 100,
342                                             "dataIndex": "action",
343                                             "|renderer": "function(v) { return String.format('{0}', v); }",
344                                             "|xns": "Roo.grid",
345                                             "*prop": "colModel[]"
346                                         },
347                                         {
348                                             "xtype": "ColumnModel",
349                                             "header": "IP",
350                                             "width": 100,
351                                             "dataIndex": "ipaddr",
352                                             "|renderer": "function(v) { return String.format('{0}', v); }",
353                                             "listeners": {},
354                                             "|xns": "Roo.grid",
355                                             "*prop": "colModel[]"
356                                         },
357                                         {
358                                             "*prop": "colModel[]",
359                                             "dataIndex": "on_table",
360                                             "header": "Affected",
361                                             "width": 100,
362                                             "xtype": "ColumnModel",
363                                             "|renderer": "function(v, x, r) {                     \n            return v ? String.format('{0}({1})', v,  r.data.on_id)  : '';  \n   }",
364                                             "|xns": "Roo.grid"
365                                         },
366                                         {
367                                             "*prop": "colModel[]",
368                                             "dataIndex": "remarks",
369                                             "header": "Remarks",
370                                             "width": 300,
371                                             "xtype": "ColumnModel",
372                                             "|renderer": "function(v) { return String.format('<span qtip=\"{1}\">{0}</span>', v, Roo.util.Format.htmlEncode(v)); }",
373                                             "|xns": "Roo.grid"
374                                         }
375                                     ]
376                                 }
377                             ]
378                         }
379                     ]
380                 }
381             ]
382         }
383     ],
384     "permname": "Admin.Logs",
385     "modOrder": "001"
386 }