Pman.Tab.AdminLogDrill.bjs
[Pman.Admin] / Pman.Tab.AdminLogDrill.bjs
1 {
2     "id": "roo-file-265",
3     "name": "Pman.Tab.AdminLogDrill",
4     "parent": "Pman.Tab.AdminLogs",
5     "title": "Pman.Tab.AdminLogDrill",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminLogDrill.bjs",
7     "items": [
8         {
9             "region": "center",
10             "title": "Event Drilldown",
11             "xtype": "NestedLayoutPanel",
12             "|xns": "Roo",
13             "items": [
14                 {
15                     "|xns": "Roo",
16                     "xtype": "BorderLayout",
17                     "*prop": "layout",
18                     "items": [
19                         {
20                             "*prop": "west",
21                             "split": true,
22                             "width": 300,
23                             "xtype": "LayoutRegion",
24                             "|xns": "Roo"
25                         },
26                         {
27                             "|xns": "Roo",
28                             "xtype": "LayoutRegion",
29                             "*prop": "center"
30                         },
31                         {
32                             "*prop": "east",
33                             "split": true,
34                             "width": 400,
35                             "xtype": "LayoutRegion",
36                             "|xns": "Roo"
37                         },
38                         {
39                             "listeners": {
40                                 "|activate": "function() {\n    _this.datepanel = this;\n    if (_this.dategrid) {\n        _this.dategrid.ds.load({});\n    }\n}"
41                             },
42                             "background": true,
43                             "fitContainer": true,
44                             "fitToframe": true,
45                             "region": "west",
46                             "tableName": "Events",
47                             "title": "Events",
48                             "xtype": "GridPanel",
49                             "|xns": "Roo",
50                             "items": [
51                                 {
52                                     "listeners": {
53                                         "|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}",
54                                         "rowclick": "function (_self, rowIndex, e)\n{\n    _this.tablegrid.footer.onClick('first');\n}"
55                                     },
56                                     "*prop": "grid",
57                                     "autoExpandColumn": "person_name",
58                                     "loadMask": true,
59                                     "xtype": "Grid",
60                                     "|xns": "Roo.grid",
61                                     "items": [
62                                         {
63                                             "listeners": {
64                                                 "beforeload": "function (_self, o)\n{\n    if (! _this.dateFrom) {\n     return;\n    }\n    o.params = o.params || {};\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['query[person_sum]'] = 1;\n    o.params._columns = 'person_id,person_id_name,person_id_email,qty';\n    o.params.limit = 999;\n \n}"
65                                             },
66                                             "*prop": "dataSource",
67                                             "remoteSort": true,
68                                             "xtype": "Store",
69                                             "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
70                                             "|xns": "Roo.data",
71                                             "items": [
72                                                 {
73                                                     "*prop": "proxy",
74                                                     "xtype": "HttpProxy",
75                                                     "method": "GET",
76                                                     "|url": "baseURL + '/Roo/Events.php'",
77                                                     "|xns": "Roo.data"
78                                                 },
79                                                 {
80                                                     "|xns": "Roo.data",
81                                                     "xtype": "JsonReader",
82                                                     "totalProperty": "total",
83                                                     "root": "data",
84                                                     "*prop": "reader",
85                                                     "id": "id",
86                                                     "|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]"
87                                                 }
88                                             ]
89                                         },
90                                         {
91                                             "*prop": "toolbar",
92                                             "xtype": "Toolbar",
93                                             "listeners": {},
94                                             "|xns": "Roo",
95                                             "items": [
96                                                 {
97                                                     "text": "Date Range",
98                                                     "xtype": "TextItem",
99                                                     "|xns": "Roo.Toolbar"
100                                                 },
101                                                 {
102                                                     "listeners": {
103                                                         "render": "function (_self)\n{\n  _this.dateTo = _self;\n}",
104                                                         "change": "function (_self, newValue, oldValue)\n{\n  _this.grid.footer.onClick('first');\n}"
105                                                     },
106                                                     "format": "Y-m-d",
107                                                     "xtype": "DateField",
108                                                     "|xns": "Roo.form"
109                                                 },
110                                                 {
111                                                     "listeners": {
112                                                         "render": "function (_self)\n{\n  _this.dateFrom = _self;\n}",
113                                                         "change": "function (_self, newValue, oldValue)\n{\n  _this.grid.footer.onClick('first');\n}"
114                                                     },
115                                                     "format": "Y-m-d",
116                                                     "xtype": "DateField",
117                                                     "|xns": "Roo.form"
118                                                 }
119                                             ]
120                                         },
121                                         {
122                                             "*prop": "colModel[]",
123                                             "dataIndex": "person_id_name",
124                                             "header": "Person name",
125                                             "sortable": true,
126                                             "width": 200,
127                                             "xtype": "ColumnModel",
128                                             "|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 }",
129                                             "|xns": "Roo.grid"
130                                         },
131                                         {
132                                             "*prop": "colModel[]",
133                                             "dataIndex": "qty",
134                                             "header": "Changes",
135                                             "sortable": true,
136                                             "width": 70,
137                                             "xtype": "ColumnModel",
138                                             "|renderer": "function(v) { return String.format('{0}', v); }",
139                                             "|xns": "Roo.grid"
140                                         }
141                                     ]
142                                 }
143                             ]
144                         },
145                         {
146                             "listeners": {
147                                 "|activate": "function() {\n    _this.tablepanel = this;\n    if (_this.tablegrid) {\n        _this.tablegrid.footer.onClick('first');\n    }\n}"
148                             },
149                             "background": true,
150                             "fitContainer": true,
151                             "fitToframe": true,
152                             "region": "center",
153                             "tableName": "Events",
154                             "title": "Events",
155                             "xtype": "GridPanel",
156                             "|xns": "Roo",
157                             "items": [
158                                 {
159                                     "listeners": {
160                                         "|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}",
161                                         "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
162                                     },
163                                     "*prop": "grid",
164                                     "autoExpandColumn": "person_name",
165                                     "loadMask": true,
166                                     "xtype": "Grid",
167                                     "|xns": "Roo.grid",
168                                     "items": [
169                                         {
170                                             "listeners": {
171                                                 "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     \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}"
172                                             },
173                                             "*prop": "dataSource",
174                                             "remoteSort": true,
175                                             "xtype": "Store",
176                                             "|sortInfo": "{ field : 'on_table', direction: 'ASC' }",
177                                             "|xns": "Roo.data",
178                                             "items": [
179                                                 {
180                                                     "*prop": "proxy",
181                                                     "xtype": "HttpProxy",
182                                                     "method": "GET",
183                                                     "|url": "baseURL + '/Roo/Events.php'",
184                                                     "|xns": "Roo.data"
185                                                 },
186                                                 {
187                                                     "|xns": "Roo.data",
188                                                     "xtype": "JsonReader",
189                                                     "totalProperty": "total",
190                                                     "root": "data",
191                                                     "*prop": "reader",
192                                                     "id": "id",
193                                                     "|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]"
194                                                 }
195                                             ]
196                                         },
197                                         {
198                                             "*prop": "footer",
199                                             "xtype": "PagingToolbar",
200                                             "pageSize": 25,
201                                             "displayInfo": true,
202                                             "displayMsg": "Displaying Events{0} - {1} of {2}",
203                                             "emptyMsg": "No Events found",
204                                             "|xns": "Roo"
205                                         },
206                                         {
207                                             "*prop": "toolbar",
208                                             "xtype": "Toolbar",
209                                             "listeners": {},
210                                             "|xns": "Roo",
211                                             "items": [
212                                                 {
213                                                     "listeners": {
214                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n}",
215                                                         "|render": "function (_self)\n{\n  _this.actionSel = _self;\n}"
216                                                     },
217                                                     "allowBlank": true,
218                                                     "displayField": "action",
219                                                     "editable": false,
220                                                     "emptyText": "Select Action",
221                                                     "forceSelection": true,
222                                                     "listWidth": 300,
223                                                     "loadingText": "Searching...",
224                                                     "minChars": 2,
225                                                     "name": "action",
226                                                     "pageSize": 20,
227                                                     "qtip": "Select Action",
228                                                     "queryParam": "query[action]",
229                                                     "selectOnFocus": true,
230                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
231                                                     "triggerAction": "all",
232                                                     "typeAhead": true,
233                                                     "valueField": "action",
234                                                     "width": 150,
235                                                     "xtype": "ComboBox",
236                                                     "|xns": "Roo.form",
237                                                     "items": [
238                                                         {
239                                                             "listeners": {
240                                                                 "|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}"
241                                                             },
242                                                             "*prop": "store",
243                                                             "remoteSort": true,
244                                                             "xtype": "Store",
245                                                             "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
246                                                             "|xns": "Roo.data",
247                                                             "items": [
248                                                                 {
249                                                                     "*prop": "proxy",
250                                                                     "method": "GET",
251                                                                     "xtype": "HttpProxy",
252                                                                     "|url": "baseURL + '/Roo/Events.php'",
253                                                                     "|xns": "Roo.data"
254                                                                 },
255                                                                 {
256                                                                     "|xns": "Roo.data",
257                                                                     "xtype": "JsonReader",
258                                                                     "totalProperty": "total",
259                                                                     "root": "data",
260                                                                     "*prop": "reader",
261                                                                     "id": "id",
262                                                                     "|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]"
263                                                                 }
264                                                             ]
265                                                         }
266                                                     ]
267                                                 },
268                                                 {
269                                                     "listeners": {
270                                                         "|select": "function (combo, record, index)\n{\n  _this.grid.footer.onClick('first');\n}",
271                                                         "|render": "function (_self)\n{\n  _this.affectSel = _self;\n}"
272                                                     },
273                                                     "allowBlank": true,
274                                                     "displayField": "on_table",
275                                                     "editable": false,
276                                                     "emptyText": "Select Affects",
277                                                     "forceSelection": true,
278                                                     "listWidth": 300,
279                                                     "loadingText": "Searching...",
280                                                     "minChars": 2,
281                                                     "name": "on_table",
282                                                     "pageSize": 20,
283                                                     "qtip": "Select Action",
284                                                     "queryParam": "query[on_table]",
285                                                     "selectOnFocus": true,
286                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
287                                                     "triggerAction": "all",
288                                                     "typeAhead": true,
289                                                     "valueField": "action",
290                                                     "width": 150,
291                                                     "xtype": "ComboBox",
292                                                     "|xns": "Roo.form",
293                                                     "items": [
294                                                         {
295                                                             "listeners": {
296                                                                 "|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}"
297                                                             },
298                                                             "*prop": "store",
299                                                             "remoteSort": true,
300                                                             "xtype": "Store",
301                                                             "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
302                                                             "|xns": "Roo.data",
303                                                             "items": [
304                                                                 {
305                                                                     "*prop": "proxy",
306                                                                     "method": "GET",
307                                                                     "xtype": "HttpProxy",
308                                                                     "|url": "baseURL + '/Roo/Events.php'",
309                                                                     "|xns": "Roo.data"
310                                                                 },
311                                                                 {
312                                                                     "|xns": "Roo.data",
313                                                                     "xtype": "JsonReader",
314                                                                     "totalProperty": "total",
315                                                                     "root": "data",
316                                                                     "*prop": "reader",
317                                                                     "id": "id",
318                                                                     "|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]"
319                                                                 }
320                                                             ]
321                                                         }
322                                                     ]
323                                                 }
324                                             ]
325                                         },
326                                         {
327                                             "*prop": "colModel[]",
328                                             "dataIndex": "on_table",
329                                             "header": "Table",
330                                             "sortable": true,
331                                             "width": 200,
332                                             "xtype": "ColumnModel",
333                                             "|renderer": "function(v) { return String.format('{0}', v); }",
334                                             "|xns": "Roo.grid"
335                                         },
336                                         {
337                                             "*prop": "colModel[]",
338                                             "dataIndex": "uqty",
339                                             "header": "#Affected",
340                                             "sortable": true,
341                                             "width": 70,
342                                             "xtype": "ColumnModel",
343                                             "|renderer": "function(v) { return String.format('{0}', v); }",
344                                             "|xns": "Roo.grid"
345                                         },
346                                         {
347                                             "*prop": "colModel[]",
348                                             "dataIndex": "qty",
349                                             "header": "Changes",
350                                             "sortable": true,
351                                             "width": 70,
352                                             "xtype": "ColumnModel",
353                                             "|renderer": "function(v) { return String.format('{0}', v); }",
354                                             "|xns": "Roo.grid"
355                                         }
356                                     ]
357                                 }
358                             ]
359                         },
360                         {
361                             "|xns": "Roo",
362                             "xtype": "GridPanel",
363                             "title": "Events",
364                             "fitToframe": true,
365                             "fitContainer": true,
366                             "tableName": "Events",
367                             "background": true,
368                             "region": "center",
369                             "listeners": {
370                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
371                             },
372                             "items": [
373                                 {
374                                     "*prop": "grid",
375                                     "xtype": "Grid",
376                                     "autoExpandColumn": "person_name",
377                                     "loadMask": true,
378                                     "listeners": {
379                                         "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
380                                         "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
381                                     },
382                                     "|xns": "Roo.grid",
383                                     "items": [
384                                         {
385                                             "*prop": "dataSource",
386                                             "xtype": "Store",
387                                             "remoteSort": true,
388                                             "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
389                                             "|xns": "Roo.data",
390                                             "items": [
391                                                 {
392                                                     "*prop": "proxy",
393                                                     "xtype": "HttpProxy",
394                                                     "method": "GET",
395                                                     "|url": "baseURL + '/Roo/Events.php'",
396                                                     "|xns": "Roo.data"
397                                                 },
398                                                 {
399                                                     "|xns": "Roo.data",
400                                                     "xtype": "JsonReader",
401                                                     "totalProperty": "total",
402                                                     "root": "data",
403                                                     "*prop": "reader",
404                                                     "id": "id",
405                                                     "|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]"
406                                                 }
407                                             ]
408                                         },
409                                         {
410                                             "*prop": "footer",
411                                             "xtype": "PagingToolbar",
412                                             "pageSize": 25,
413                                             "displayInfo": true,
414                                             "displayMsg": "Displaying Events{0} - {1} of {2}",
415                                             "emptyMsg": "No Events found",
416                                             "|xns": "Roo"
417                                         },
418                                         {
419                                             "*prop": "toolbar",
420                                             "xtype": "Toolbar",
421                                             "|xns": "Roo",
422                                             "items": [
423                                                 {
424                                                     "text": "Add",
425                                                     "xtype": "Button",
426                                                     "cls": "x-btn-text-icon",
427                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
428                                                     "listeners": {
429                                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
430                                                     },
431                                                     "|xns": "Roo.Toolbar"
432                                                 },
433                                                 {
434                                                     "text": "Edit",
435                                                     "xtype": "Button",
436                                                     "cls": "x-btn-text-icon",
437                                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
438                                                     "listeners": {
439                                                         "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
440                                                     },
441                                                     "|xns": "Roo.Toolbar"
442                                                 },
443                                                 {
444                                                     "text": "Delete",
445                                                     "cls": "x-btn-text-icon",
446                                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
447                                                     "xtype": "Button",
448                                                     "listeners": {
449                                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'Events'); \n}\n        "
450                                                     },
451                                                     "|xns": "Roo.Toolbar"
452                                                 }
453                                             ]
454                                         },
455                                         {
456                                             "xtype": "ColumnModel",
457                                             "header": "Id",
458                                             "width": 75,
459                                             "dataIndex": "id",
460                                             "|renderer": "function(v) { return String.format('{0}', v); }",
461                                             "|xns": "Roo.grid",
462                                             "*prop": "colModel[]"
463                                         },
464                                         {
465                                             "xtype": "ColumnModel",
466                                             "header": "Person name",
467                                             "width": 200,
468                                             "dataIndex": "person_name",
469                                             "|renderer": "function(v) { return String.format('{0}', v); }",
470                                             "|xns": "Roo.grid",
471                                             "*prop": "colModel[]"
472                                         },
473                                         {
474                                             "xtype": "ColumnModel",
475                                             "header": "Event when",
476                                             "width": 75,
477                                             "dataIndex": "event_when",
478                                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
479                                             "|xns": "Roo.grid",
480                                             "*prop": "colModel[]"
481                                         },
482                                         {
483                                             "xtype": "ColumnModel",
484                                             "header": "Action",
485                                             "width": 200,
486                                             "dataIndex": "action",
487                                             "|renderer": "function(v) { return String.format('{0}', v); }",
488                                             "|xns": "Roo.grid",
489                                             "*prop": "colModel[]"
490                                         },
491                                         {
492                                             "xtype": "ColumnModel",
493                                             "header": "Ipaddr",
494                                             "width": 200,
495                                             "dataIndex": "ipaddr",
496                                             "|renderer": "function(v) { return String.format('{0}', v); }",
497                                             "|xns": "Roo.grid",
498                                             "*prop": "colModel[]"
499                                         },
500                                         {
501                                             "xtype": "ColumnModel",
502                                             "header": "On",
503                                             "width": 75,
504                                             "dataIndex": "on_id",
505                                             "|renderer": "function(v) { return String.format('{0}', v); }",
506                                             "|xns": "Roo.grid",
507                                             "*prop": "colModel[]"
508                                         },
509                                         {
510                                             "xtype": "ColumnModel",
511                                             "header": "On table",
512                                             "width": 200,
513                                             "dataIndex": "on_table",
514                                             "|renderer": "function(v) { return String.format('{0}', v); }",
515                                             "|xns": "Roo.grid",
516                                             "*prop": "colModel[]"
517                                         },
518                                         {
519                                             "xtype": "ColumnModel",
520                                             "header": "Person",
521                                             "width": 75,
522                                             "dataIndex": "person_id",
523                                             "|renderer": "function(v) { return String.format('{0}', v); }",
524                                             "|xns": "Roo.grid",
525                                             "*prop": "colModel[]"
526                                         },
527                                         {
528                                             "xtype": "ColumnModel",
529                                             "header": "Remarks",
530                                             "width": 200,
531                                             "dataIndex": "remarks",
532                                             "|renderer": "function(v) { return String.format('{0}', v); }",
533                                             "|xns": "Roo.grid",
534                                             "*prop": "colModel[]"
535                                         }
536                                     ]
537                                 }
538                             ]
539                         }
540                     ]
541                 }
542             ]
543         }
544     ],
545     "permname": "",
546     "modOrder": "003"
547 }