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.dateTo = _self;\n}",
104 "change": "function (_self, newValue, oldValue)\n{\n _this.grid.footer.onClick('first');\n}"
107 "xtype": "DateField",
112 "render": "function (_self)\n{\n _this.dateFrom = _self;\n}",
113 "change": "function (_self, newValue, oldValue)\n{\n _this.grid.footer.onClick('first');\n}"
116 "xtype": "DateField",
122 "*prop": "colModel[]",
123 "dataIndex": "person_id_name",
124 "header": "Person name",
127 "xtype": "ColumnModel",
128 "|renderer": "function(v,x,r) {\n return String.format('{0} <<a href=\"mailto:{1}\">{1}</a>>', v, r.data.person_id_email); \n }",
132 "*prop": "colModel[]",
137 "xtype": "ColumnModel",
138 "|renderer": "function(v) { return String.format('{0}', v); }",
147 "|activate": "function() {\n _this.tablepanel = this;\n if (_this.tablegrid) {\n _this.tablegrid.footer.onClick('first');\n }\n}"
150 "fitContainer": true,
153 "tableName": "Events",
155 "xtype": "GridPanel",
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"
164 "autoExpandColumn": "person_name",
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}"
173 "*prop": "dataSource",
176 "|sortInfo": "{ field : 'on_table', direction: 'ASC' }",
181 "xtype": "HttpProxy",
183 "|url": "baseURL + '/Roo/Events.php'",
188 "xtype": "JsonReader",
189 "totalProperty": "total",
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]"
199 "xtype": "PagingToolbar",
202 "displayMsg": "Displaying Events{0} - {1} of {2}",
203 "emptyMsg": "No Events found",
214 "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}",
215 "|render": "function (_self)\n{\n _this.actionSel = _self;\n}"
218 "displayField": "action",
220 "emptyText": "Select Action",
221 "forceSelection": true,
223 "loadingText": "Searching...",
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",
233 "valueField": "action",
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}"
245 "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
251 "xtype": "HttpProxy",
252 "|url": "baseURL + '/Roo/Events.php'",
257 "xtype": "JsonReader",
258 "totalProperty": "total",
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]"
270 "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}",
271 "|render": "function (_self)\n{\n _this.affectSel = _self;\n}"
274 "displayField": "on_table",
276 "emptyText": "Select Affects",
277 "forceSelection": true,
279 "loadingText": "Searching...",
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",
289 "valueField": "action",
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}"
301 "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
307 "xtype": "HttpProxy",
308 "|url": "baseURL + '/Roo/Events.php'",
313 "xtype": "JsonReader",
314 "totalProperty": "total",
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]"
327 "*prop": "colModel[]",
328 "dataIndex": "on_table",
332 "xtype": "ColumnModel",
333 "|renderer": "function(v) { return String.format('{0}', v); }",
337 "*prop": "colModel[]",
339 "header": "#Affected",
342 "xtype": "ColumnModel",
343 "|renderer": "function(v) { return String.format('{0}', v); }",
347 "*prop": "colModel[]",
352 "xtype": "ColumnModel",
353 "|renderer": "function(v) { return String.format('{0}', v); }",
362 "|activate": "function() {\n _this.detailpanel = this;\n if (_this.detailgrid) {\n _this.detailgrid.footer.onClick('first');\n }\n}"
365 "fitContainer": true,
368 "tableName": "Events",
370 "xtype": "GridPanel",
375 "|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}"
378 "autoExpandColumn": "person_name",
384 "*prop": "dataSource",
387 "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
392 "xtype": "HttpProxy",
394 "|url": "baseURL + '/Roo/Events.php'",
399 "xtype": "JsonReader",
400 "totalProperty": "total",
404 "|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]"
410 "xtype": "PagingToolbar",
413 "displayMsg": "Displaying Events{0} - {1} of {2}",
414 "emptyMsg": "No Events found",
425 "cls": "x-btn-text-icon",
426 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
428 "|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 "|xns": "Roo.Toolbar"
435 "cls": "x-btn-text-icon",
436 "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
438 "|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 "|xns": "Roo.Toolbar"
444 "cls": "x-btn-text-icon",
445 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
448 "|click": "function()\n{\n Pman.genericDelete(_this, 'Events'); \n}\n "
450 "|xns": "Roo.Toolbar"
455 "xtype": "ColumnModel",
459 "|renderer": "function(v) { return String.format('{0}', v); }",
461 "*prop": "colModel[]"
464 "xtype": "ColumnModel",
465 "header": "Person name",
467 "dataIndex": "person_name",
468 "|renderer": "function(v) { return String.format('{0}', v); }",
470 "*prop": "colModel[]"
473 "xtype": "ColumnModel",
474 "header": "Event when",
476 "dataIndex": "event_when",
477 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
479 "*prop": "colModel[]"
482 "xtype": "ColumnModel",
485 "dataIndex": "action",
486 "|renderer": "function(v) { return String.format('{0}', v); }",
488 "*prop": "colModel[]"
491 "xtype": "ColumnModel",
494 "dataIndex": "ipaddr",
495 "|renderer": "function(v) { return String.format('{0}', v); }",
497 "*prop": "colModel[]"
500 "xtype": "ColumnModel",
503 "dataIndex": "on_id",
504 "|renderer": "function(v) { return String.format('{0}', v); }",
506 "*prop": "colModel[]"
509 "xtype": "ColumnModel",
510 "header": "On table",
512 "dataIndex": "on_table",
513 "|renderer": "function(v) { return String.format('{0}', v); }",
515 "*prop": "colModel[]"
518 "xtype": "ColumnModel",
521 "dataIndex": "person_id",
522 "|renderer": "function(v) { return String.format('{0}', v); }",
524 "*prop": "colModel[]"
527 "xtype": "ColumnModel",
530 "dataIndex": "remarks",
531 "|renderer": "function(v) { return String.format('{0}', v); }",
533 "*prop": "colModel[]"