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                             "|xns": "Roo",
32                             "xtype": "ContentPanel"
33                         },
34                         {
35                             "listeners": {
36                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
37                             },
38                             "background": true,
39                             "fitContainer": true,
40                             "fitToframe": true,
41                             "region": "center",
42                             "tableName": "Events",
43                             "title": "Events",
44                             "xtype": "GridPanel",
45                             "|xns": "Roo",
46                             "items": [
47                                 {
48                                     "*prop": "grid",
49                                     "xtype": "Grid",
50                                     "autoExpandColumn": "remarks",
51                                     "loadMask": true,
52                                     "listeners": {
53                                         "|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}"
54                                     },
55                                     "|xns": "Roo.grid",
56                                     "items": [
57                                         {
58                                             "listeners": {
59                                                 "|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}"
60                                             },
61                                             "*prop": "dataSource",
62                                             "remoteSort": true,
63                                             "xtype": "Store",
64                                             "|reader": "Pman.Readers.Events",
65                                             "|sortInfo": "{ field: 'event_when', direction: 'DESC'}",
66                                             "|xns": "Roo.data",
67                                             "items": [
68                                                 {
69                                                     "|xns": "Roo.data",
70                                                     "xtype": "JsonReader",
71                                                     "totalProperty": "total",
72                                                     "root": "data",
73                                                     "*prop": "reader",
74                                                     "id": "id",
75                                                     "|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]"
76                                                 },
77                                                 {
78                                                     "*prop": "proxy",
79                                                     "xtype": "HttpProxy",
80                                                     "method": "GET",
81                                                     "|url": "baseURL + '/Roo/Events.php'",
82                                                     "listeners": {},
83                                                     "|xns": "Roo.data"
84                                                 }
85                                             ]
86                                         },
87                                         {
88                                             "*prop": "footer",
89                                             "xtype": "PagingToolbar",
90                                             "pageSize": 25,
91                                             "displayInfo": true,
92                                             "displayMsg": "Displaying Events  {0} - {1} of {2}",
93                                             "emptyMsg": "No Events found",
94                                             "|xns": "Roo",
95                                             "items": [
96                                                 {
97                                                     "listeners": {
98                                                         "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}"
99                                                     },
100                                                     "text": "Download to Excel",
101                                                     "xtype": "Button",
102                                                     "|xns": "Roo.Toolbar"
103                                                 }
104                                             ]
105                                         },
106                                         {
107                                             "*prop": "toolbar",
108                                             "xtype": "Toolbar",
109                                             "listeners": {},
110                                             "|xns": "Roo",
111                                             "items": [
112                                                 {
113                                                     "xtype": "TextItem",
114                                                     "|xns": "Roo.Toolbar",
115                                                     "text": "Show",
116                                                     "listeners": {}
117                                                 },
118                                                 {
119                                                     "listeners": {
120                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n  \n}",
121                                                         "|render": "function (_self)\n{\n  _this.personSel = _self;\n}"
122                                                     },
123                                                     "allowBlank": true,
124                                                     "displayField": "name",
125                                                     "editable": true,
126                                                     "emptyText": "Select Person ",
127                                                     "fieldLabel": "Person ",
128                                                     "forceSelection": true,
129                                                     "listWidth": 600,
130                                                     "loadingText": "Searching...",
131                                                     "minChars": 2,
132                                                     "name": "person_id_name",
133                                                     "pageSize": 20,
134                                                     "qtip": "Select Person ",
135                                                     "queryParam": "query[name]",
136                                                     "selectOnFocus": true,
137                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> ({company_id_name}) &lt;{email}&gt; </div>",
138                                                     "triggerAction": "all",
139                                                     "typeAhead": true,
140                                                     "valueField": "id",
141                                                     "width": 150,
142                                                     "xtype": "ComboBox",
143                                                     "|xns": "Roo.form",
144                                                     "items": [
145                                                         {
146                                                             "listeners": {
147                                                                 "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    o.company_id = Pman.Login.authUser.company_id;\n}"
148                                                             },
149                                                             "*prop": "store",
150                                                             "|sortInfo": "{ field : 'name' , direction : 'ASC' }",
151                                                             "xtype": "Store",
152                                                             "|xns": "Roo.data",
153                                                             "items": [
154                                                                 {
155                                                                     "*prop": "proxy",
156                                                                     "xtype": "HttpProxy",
157                                                                     "|url": "baseURL + '/Roo/Person.php'",
158                                                                     "method": "GET",
159                                                                     "|xns": "Roo.data"
160                                                                 },
161                                                                 {
162                                                                     "*prop": "reader",
163                                                                     "id": "id",
164                                                                     "root": "data",
165                                                                     "totalProperty": "total",
166                                                                     "xtype": "JsonReader",
167                                                                     "|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]",
168                                                                     "|xns": "Roo.data"
169                                                                 }
170                                                             ]
171                                                         }
172                                                     ]
173                                                 },
174                                                 {
175                                                     "listeners": {
176                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n}",
177                                                         "|render": "function (_self)\n{\n  _this.actionSel = _self;\n}"
178                                                     },
179                                                     "allowBlank": true,
180                                                     "displayField": "action",
181                                                     "editable": false,
182                                                     "emptyText": "Select Action",
183                                                     "forceSelection": true,
184                                                     "listWidth": 300,
185                                                     "loadingText": "Searching...",
186                                                     "minChars": 2,
187                                                     "name": "action",
188                                                     "pageSize": 20,
189                                                     "qtip": "Select Action",
190                                                     "queryParam": "query[action]",
191                                                     "selectOnFocus": true,
192                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
193                                                     "triggerAction": "all",
194                                                     "typeAhead": true,
195                                                     "valueField": "action",
196                                                     "width": 150,
197                                                     "xtype": "ComboBox",
198                                                     "|xns": "Roo.form",
199                                                     "items": [
200                                                         {
201                                                             "listeners": {
202                                                                 "|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}"
203                                                             },
204                                                             "*prop": "store",
205                                                             "remoteSort": true,
206                                                             "xtype": "Store",
207                                                             "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
208                                                             "|xns": "Roo.data",
209                                                             "items": [
210                                                                 {
211                                                                     "*prop": "proxy",
212                                                                     "method": "GET",
213                                                                     "xtype": "HttpProxy",
214                                                                     "|url": "baseURL + '/Roo/Events.php'",
215                                                                     "|xns": "Roo.data"
216                                                                 },
217                                                                 {
218                                                                     "|xns": "Roo.data",
219                                                                     "xtype": "JsonReader",
220                                                                     "totalProperty": "total",
221                                                                     "root": "data",
222                                                                     "*prop": "reader",
223                                                                     "id": "id",
224                                                                     "|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]"
225                                                                 }
226                                                             ]
227                                                         }
228                                                     ]
229                                                 },
230                                                 {
231                                                     "listeners": {
232                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n}",
233                                                         "|render": "function (_self)\n{\n  _this.affectSel = _self;\n}"
234                                                     },
235                                                     "allowBlank": true,
236                                                     "displayField": "on_table",
237                                                     "editable": false,
238                                                     "emptyText": "Select Affects",
239                                                     "forceSelection": true,
240                                                     "listWidth": 300,
241                                                     "loadingText": "Searching...",
242                                                     "minChars": 2,
243                                                     "name": "on_table",
244                                                     "pageSize": 20,
245                                                     "qtip": "Select Action",
246                                                     "queryParam": "query[on_table]",
247                                                     "selectOnFocus": true,
248                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
249                                                     "triggerAction": "all",
250                                                     "typeAhead": true,
251                                                     "valueField": "action",
252                                                     "width": 150,
253                                                     "xtype": "ComboBox",
254                                                     "|xns": "Roo.form",
255                                                     "items": [
256                                                         {
257                                                             "listeners": {
258                                                                 "|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}"
259                                                             },
260                                                             "*prop": "store",
261                                                             "remoteSort": true,
262                                                             "xtype": "Store",
263                                                             "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
264                                                             "|xns": "Roo.data",
265                                                             "items": [
266                                                                 {
267                                                                     "*prop": "proxy",
268                                                                     "method": "GET",
269                                                                     "xtype": "HttpProxy",
270                                                                     "|url": "baseURL + '/Roo/Events.php'",
271                                                                     "|xns": "Roo.data"
272                                                                 },
273                                                                 {
274                                                                     "|xns": "Roo.data",
275                                                                     "xtype": "JsonReader",
276                                                                     "totalProperty": "total",
277                                                                     "root": "data",
278                                                                     "*prop": "reader",
279                                                                     "id": "id",
280                                                                     "|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]"
281                                                                 }
282                                                             ]
283                                                         }
284                                                     ]
285                                                 },
286                                                 {
287                                                     "text": "Date Range",
288                                                     "xtype": "TextItem",
289                                                     "|xns": "Roo.Toolbar"
290                                                 },
291                                                 {
292                                                     "listeners": {
293                                                         "render": "function (_self)\n{\n  _this.dateFrom = _self;\n}",
294                                                         "change": "function (_self, newValue, oldValue)\n{\n  _this.grid.footer.onClick('first');\n}"
295                                                     },
296                                                     "format": "Y-m-d",
297                                                     "xtype": "DateField",
298                                                     "|xns": "Roo.form"
299                                                 },
300                                                 {
301                                                     "listeners": {
302                                                         "render": "function (_self)\n{\n  _this.dateTo = _self;\n}",
303                                                         "change": "function (_self, newValue, oldValue)\n{\n  _this.grid.footer.onClick('first');\n}"
304                                                     },
305                                                     "format": "Y-m-d",
306                                                     "xtype": "DateField",
307                                                     "|xns": "Roo.form"
308                                                 }
309                                             ]
310                                         },
311                                         {
312                                             "*prop": "colModel[]",
313                                             "dataIndex": "event_when",
314                                             "header": "When",
315                                             "width": 100,
316                                             "xtype": "ColumnModel",
317                                             "|renderer": "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }",
318                                             "|xns": "Roo.grid"
319                                         },
320                                         {
321                                             "*prop": "colModel[]",
322                                             "dataIndex": "id",
323                                             "header": "#id",
324                                             "width": 100,
325                                             "xtype": "ColumnModel",
326                                             "|xns": "Roo.grid"
327                                         },
328                                         {
329                                             "*prop": "colModel[]",
330                                             "dataIndex": "person_id_name",
331                                             "header": "Staff",
332                                             "width": 150,
333                                             "xtype": "ColumnModel",
334                                             "|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}",
335                                             "|xns": "Roo.grid"
336                                         },
337                                         {
338                                             "xtype": "ColumnModel",
339                                             "header": "Action",
340                                             "width": 100,
341                                             "dataIndex": "action",
342                                             "|renderer": "function(v) { return String.format('{0}', v); }",
343                                             "|xns": "Roo.grid",
344                                             "*prop": "colModel[]"
345                                         },
346                                         {
347                                             "xtype": "ColumnModel",
348                                             "header": "IP",
349                                             "width": 100,
350                                             "dataIndex": "ipaddr",
351                                             "|renderer": "function(v) { return String.format('{0}', v); }",
352                                             "listeners": {},
353                                             "|xns": "Roo.grid",
354                                             "*prop": "colModel[]"
355                                         },
356                                         {
357                                             "*prop": "colModel[]",
358                                             "dataIndex": "on_table",
359                                             "header": "Affected",
360                                             "width": 100,
361                                             "xtype": "ColumnModel",
362                                             "|renderer": "function(v, x, r) {                     \n            return v ? String.format('{0}({1})', v,  r.data.on_id)  : '';  \n   }",
363                                             "|xns": "Roo.grid"
364                                         },
365                                         {
366                                             "*prop": "colModel[]",
367                                             "dataIndex": "remarks",
368                                             "header": "Remarks",
369                                             "width": 300,
370                                             "xtype": "ColumnModel",
371                                             "|renderer": "function(v) { return String.format('<span qtip=\"{1}\">{0}</span>', v, Roo.util.Format.htmlEncode(v)); }",
372                                             "|xns": "Roo.grid"
373                                         }
374                                     ]
375                                 }
376                             ]
377                         }
378                     ]
379                 }
380             ]
381         }
382     ],
383     "permname": "Admin.Logs",
384     "modOrder": "001"
385 }