1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.AdminLogDrill = new Roo.XComponent({
10 '7a11042f53957727d8667732d7de1102' :"Ipaddr",
11 '231bc72756b5e6de492aaaa1577f61b1' :"Remarks",
12 '87f9f735a1d36793ceaecd4e47124b63' :"Events",
13 '490aa6e856ccf208a054389e47ce0d06' :"Id",
14 '739cea2b85156183f917f2ccaa10a50c' :"#ID",
15 '591933c26da312455c63b6bc1ec046bc' :"(function() { var d = new Date();d = d.add(Date.MONTH, 1) ; return d.format('Y-m-01'); })()",
16 'd9578744f1d4b13d40a51fbb8b9d6ea5' :"Person name",
17 'e1edab2a061a49e21790204249b1aee9' :"(function() { var d = new Date(); return d.format('Y-m-01'); })()",
18 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
19 '51c45b795d5d18a3e4e0c37e8b20a141' :"Table",
20 '6be4aa550791c310e098cd6c234af7d8' :"Event when",
21 '679308a758de538c5f39c4c6cdba6593' :"Select Affects",
22 'c112bb3542e98308d12d5ecb10a67abc' :"Changes",
23 'a254c25adc7d10d7e9c4889484f875a5' :"Detail",
24 '7205d42d6d975c911bc1147259d78935' :"Displaying Events{0} - {1} of {2}",
25 '39b9e051f9fe75e65c7a330bb00499d4' :"Date Range",
26 'a8929eb5c1553d3f70497f862d25d0ce' :"Select Action",
27 '004bf6c9a40003140292e97330236c53' :"Action",
28 'f971b3a2cc583b475332380649a4fa05' :"Daily summary",
29 '0668a37e3eb3480f0444f8da7bc446ba' :"Event Drilldown",
30 'b5fe0746885b906c8ed9b7cc06023c35' :"#Affected",
31 '90e4ac2e5a22e53df63b6b186d8727ba' :"No Events found"
34 part : ["Admin", "LogDrill" ],
35 order : '003-Pman.Tab.AdminLogDrill',
37 parent : 'Pman.Tab.AdminLogs',
38 name : "Pman.Tab.AdminLogDrill",
41 _tree : function(_data)
46 xtype : 'NestedLayoutPanel',
49 title : _this._strings['0668a37e3eb3480f0444f8da7bc446ba'] /* Event Drilldown */,
59 text : _this._strings['39b9e051f9fe75e65c7a330bb00499d4'] /* Date Range */,
61 '|xns' : 'Roo.Toolbar'
66 value : (function() { var d = new Date(); return d.format('Y-m-01'); })(),
68 change : function (_self, newValue, oldValue)
70 _this.dategrid.ds.load({});
72 render : function (_self)
74 _this.dateFrom = _self;
83 value : (function() { var d = new Date();d = d.add(Date.MONTH, 1) ; return d.format('Y-m-01'); })(),
85 change : function (_self, newValue, oldValue)
87 _this.dategrid.ds.load({});
89 render : function (_self)
100 displayField : 'action',
102 emptyText : _this._strings['a8929eb5c1553d3f70497f862d25d0ce'] /* Select Action */,
103 forceSelection : true,
105 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
109 qtip : _this._strings['a8929eb5c1553d3f70497f862d25d0ce'] /* Select Action */,
110 queryParam : 'query[action]',
111 selectOnFocus : true,
112 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>',
113 triggerAction : 'all',
115 valueField : 'action',
118 render : function (_self)
120 _this.actionSel = _self;
122 select : function (combo, record, index)
124 _this.dategrid.ds.load({});
132 sortInfo : { field : 'action' , direction : 'ASC' },
134 beforeload : function (_self, o)
136 o.params = o.params || {};
137 // staff can see all logs, other companies can only see their own.
138 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
139 o.params.company_id = Pman.Login.authUser.company_id;
141 o.params._distinct = 'action';
142 o.params._columns ='action';
151 url : baseURL + '/Roo/Events.php',
156 xtype : 'JsonReader',
163 'name': 'person_name',
167 'name': 'event_when',
169 'dateFormat': 'Y-m-d'
196 'name': 'person_id_id',
200 'name': 'person_id_office_id',
204 'name': 'person_id_name',
208 'name': 'person_id_phone',
212 'name': 'person_id_fax',
216 'name': 'person_id_email',
220 'name': 'person_id_company_id',
224 'name': 'person_id_role',
228 'name': 'person_id_active',
232 'name': 'person_id_remarks',
236 'name': 'person_id_passwd',
240 'name': 'person_id_owner_id',
244 'name': 'person_id_lang',
248 'name': 'person_id_no_reset_sent',
252 'name': 'person_id_action_type',
256 'name': 'person_id_project_id',
260 'name': 'person_id_deleted_by',
264 'name': 'person_id_deleted_dt',
270 totalProperty : 'total',
279 displayField : 'on_table',
281 emptyText : _this._strings['679308a758de538c5f39c4c6cdba6593'] /* Select Affects */,
282 forceSelection : true,
284 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
288 qtip : _this._strings['a8929eb5c1553d3f70497f862d25d0ce'] /* Select Action */,
289 queryParam : 'query[on_table]',
290 selectOnFocus : true,
291 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>',
292 triggerAction : 'all',
294 valueField : 'action',
297 render : function (_self)
299 _this.affectSel = _self;
301 select : function (combo, record, index)
303 _this.dategrid.ds.load({});
311 sortInfo : { field : 'on_table' , direction : 'ASC' },
313 beforeload : function (_self, o)
315 o.params = o.params || {};
316 // staff can see all logs, other companies can only see their own.
317 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
318 o.params.company_id = Pman.Login.authUser.company_id;
320 o.params._distinct = 'on_table';
321 o.params._columns ='on_table';
330 url : baseURL + '/Roo/Events.php',
335 xtype : 'JsonReader',
342 'name': 'person_name',
346 'name': 'event_when',
348 'dateFormat': 'Y-m-d'
375 'name': 'person_id_id',
379 'name': 'person_id_office_id',
383 'name': 'person_id_name',
387 'name': 'person_id_phone',
391 'name': 'person_id_fax',
395 'name': 'person_id_email',
399 'name': 'person_id_company_id',
403 'name': 'person_id_role',
407 'name': 'person_id_active',
411 'name': 'person_id_remarks',
415 'name': 'person_id_passwd',
419 'name': 'person_id_owner_id',
423 'name': 'person_id_lang',
427 'name': 'person_id_no_reset_sent',
431 'name': 'person_id_action_type',
435 'name': 'person_id_project_id',
439 'name': 'person_id_deleted_by',
443 'name': 'person_id_deleted_dt',
449 totalProperty : 'total',
458 xtype : 'BorderLayout',
462 xtype : 'LayoutRegion',
467 xtype : 'LayoutRegion',
475 xtype : 'LayoutRegion',
488 tableName : 'Events',
489 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
491 activate : function() {
492 _this.datepanel = this;
493 if (_this.dategrid) {
494 _this.dategrid.ds.load({});
502 autoExpandColumn : 'person_name',
507 _this.dategrid = this;
508 //_this.dialog = Pman.Dialog.FILL_IN
509 if (_this.panel.active) {
513 rowclick : function (_self, rowIndex, e)
515 _this.tablegrid.footer.onClick('first');
523 sortInfo : { field : 'person_id_name', direction: 'ASC' },
525 beforeload : function (_self, o)
529 if (! _this.dateFrom) {
534 _this.tablegrid.ds.removeAll();
535 _this.panel.layout.getRegion('east').getActivePanel().grid.ds.removeAll();
540 o.params = o.params || {};
542 var act = _this.actionSel ? _this.actionSel.getValue() : '';
544 o.params.action = act;
546 var tbl = _this.affectSel ? _this.affectSel.getValue() : '';
548 o.params.on_table = tbl;
550 act = _this.dateFrom.getValue();
552 o.params['query[from]'] = act.format('Y-m-d');
554 act = _this.dateTo.getValue();
556 o.params['query[to]'] = act.format('Y-m-d');
561 o.params['query[person_sum]'] = 1;
562 o.params._columns = 'person_id,person_id_name,person_id_email,qty,uqty';
563 o.params.limit = 999;
572 url : baseURL + '/Roo/Events.php',
577 xtype : 'JsonReader',
584 'name': 'person_name',
588 'name': 'event_when',
590 'dateFormat': 'Y-m-d'
617 'name': 'person_id_id',
621 'name': 'person_id_office_id',
625 'name': 'person_id_name',
629 'name': 'person_id_phone',
633 'name': 'person_id_fax',
637 'name': 'person_id_email',
641 'name': 'person_id_company_id',
645 'name': 'person_id_role',
649 'name': 'person_id_active',
653 'name': 'person_id_remarks',
657 'name': 'person_id_passwd',
661 'name': 'person_id_owner_id',
665 'name': 'person_id_lang',
669 'name': 'person_id_no_reset_sent',
673 'name': 'person_id_action_type',
677 'name': 'person_id_project_id',
681 'name': 'person_id_deleted_by',
685 'name': 'person_id_deleted_dt',
691 totalProperty : 'total',
698 xtype : 'ColumnModel',
699 dataIndex : 'person_id_name',
700 header : _this._strings['d9578744f1d4b13d40a51fbb8b9d6ea5'] /* Person name */,
701 renderer : function(v,x,r) {
702 return String.format('{0} <<a href="mailto:{1}">{1}</a>>', v, r.data.person_id_email);
710 xtype : 'ColumnModel',
712 header : _this._strings['b5fe0746885b906c8ed9b7cc06023c35'] /* #Affected */,
713 renderer : function(v) { return String.format('{0}', v); },
720 xtype : 'ColumnModel',
722 header : _this._strings['c112bb3542e98308d12d5ecb10a67abc'] /* Changes */,
723 renderer : function(v) { return String.format('{0}', v); },
738 tableName : 'Events',
739 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
741 activate : function() {
742 _this.tablepanel = this;
743 if (_this.tablegrid) {
744 _this.tablegrid.footer.onClick('first');
752 autoExpandColumn : 'person_name',
757 _this.tablegrid = this;
758 //_this.dialog = Pman.Dialog.FILL_IN
759 if (_this.tablepanel.active) {
760 this.footer.onClick('first');
763 rowclick : function (_self, rowIndex, e)
766 _this.panel.layout.getRegion('east').getActivePanel().grid.footer.onClick('first');
772 xtype : 'PagingToolbar',
774 displayMsg : _this._strings['7205d42d6d975c911bc1147259d78935'] /* Displaying Events{0} - {1} of {2} */,
775 emptyMsg : _this._strings['90e4ac2e5a22e53df63b6b186d8727ba'] /* No Events found */,
783 sortInfo : { field : 'on_table', direction: 'ASC' },
785 beforeload : function (_self, o)
787 if (! _this.dategrid) {
791 _this.panel.layout.getRegion('east').getActivePanel().grid.ds.removeAll();
797 var s = _this.dategrid.selModel.getSelected();
799 _this.tablegrid.view.el.mask("Select a person");
802 _this.tablegrid.view.el.unmask();
804 o.params = o.params || {};
805 var act = _this.actionSel.getValue();
807 o.params.action = act;
809 var tbl = _this.affectSel.getValue();
811 o.params.on_table = tbl;
814 act = _this.dateFrom.getValue();
816 o.params['query[from]'] = act.format('Y-m-d');
818 act = _this.dateTo.getValue();
820 o.params['query[to]'] = act.format('Y-m-d');
822 o.params.person_id = s.data.person_id;
823 o.params['query[table_sum]'] = 1;
824 o.params._columns = 'on_table,qty,uqty';
834 url : baseURL + '/Roo/Events.php',
839 xtype : 'JsonReader',
846 'name': 'person_name',
850 'name': 'event_when',
852 'dateFormat': 'Y-m-d'
879 'name': 'person_id_id',
883 'name': 'person_id_office_id',
887 'name': 'person_id_name',
891 'name': 'person_id_phone',
895 'name': 'person_id_fax',
899 'name': 'person_id_email',
903 'name': 'person_id_company_id',
907 'name': 'person_id_role',
911 'name': 'person_id_active',
915 'name': 'person_id_remarks',
919 'name': 'person_id_passwd',
923 'name': 'person_id_owner_id',
927 'name': 'person_id_lang',
931 'name': 'person_id_no_reset_sent',
935 'name': 'person_id_action_type',
939 'name': 'person_id_project_id',
943 'name': 'person_id_deleted_by',
947 'name': 'person_id_deleted_dt',
953 totalProperty : 'total',
960 xtype : 'ColumnModel',
961 dataIndex : 'on_table',
962 header : _this._strings['51c45b795d5d18a3e4e0c37e8b20a141'] /* Table */,
963 renderer : function(v) {
965 return "Login / Logout / Errors";
967 return String.format('{0}', v);
975 xtype : 'ColumnModel',
977 header : _this._strings['b5fe0746885b906c8ed9b7cc06023c35'] /* #Affected */,
978 renderer : function(v) { return String.format('{0}', v); },
985 xtype : 'ColumnModel',
987 header : _this._strings['c112bb3542e98308d12d5ecb10a67abc'] /* Changes */,
988 renderer : function(v) { return String.format('{0}', v); },
1000 fitContainer : true,
1003 tableName : 'Events',
1004 title : _this._strings['a254c25adc7d10d7e9c4889484f875a5'] /* Detail */,
1006 activate : function() {
1007 _this.detailpanel = this;
1008 if (_this.detailgrid) {
1009 _this.detailgrid.footer.onClick('first');
1017 autoExpandColumn : 'person_name',
1022 _this.detailgrid = this;
1023 //_this.dialog = Pman.Dialog.FILL_IN
1024 if (_this.detailpanel.active) {
1025 this.footer.onClick('first');
1030 '|xns' : 'Roo.grid',
1032 xtype : 'PagingToolbar',
1034 displayMsg : _this._strings['7205d42d6d975c911bc1147259d78935'] /* Displaying Events{0} - {1} of {2} */,
1035 emptyMsg : _this._strings['90e4ac2e5a22e53df63b6b186d8727ba'] /* No Events found */,
1043 sortInfo : { field : 'event_when', direction: 'DESC' },
1045 beforeload : function (_self, o)
1047 if (! _this.dategrid) {
1051 o.params = o.params || {};
1053 var s = _this.dategrid.selModel.getSelected();
1055 _this.detailgrid.view.el.mask("Select a person");
1059 o.params.person_id = s.data.person_id;
1061 var s = _this.tablegrid.selModel.getSelected();
1063 _this.detailgrid.view.el.mask("Select a table");
1066 o.params.on_table = s.data.on_table;
1068 _this.detailgrid.view.el.unmask();
1070 var act = _this.actionSel.getValue();
1072 o.params.action = act;
1074 var tbl = _this.affectSel.getValue();
1076 o.params.on_table = tbl;
1080 act = _this.dateFrom.getValue();
1082 o.params['query[from]'] = act.format('Y-m-d');
1084 act = _this.dateTo.getValue();
1086 o.params['query[to]'] = act.format('Y-m-d');
1089 //o.params['query[table_d]'] = 1;
1090 //o.params._columns = 'on_table,qty,uqty';
1096 '|xns' : 'Roo.data',
1098 xtype : 'HttpProxy',
1100 url : baseURL + '/Roo/Events.php',
1105 xtype : 'JsonReader',
1112 'name': 'person_name',
1116 'name': 'event_when',
1118 'dateFormat': 'Y-m-d'
1137 'name': 'person_id',
1145 'name': 'person_id_id',
1149 'name': 'person_id_office_id',
1153 'name': 'person_id_name',
1157 'name': 'person_id_phone',
1161 'name': 'person_id_fax',
1165 'name': 'person_id_email',
1169 'name': 'person_id_company_id',
1173 'name': 'person_id_role',
1177 'name': 'person_id_active',
1181 'name': 'person_id_remarks',
1185 'name': 'person_id_passwd',
1189 'name': 'person_id_owner_id',
1193 'name': 'person_id_lang',
1197 'name': 'person_id_no_reset_sent',
1201 'name': 'person_id_action_type',
1205 'name': 'person_id_project_id',
1209 'name': 'person_id_deleted_by',
1213 'name': 'person_id_deleted_dt',
1219 totalProperty : 'total',
1226 xtype : 'ColumnModel',
1228 header : _this._strings['490aa6e856ccf208a054389e47ce0d06'] /* Id */,
1229 renderer : function(v) { return String.format('{0}', v); },
1235 xtype : 'ColumnModel',
1236 dataIndex : 'event_when',
1237 header : _this._strings['6be4aa550791c310e098cd6c234af7d8'] /* Event when */,
1238 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
1244 xtype : 'ColumnModel',
1245 dataIndex : 'action',
1246 header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1247 renderer : function(v) { return String.format('{0}', v); },
1253 xtype : 'ColumnModel',
1254 dataIndex : 'ipaddr',
1255 header : _this._strings['7a11042f53957727d8667732d7de1102'] /* Ipaddr */,
1256 renderer : function(v) { return String.format('{0}', v); },
1262 xtype : 'ColumnModel',
1263 dataIndex : 'on_id',
1264 header : _this._strings['739cea2b85156183f917f2ccaa10a50c'] /* #ID */,
1265 renderer : function(v) { return String.format('{0}', v); },
1271 xtype : 'ColumnModel',
1272 dataIndex : 'remarks',
1273 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1274 renderer : function(v) { return String.format('{0}', v); },
1283 xtype : 'GridPanel',
1285 fitContainer : true,
1288 tableName : 'Events',
1289 title : _this._strings['f971b3a2cc583b475332380649a4fa05'] /* Daily summary */,
1291 activate : function() {
1292 _this.daypanel = this;
1293 if (_this.daygrid) {
1294 _this.daygrid.footer.onClick('first');
1302 autoExpandColumn : 'person_name',
1307 _this.daygrid = this;
1308 //_this.dialog = Pman.Dialog.FILL_IN
1309 if (_this.daypanel.active) {
1310 this.footer.onClick('first');
1315 '|xns' : 'Roo.grid',
1317 xtype : 'PagingToolbar',
1319 displayMsg : _this._strings['7205d42d6d975c911bc1147259d78935'] /* Displaying Events{0} - {1} of {2} */,
1320 emptyMsg : _this._strings['90e4ac2e5a22e53df63b6b186d8727ba'] /* No Events found */,
1328 sortInfo : { field : 'on_day', direction: 'ASC' },
1330 beforeload : function (_self, o)
1332 if (! _this.dategrid) {
1336 o.params = o.params || {};
1338 var s = _this.dategrid.selModel.getSelected();
1340 _this.detailgrid.view.el.mask("Select a person");
1344 o.params.person_id = s.data.person_id;
1346 var s = _this.tablegrid.selModel.getSelected();
1348 _this.detailgrid.view.el.mask("Select a table");
1351 o.params.on_table = s.data.on_table;
1353 _this.detailgrid.view.el.unmask();
1355 var act = _this.actionSel.getValue();
1357 o.params.action = act;
1359 var tbl = _this.affectSel.getValue();
1361 o.params.on_table = tbl;
1365 act = _this.dateFrom.getValue();
1367 o.params['query[from]'] = act.format('Y-m-d');
1369 act = _this.dateTo.getValue();
1371 o.params['query[to]'] = act.format('Y-m-d');
1374 o.params['query[day_sum]'] = 1;
1375 o.params._columns = 'on_day,qty,uqty';
1381 '|xns' : 'Roo.data',
1383 xtype : 'HttpProxy',
1385 url : baseURL + '/Roo/Events.php',
1390 xtype : 'JsonReader',
1397 'name': 'person_name',
1401 'name': 'event_when',
1403 'dateFormat': 'Y-m-d'
1422 'name': 'person_id',
1430 'name': 'person_id_id',
1434 'name': 'person_id_office_id',
1438 'name': 'person_id_name',
1442 'name': 'person_id_phone',
1446 'name': 'person_id_fax',
1450 'name': 'person_id_email',
1454 'name': 'person_id_company_id',
1458 'name': 'person_id_role',
1462 'name': 'person_id_active',
1466 'name': 'person_id_remarks',
1470 'name': 'person_id_passwd',
1474 'name': 'person_id_owner_id',
1478 'name': 'person_id_lang',
1482 'name': 'person_id_no_reset_sent',
1486 'name': 'person_id_action_type',
1490 'name': 'person_id_project_id',
1494 'name': 'person_id_deleted_by',
1498 'name': 'person_id_deleted_dt',
1504 totalProperty : 'total',
1511 xtype : 'ColumnModel',
1512 dataIndex : 'on_day',
1513 header : _this._strings['6be4aa550791c310e098cd6c234af7d8'] /* Event when */,
1514 renderer : function(v) { return String.format('{0}', v ); },
1521 xtype : 'ColumnModel',
1523 header : _this._strings['b5fe0746885b906c8ed9b7cc06023c35'] /* #Affected */,
1524 renderer : function(v) { return String.format('{0}', v); },
1531 xtype : 'ColumnModel',
1533 header : _this._strings['c112bb3542e98308d12d5ecb10a67abc'] /* Changes */,
1534 renderer : function(v) { return String.format('{0}', v); },