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.BAdminLogEvents = new Roo.XComponent({
10 '90275c90e270853fee34db3b87d24d7c' :"Date Range <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>",
11 '231bc72756b5e6de492aaaa1577f61b1' :"Remarks",
12 '87f9f735a1d36793ceaecd4e47124b63' :"Events",
13 '87557f11575c0ad78e4e28abedc13b6e' :"End",
14 '1b7f7d24575cdbfadb83b9587fa1bf97' :"#id",
15 '098f6bcd4621d373cade4e832627b4f6' :"test",
16 '10927a67903afd162cc29267d434a2bb' :"select action",
17 'c759559b750d502a5be8dceae85ed841' :"select affected",
18 'fc6f97505d89fe9277965c126744647a' :"No Companies found",
19 '06bff0cfe47afca536033ab51f4e2cdc' :"Log View",
20 'a12a3079e14ced46e69ba52b8a90b21a' :"IP",
21 'a3ec0cd6d6acd83df3e2095c5edcf8b5' :"Log Grid",
22 '155ca6a755e25c15ad7ce45e2f638f10' :"Displaying Companies{0} - {1} of {2}",
23 '4e97aeeaa8b15ca1180fcd1f3ac478d1' :"When",
24 '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person",
25 '004bf6c9a40003140292e97330236c53' :"Action",
26 'a6122a65eaa676f700ae68d393054a37' :"Start",
27 'e09692a588440a717f79563aed7ac7e5' :"select person",
28 '31c03fdb82204f0ac1fe916b2c713c8c' :"Show <i class=\"fa fa-search\" aria-hidden=\"true\"></i>",
29 '2c92a9a6a5dbf570825e62eabcdecd8d' :"Affected"
32 part : ["BAdmin", "LogEvents" ],
33 order : '001-Pman.Tab.BAdminLogEvents',
35 parent : 'Pman.Tab.BAdminLogs',
36 name : "Pman.Tab.BAdminLogEvents",
39 _tree : function(_data)
45 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
46 xns : Roo.bootstrap.panel,
47 '|xns' : 'Roo.bootstrap.panel',
50 xns : Roo.bootstrap.layout,
51 '|xns' : 'Roo.bootstrap.layout',
56 xns : Roo.bootstrap.layout,
57 '|xns' : 'Roo.bootstrap.layout'
66 xns : Roo.bootstrap.layout,
67 '|xns' : 'Roo.bootstrap.layout'
74 title : _this._strings['06bff0cfe47afca536033ab51f4e2cdc'] /* Log View */,
76 render : function (_self)
78 _this.viewPanel = _self;
81 xns : Roo.bootstrap.panel,
82 '|xns' : 'Roo.bootstrap.panel'
89 title : _this._strings['a3ec0cd6d6acd83df3e2095c5edcf8b5'] /* Log Grid */,
91 activate : function (_self)
96 _this.table.footer.onClick('first');
101 render : function (_self)
106 xns : Roo.bootstrap.panel,
107 '|xns' : 'Roo.bootstrap.panel',
109 xtype : 'NavSimplebar',
111 '|xns' : 'Roo.bootstrap',
116 '|xns' : 'Roo.bootstrap',
121 '|xns' : 'Roo.bootstrap',
126 '|xns' : 'Roo.bootstrap',
132 '|xns' : 'Roo.bootstrap',
138 '|xns' : 'Roo.bootstrap',
141 xtype : 'FieldLabel',
142 html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
143 style : 'float: right; padding: 10px',
145 '|xns' : 'Roo.bootstrap'
153 '|xns' : 'Roo.bootstrap',
159 displayField : 'name',
161 forceSelection : true,
163 loadingText : _this._strings['098f6bcd4621d373cade4e832627b4f6'] /* test */,
165 placeholder : _this._strings['e09692a588440a717f79563aed7ac7e5'] /* select person */,
167 triggerAction : 'all',
171 render : function (_self)
173 _this.personSel = this;
176 select : function (combo, record, index)
178 _this.table.footer.onClick('first');
182 '|xns' : 'Roo.bootstrap',
186 sortInfo : {field : 'name' , direction : 'ASC'},
188 beforeload : function (_self, o)
190 o.params = o.params || {};
198 url : baseURL+'/Roo/Core_person',
203 xtype : 'JsonReader',
230 'name': 'company_id',
258 'name': 'no_reset_sent',
262 'name': 'action_type',
266 'name': 'project_id',
270 'name': 'deleted_by',
274 'name': 'deleted_dt',
276 'dateFormat': 'Y-m-d'
279 'name': 'office_id_id',
283 'name': 'office_id_company_id',
287 'name': 'office_id_name',
291 'name': 'office_id_address',
295 'name': 'office_id_phone',
299 'name': 'office_id_fax',
303 'name': 'office_id_email',
307 'name': 'office_id_role',
311 'name': 'company_id_code',
315 'name': 'company_id_name',
319 'name': 'company_id_remarks',
323 'name': 'company_id_owner_id',
327 'name': 'company_id_address',
331 'name': 'company_id_tel',
335 'name': 'company_id_fax',
339 'name': 'company_id_email',
343 'name': 'company_id_id',
347 'name': 'company_id_isOwner',
351 'name': 'company_id_logo_id',
355 'name': 'company_id_background_color',
359 'name': 'company_id_comptype',
363 'name': 'company_id_url',
367 'name': 'company_id_main_office_id',
371 'name': 'company_id_created_by',
375 'name': 'company_id_created_dt',
379 'name': 'company_id_updated_by',
383 'name': 'company_id_updated_dt',
387 'name': 'company_id_passwd',
391 'name': 'company_id_dispatch_port',
395 'name': 'company_id_province',
399 'name': 'company_id_country',
403 'name': 'project_id_id',
407 'name': 'project_id_name',
411 'name': 'project_id_remarks',
415 'name': 'project_id_owner_id',
419 'name': 'project_id_code',
423 'name': 'project_id_active',
427 'name': 'project_id_type',
431 'name': 'project_id_client_id',
435 'name': 'project_id_team_id',
439 'name': 'project_id_file_location',
443 'name': 'project_id_open_date',
447 'name': 'project_id_open_by',
451 'name': 'project_id_close_date',
455 'name': 'project_id_countries',
459 'name': 'project_id_languages',
463 'name': 'project_id_agency_id',
467 'name': 'owner_id_id',
471 'name': 'owner_id_office_id',
475 'name': 'owner_id_name',
479 'name': 'owner_id_phone',
483 'name': 'owner_id_fax',
487 'name': 'owner_id_email',
491 'name': 'owner_id_company_id',
495 'name': 'owner_id_role',
499 'name': 'owner_id_active',
503 'name': 'owner_id_remarks',
507 'name': 'owner_id_passwd',
511 'name': 'owner_id_owner_id',
515 'name': 'owner_id_lang',
519 'name': 'owner_id_no_reset_sent',
523 'name': 'owner_id_action_type',
527 'name': 'owner_id_project_id',
531 'name': 'owner_id_deleted_by',
535 'name': 'owner_id_deleted_dt',
550 '|xns' : 'Roo.bootstrap',
556 displayField : 'action',
558 forceSelection : true,
561 placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
563 triggerAction : 'all',
567 render : function (_self)
569 _this.actionSel = this;
571 select : function (combo, record, index)
573 _this.table.footer.onClick('first');
577 '|xns' : 'Roo.bootstrap',
581 sortInfo : { field : 'action' , direction : 'ASC' },
583 beforeload : function (_self, o)
585 o.params = o.params || {};
588 // staff can see all logs, other companies can only see their own.
589 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
590 o.params.company_id = Pman.Login.authUser.company_id;
594 o.params._distinct = 'action';
596 o.params._columns ='action';
604 url : baseURL + '/Roo/Events',
609 xtype : 'JsonReader',
616 'name': 'person_name',
620 'name': 'event_when',
622 'dateFormat': 'Y-m-d'
649 'name': 'person_id_id',
653 'name': 'person_id_office_id',
657 'name': 'person_id_name',
661 'name': 'person_id_phone',
665 'name': 'person_id_fax',
669 'name': 'person_id_email',
673 'name': 'person_id_company_id',
677 'name': 'person_id_role',
681 'name': 'person_id_active',
685 'name': 'person_id_remarks',
689 'name': 'person_id_passwd',
693 'name': 'person_id_owner_id',
697 'name': 'person_id_lang',
701 'name': 'person_id_no_reset_sent',
705 'name': 'person_id_action_type',
709 'name': 'person_id_project_id',
713 'name': 'person_id_deleted_by',
717 'name': 'person_id_deleted_dt',
732 '|xns' : 'Roo.bootstrap',
738 displayField : 'on_table',
740 forceSelection : true,
743 placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
745 triggerAction : 'all',
749 render : function (_self)
751 _this.affectSel = this;
753 select : function (combo, record, index)
755 _this.table.footer.onClick('first');
759 '|xns' : 'Roo.bootstrap',
763 sortInfo : '{ field : \'on_table\' , direction : \'ASC\' }',
765 beforeload : function (_self, o)
767 o.params = o.params || {};
770 // staff can see all logs, other companies can only see their own.
771 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
772 o.params.company_id = Pman.Login.authUser.company_id;
776 o.params._distinct = 'on_table';
778 o.params._columns ='on_table';
786 url : baseURL + '/Roo/Events',
791 xtype : 'JsonReader',
798 'name': 'person_name',
802 'name': 'event_when',
804 'dateFormat': 'Y-m-d'
831 'name': 'person_id_id',
835 'name': 'person_id_office_id',
839 'name': 'person_id_name',
843 'name': 'person_id_phone',
847 'name': 'person_id_fax',
851 'name': 'person_id_email',
855 'name': 'person_id_company_id',
859 'name': 'person_id_role',
863 'name': 'person_id_active',
867 'name': 'person_id_remarks',
871 'name': 'person_id_passwd',
875 'name': 'person_id_owner_id',
879 'name': 'person_id_lang',
883 'name': 'person_id_no_reset_sent',
887 'name': 'person_id_action_type',
891 'name': 'person_id_project_id',
895 'name': 'person_id_deleted_by',
899 'name': 'person_id_deleted_dt',
914 '|xns' : 'Roo.bootstrap',
917 xtype : 'FieldLabel',
918 html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
919 style : 'float: right; padding: 10px;',
921 '|xns' : 'Roo.bootstrap'
929 '|xns' : 'Roo.bootstrap',
933 placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
935 change : function (_self, newValue, oldValue)
937 _this.table.footer.onClick('first');
939 render : function (_self)
941 _this.dateFrom = _self;
945 '|xns' : 'Roo.bootstrap'
953 '|xns' : 'Roo.bootstrap',
957 placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
959 change : function (_self, newValue, oldValue)
961 _this.table.footer.onClick('first');
963 render : function (_self)
965 _this.dateTo = _self;
969 '|xns' : 'Roo.bootstrap'
992 render : function (_self)
998 rowdblclick : function (_self, el, rowIndex, e)
1001 if (!_this.dialog) {
1004 _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
1006 _this.table.footer.onClick('first');
1012 xns : Roo.bootstrap,
1013 '|xns' : 'Roo.bootstrap',
1015 xtype : 'PagingToolbar',
1016 displayInfo : false,
1017 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
1018 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
1022 render : function (_self)
1024 _this.footer = _self;
1027 xns : Roo.bootstrap,
1028 '|xns' : 'Roo.bootstrap'
1035 rowSelection : true,
1036 sortInfo : { field: 'event_when', direction: 'DESC'},
1039 beforeload : function (_self, o)
1041 o.params = o.params || {};
1043 o.params.person_id = _this.personSel.getValue();
1045 var act = _this.actionSel.getValue();
1049 o.params.action = act;
1052 var tbl = _this.affectSel.getValue();
1056 o.params.on_table = tbl;
1060 var f = _this.dateFrom.getValue().split("/");
1062 var df_string = f[2]+"-"+f[0]+"-"+f[1];
1064 var df = new Date(Date.parse(f));
1066 var t = _this.dateTo.getValue().split("/");
1068 var dt_string = t[2]+"-"+t[0]+"-"+t[1];
1070 var dt = new Date(Date.parse(t));
1073 _this.dateFrom.format &&
1075 _this.dateTo.format &&
1079 o.params['query[from]'] = df_string;
1081 o.params['query[to]'] = dt_string;
1086 load : function (_self, records, options)
1092 '|xns' : 'Roo.data',
1094 xtype : 'HttpProxy',
1096 url : baseURL + '/Roo/Events',
1098 load : function (This, o, arg)
1100 //_this.table.footer.onClick('first');
1107 xtype : 'JsonReader',
1114 'name': 'person_name',
1118 'name': 'event_when',
1120 'dateFormat': 'Y-m-d'
1139 'name': 'person_id',
1147 'name': 'person_id_id',
1151 'name': 'person_id_office_id',
1155 'name': 'person_id_name',
1159 'name': 'person_id_phone',
1163 'name': 'person_id_fax',
1167 'name': 'person_id_email',
1171 'name': 'person_id_company_id',
1175 'name': 'person_id_role',
1179 'name': 'person_id_active',
1183 'name': 'person_id_remarks',
1187 'name': 'person_id_passwd',
1191 'name': 'person_id_owner_id',
1195 'name': 'person_id_lang',
1199 'name': 'person_id_no_reset_sent',
1203 'name': 'person_id_action_type',
1207 'name': 'person_id_project_id',
1211 'name': 'person_id_deleted_by',
1215 'name': 'person_id_deleted_dt',
1221 totalProperty : 'total',
1227 xtype : 'RowSelectionModel',
1229 afterselectionchange : function (_self)
1232 if (!this.getSelected()) {
1234 _this.viewPanel.setContent("Nothing Selected");
1240 var id = this.getSelected().data.id;
1242 _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
1246 xns : Roo.bootstrap.Table,
1247 '|xns' : 'Roo.bootstrap.Table'
1251 xtype : 'ColumnModel',
1252 dataIndex : 'event_when',
1253 header : _this._strings['4e97aeeaa8b15ca1180fcd1f3ac478d1'] /* When */,
1255 renderer : function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; },
1263 xtype : 'ColumnModel',
1265 header : _this._strings['1b7f7d24575cdbfadb83b9587fa1bf97'] /* #id */,
1267 renderer : function(v) { return String.format('{0}', v); },
1275 xtype : 'ColumnModel',
1276 dataIndex : 'person_id_name',
1277 header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
1279 renderer : function(v) { return String.format('{0}', v); },
1287 xtype : 'ColumnModel',
1288 dataIndex : 'action',
1289 header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1291 renderer : function(v) { return String.format('{0}', v); },
1298 xtype : 'ColumnModel',
1299 dataIndex : 'ipaddr',
1300 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
1302 renderer : function(v) { return String.format('{0}', v); },
1309 xtype : 'ColumnModel',
1310 dataIndex : 'on_table',
1311 header : _this._strings['2c92a9a6a5dbf570825e62eabcdecd8d'] /* Affected */,
1313 renderer : function(v, x, r) {
1315 return v ? String.format('{0}({1})', v, r.data.on_id) : '';
1324 xtype : 'ColumnModel',
1325 dataIndex : 'remarks',
1326 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1328 renderer : function(v) { return String.format('{0}', v); },