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 "rowclick": "function (_self, rowIndex, e)\n{\n _this.detailgrid.footer.onClick('first');\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",
385 "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.person_id = 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}"
387 "*prop": "dataSource",
390 "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
395 "xtype": "HttpProxy",
397 "|url": "baseURL + '/Roo/Events.php'",
402 "xtype": "JsonReader",
403 "totalProperty": "total",
407 "|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]"
413 "xtype": "PagingToolbar",
416 "displayMsg": "Displaying Events{0} - {1} of {2}",
417 "emptyMsg": "No Events found",
428 "cls": "x-btn-text-icon",
429 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
431 "|click": "function()\n{\n if (!_this.dialog) return;\n _this.dialog.show( { id : 0 } , function() {\n _this.grid.footer.onClick('first');\n }); \n}\n"
433 "|xns": "Roo.Toolbar"
438 "cls": "x-btn-text-icon",
439 "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
441 "|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"
443 "|xns": "Roo.Toolbar"
447 "cls": "x-btn-text-icon",
448 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
451 "|click": "function()\n{\n Pman.genericDelete(_this, 'Events'); \n}\n "
453 "|xns": "Roo.Toolbar"
458 "*prop": "colModel[]",
462 "xtype": "ColumnModel",
463 "|renderer": "function(v) { return String.format('{0}', v); }",
467 "xtype": "ColumnModel",
468 "header": "Event when",
470 "dataIndex": "event_when",
471 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
473 "*prop": "colModel[]"
476 "*prop": "colModel[]",
477 "dataIndex": "action",
480 "xtype": "ColumnModel",
481 "|renderer": "function(v) { return String.format('{0}', v); }",
485 "*prop": "colModel[]",
486 "dataIndex": "ipaddr",
489 "xtype": "ColumnModel",
490 "|renderer": "function(v) { return String.format('{0}', v); }",
494 "*prop": "colModel[]",
495 "dataIndex": "on_id",
498 "xtype": "ColumnModel",
499 "|renderer": "function(v) { return String.format('{0}', v); }",
503 "xtype": "ColumnModel",
506 "dataIndex": "remarks",
507 "|renderer": "function(v) { return String.format('{0}', v); }",
509 "*prop": "colModel[]"