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",
10 "title": "Event Drilldown",
11 "xtype": "NestedLayoutPanel",
16 "xtype": "BorderLayout",
23 "xtype": "LayoutRegion",
28 "xtype": "LayoutRegion",
35 "xtype": "LayoutRegion",
40 "|activate": "function() {\n _this.datepanel = this;\n if (_this.dategrid) {\n _this.dategrid.ds.load({});\n }\n}"
46 "tableName": "Events",
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}"
57 "autoExpandColumn": "person_name",
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}"
66 "*prop": "dataSource",
69 "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
76 "|url": "baseURL + '/Roo/Events.php'",
81 "xtype": "JsonReader",
82 "totalProperty": "total",
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]"
103 "render": "function (_self)\n{\n _this.dateFrom = _self;\n}",
104 "change": "function (_self, newValue, oldValue)\n{\n _this.dategrid.ds.load({});\n}"
107 "|value": "(function() { d = new Date(); return d.format('Y-m-01'); })()",
108 "xtype": "DateField",
113 "render": "function (_self)\n{\n _this.dateTo = _self;\n}",
114 "change": "function (_self, newValue, oldValue)\n{\n _this.dategrid.ds.load({});\n}"
117 "|value": "(function() { var d = new Date();d = d.add(Date.MONTH, 1) ; return d.format('Y-m-01'); })()",
118 "xtype": "DateField",
124 "*prop": "colModel[]",
125 "dataIndex": "person_id_name",
126 "header": "Person name",
129 "xtype": "ColumnModel",
130 "|renderer": "function(v,x,r) {\n return String.format('{0} <<a href=\"mailto:{1}\">{1}</a>>', v, r.data.person_id_email); \n }",
134 "*prop": "colModel[]",
139 "xtype": "ColumnModel",
140 "|renderer": "function(v) { return String.format('{0}', v); }",
149 "|activate": "function() {\n _this.tablepanel = this;\n if (_this.tablegrid) {\n _this.tablegrid.footer.onClick('first');\n }\n}"
152 "fitContainer": true,
155 "tableName": "Events",
157 "xtype": "GridPanel",
162 "|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}",
163 "rowclick": "function (_self, rowIndex, e)\n{\n _this.detailgrid.footer.onClick('first');\n}"
166 "autoExpandColumn": "person_name",
173 "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}"
175 "*prop": "dataSource",
178 "|sortInfo": "{ field : 'on_table', direction: 'ASC' }",
183 "xtype": "HttpProxy",
185 "|url": "baseURL + '/Roo/Events.php'",
190 "xtype": "JsonReader",
191 "totalProperty": "total",
195 "|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]"
201 "xtype": "PagingToolbar",
204 "displayMsg": "Displaying Events{0} - {1} of {2}",
205 "emptyMsg": "No Events found",
216 "|select": "function (combo, record, index)\n{\n _this.dategrid.ds.load({});\n}",
217 "|render": "function (_self)\n{\n _this.actionSel = _self;\n}"
220 "displayField": "action",
222 "emptyText": "Select Action",
223 "forceSelection": true,
225 "loadingText": "Searching...",
229 "qtip": "Select Action",
230 "queryParam": "query[action]",
231 "selectOnFocus": true,
232 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
233 "triggerAction": "all",
235 "valueField": "action",
242 "|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}"
247 "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
253 "xtype": "HttpProxy",
254 "|url": "baseURL + '/Roo/Events.php'",
259 "xtype": "JsonReader",
260 "totalProperty": "total",
264 "|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]"
272 "|select": "function (combo, record, index)\n{\n _this.dategrid.ds.load({});\n}",
273 "|render": "function (_self)\n{\n _this.affectSel = _self;\n}"
276 "displayField": "on_table",
278 "emptyText": "Select Affects",
279 "forceSelection": true,
281 "loadingText": "Searching...",
285 "qtip": "Select Action",
286 "queryParam": "query[on_table]",
287 "selectOnFocus": true,
288 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
289 "triggerAction": "all",
291 "valueField": "action",
298 "|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}"
303 "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
309 "xtype": "HttpProxy",
310 "|url": "baseURL + '/Roo/Events.php'",
315 "xtype": "JsonReader",
316 "totalProperty": "total",
320 "|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]"
329 "*prop": "colModel[]",
330 "dataIndex": "on_table",
334 "xtype": "ColumnModel",
335 "|renderer": "function(v) { return String.format('{0}', v); }",
339 "*prop": "colModel[]",
341 "header": "#Affected",
344 "xtype": "ColumnModel",
345 "|renderer": "function(v) { return String.format('{0}', v); }",
349 "*prop": "colModel[]",
354 "xtype": "ColumnModel",
355 "|renderer": "function(v) { return String.format('{0}', v); }",
364 "|activate": "function() {\n _this.detailpanel = this;\n if (_this.detailgrid) {\n _this.detailgrid.footer.onClick('first');\n }\n}"
367 "fitContainer": true,
370 "tableName": "Events",
372 "xtype": "GridPanel",
377 "|render": "function() \n{\n _this.detailgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.detailpanel.active) {\n this.footer.onClick('first');\n }\n}"
380 "autoExpandColumn": "person_name",
387 "beforeload": "function (_self, o)\n{\n if (! _this.dategrid) {\n return false;\n }\n \n o.params = o.params || {};\n \n var s = _this.dategrid.selModel.getSelected();\n if (!s) {\n _this.detailgrid.view.el.mask(\"Select a person\");\n return false;\n }\n \n o.params.person_id = s.data.person_id; \n \n var s = _this.tablegrid.selModel.getSelected();\n if (!s) {\n _this.detailgrid.view.el.mask(\"Select a table\");\n return false;\n }\n o.params.on_table = s.data.on_table; \n \n _this.detailgrid.view.el.unmask();\n \n\n \n \n act = _this.dateFrom.getValue();\n if (act.format) {\n o.params['query[from]'] = act.format('Y-m-d');\n }\n act = _this.dateTo.getValue();\n if (act.format) {\n o.params['query[to]'] = act.format('Y-m-d');\n }\n\n //o.params['query[table_d]'] = 1;\n //o.params._columns = 'on_table,qty,uqty';\n\n \n}"
389 "*prop": "dataSource",
392 "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
397 "xtype": "HttpProxy",
399 "|url": "baseURL + '/Roo/Events.php'",
404 "xtype": "JsonReader",
405 "totalProperty": "total",
409 "|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]"
415 "xtype": "PagingToolbar",
418 "displayMsg": "Displaying Events{0} - {1} of {2}",
419 "emptyMsg": "No Events found",
423 "*prop": "colModel[]",
427 "xtype": "ColumnModel",
428 "|renderer": "function(v) { return String.format('{0}', v); }",
432 "xtype": "ColumnModel",
433 "header": "Event when",
435 "dataIndex": "event_when",
436 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
438 "*prop": "colModel[]"
441 "*prop": "colModel[]",
442 "dataIndex": "action",
445 "xtype": "ColumnModel",
446 "|renderer": "function(v) { return String.format('{0}', v); }",
450 "*prop": "colModel[]",
451 "dataIndex": "ipaddr",
454 "xtype": "ColumnModel",
455 "|renderer": "function(v) { return String.format('{0}', v); }",
459 "*prop": "colModel[]",
460 "dataIndex": "on_id",
463 "xtype": "ColumnModel",
464 "|renderer": "function(v) { return String.format('{0}', v); }",
468 "xtype": "ColumnModel",
471 "dataIndex": "remarks",
472 "|renderer": "function(v) { return String.format('{0}', v); }",
474 "*prop": "colModel[]"