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 '340c2ee497b85d5954b01c64de7f44f6' :"Select Person",
24 '4e97aeeaa8b15ca1180fcd1f3ac478d1' :"When",
25 '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person",
26 '004bf6c9a40003140292e97330236c53' :"Action",
27 'a6122a65eaa676f700ae68d393054a37' :"Start",
28 '31c03fdb82204f0ac1fe916b2c713c8c' :"Show <i class=\"fa fa-search\" aria-hidden=\"true\"></i>",
29 '2c92a9a6a5dbf570825e62eabcdecd8d' :"Affected"
32 'footer_displayMsg' : '155ca6a755e25c15ad7ce45e2f638f10' /* Displaying Companies{0} - {1} of {2} */ ,
33 'footer_emptyMsg' : 'fc6f97505d89fe9277965c126744647a' /* No Companies found */
36 part : ["BAdmin", "LogEvents" ],
37 order : '001-Pman.Tab.BAdminLogEvents',
39 parent : 'Pman.Tab.BAdminLogs',
40 name : "Pman.Tab.BAdminLogEvents",
43 _tree : function(_data)
49 title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
51 activate : function (_self)
53 if(!document.getElementsByClassName('event-south-pane')) {
57 document.getElementsByClassName('event-south-pane')[0].classList.remove('disable-pane');
60 appDisabled.indexOf('Core.SuperAdmin') * 1 != -1
62 document.getElementsByClassName('event-south-pane')[0].classList.add('disable-pane');
67 xns : Roo.bootstrap.panel,
68 '|xns' : 'Roo.bootstrap.panel',
71 xns : Roo.bootstrap.layout,
72 '|xns' : 'Roo.bootstrap.layout',
77 xns : Roo.bootstrap.layout,
78 '|xns' : 'Roo.bootstrap.layout'
83 cls : 'event-south-pane',
88 xns : Roo.bootstrap.layout,
89 '|xns' : 'Roo.bootstrap.layout'
96 title : _this._strings['06bff0cfe47afca536033ab51f4e2cdc'] /* Log View */,
98 render : function (_self)
100 _this.viewPanel = _self;
103 xns : Roo.bootstrap.panel,
104 '|xns' : 'Roo.bootstrap.panel'
111 title : _this._strings['a3ec0cd6d6acd83df3e2095c5edcf8b5'] /* Log Grid */,
113 activate : function (_self)
118 _this.table.footer.onClick('first');
123 render : function (_self)
128 xns : Roo.bootstrap.panel,
129 '|xns' : 'Roo.bootstrap.panel',
131 xtype : 'NavSimplebar',
133 '|xns' : 'Roo.bootstrap',
138 '|xns' : 'Roo.bootstrap',
143 '|xns' : 'Roo.bootstrap',
148 '|xns' : 'Roo.bootstrap',
154 '|xns' : 'Roo.bootstrap',
160 '|xns' : 'Roo.bootstrap',
163 xtype : 'FieldLabel',
164 cls : 'roo-toolbar-label',
165 html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
166 style : 'float: left; line-height: 34px; width: 80px;',
168 render : function (_self)
170 this.indicator.setVisibilityMode(Roo.Element.DISPLAY).hide();
174 '|xns' : 'Roo.bootstrap'
180 displayField : 'name',
182 forceSelection : true,
183 loadingText : _this._strings['098f6bcd4621d373cade4e832627b4f6'] /* test */,
185 placeholder : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
187 style : 'float: left; width: 300px;',
188 triggerAction : 'all',
192 render : function (_self)
194 _this.personSel = this;
197 select : function (combo, record, index)
199 _this.table.footer.onClick('first');
203 '|xns' : 'Roo.bootstrap',
207 sortInfo : {field : 'name' , direction : 'ASC'},
209 beforeload : function (_self, o)
211 o.params = o.params || {};
212 o.params.limit = 9999;
220 url : baseURL+'/Roo/Core_person',
225 xtype : 'JsonReader',
252 'name': 'company_id',
280 'name': 'no_reset_sent',
284 'name': 'action_type',
288 'name': 'project_id',
292 'name': 'deleted_by',
296 'name': 'deleted_dt',
298 'dateFormat': 'Y-m-d'
301 'name': 'office_id_id',
305 'name': 'office_id_company_id',
309 'name': 'office_id_name',
313 'name': 'office_id_address',
317 'name': 'office_id_phone',
321 'name': 'office_id_fax',
325 'name': 'office_id_email',
329 'name': 'office_id_role',
333 'name': 'company_id_code',
337 'name': 'company_id_name',
341 'name': 'company_id_remarks',
345 'name': 'company_id_owner_id',
349 'name': 'company_id_address',
353 'name': 'company_id_tel',
357 'name': 'company_id_fax',
361 'name': 'company_id_email',
365 'name': 'company_id_id',
369 'name': 'company_id_isOwner',
373 'name': 'company_id_logo_id',
377 'name': 'company_id_background_color',
381 'name': 'company_id_comptype',
385 'name': 'company_id_url',
389 'name': 'company_id_main_office_id',
393 'name': 'company_id_created_by',
397 'name': 'company_id_created_dt',
401 'name': 'company_id_updated_by',
405 'name': 'company_id_updated_dt',
409 'name': 'company_id_passwd',
413 'name': 'company_id_dispatch_port',
417 'name': 'company_id_province',
421 'name': 'company_id_country',
425 'name': 'project_id_id',
429 'name': 'project_id_name',
433 'name': 'project_id_remarks',
437 'name': 'project_id_owner_id',
441 'name': 'project_id_code',
445 'name': 'project_id_active',
449 'name': 'project_id_type',
453 'name': 'project_id_client_id',
457 'name': 'project_id_team_id',
461 'name': 'project_id_file_location',
465 'name': 'project_id_open_date',
469 'name': 'project_id_open_by',
473 'name': 'project_id_close_date',
477 'name': 'project_id_countries',
481 'name': 'project_id_languages',
485 'name': 'project_id_agency_id',
489 'name': 'owner_id_id',
493 'name': 'owner_id_office_id',
497 'name': 'owner_id_name',
501 'name': 'owner_id_phone',
505 'name': 'owner_id_fax',
509 'name': 'owner_id_email',
513 'name': 'owner_id_company_id',
517 'name': 'owner_id_role',
521 'name': 'owner_id_active',
525 'name': 'owner_id_remarks',
529 'name': 'owner_id_passwd',
533 'name': 'owner_id_owner_id',
537 'name': 'owner_id_lang',
541 'name': 'owner_id_no_reset_sent',
545 'name': 'owner_id_action_type',
549 'name': 'owner_id_project_id',
553 'name': 'owner_id_deleted_by',
557 'name': 'owner_id_deleted_dt',
570 displayField : 'action',
572 forceSelection : true,
574 placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
576 style : 'float: left; width: 300px; margin-left: 15px;',
577 triggerAction : 'all',
581 render : function (_self)
583 _this.actionSel = this;
587 if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
592 select : function (combo, record, index)
594 _this.table.footer.onClick('first');
598 '|xns' : 'Roo.bootstrap',
602 sortInfo : { field : 'action' , direction : 'ASC' },
604 beforeload : function (_self, o)
606 o.params = o.params || {};
609 // staff can see all logs, other companies can only see their own.
610 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
611 o.params.company_id = Pman.Login.authUser.company_id;
614 o.params.limit = 9999;
615 o.params._distinct = 'action';
617 o.params._columns ='action';
625 url : baseURL + '/Roo/Events',
630 xtype : 'JsonReader',
637 'name': 'person_name',
641 'name': 'event_when',
643 'dateFormat': 'Y-m-d'
670 'name': 'person_id_id',
674 'name': 'person_id_office_id',
678 'name': 'person_id_name',
682 'name': 'person_id_phone',
686 'name': 'person_id_fax',
690 'name': 'person_id_email',
694 'name': 'person_id_company_id',
698 'name': 'person_id_role',
702 'name': 'person_id_active',
706 'name': 'person_id_remarks',
710 'name': 'person_id_passwd',
714 'name': 'person_id_owner_id',
718 'name': 'person_id_lang',
722 'name': 'person_id_no_reset_sent',
726 'name': 'person_id_action_type',
730 'name': 'person_id_project_id',
734 'name': 'person_id_deleted_by',
738 'name': 'person_id_deleted_dt',
751 displayField : 'on_table',
753 forceSelection : true,
755 placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
757 style : 'float: left; width: 300px; margin-left: 15px;',
758 triggerAction : 'all',
762 render : function (_self)
764 _this.affectSel = this;
768 if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
773 select : function (combo, record, index)
775 _this.table.footer.onClick('first');
779 '|xns' : 'Roo.bootstrap',
783 sortInfo : '{ field : \'on_table\' , direction : \'ASC\' }',
785 beforeload : function (_self, o)
787 o.params = o.params || {};
790 // staff can see all logs, other companies can only see their own.
791 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
792 o.params.company_id = Pman.Login.authUser.company_id;
795 o.params.limit = 9999;
796 o.params._distinct = 'on_table';
798 o.params._columns ='on_table';
806 url : baseURL + '/Roo/Events',
811 xtype : 'JsonReader',
818 'name': 'person_name',
822 'name': 'event_when',
824 'dateFormat': 'Y-m-d'
851 'name': 'person_id_id',
855 'name': 'person_id_office_id',
859 'name': 'person_id_name',
863 'name': 'person_id_phone',
867 'name': 'person_id_fax',
871 'name': 'person_id_email',
875 'name': 'person_id_company_id',
879 'name': 'person_id_role',
883 'name': 'person_id_active',
887 'name': 'person_id_remarks',
891 'name': 'person_id_passwd',
895 'name': 'person_id_owner_id',
899 'name': 'person_id_lang',
903 'name': 'person_id_no_reset_sent',
907 'name': 'person_id_action_type',
911 'name': 'person_id_project_id',
915 'name': 'person_id_deleted_by',
919 'name': 'person_id_deleted_dt',
929 xtype : 'FieldLabel',
930 cls : 'roo-toolbar-label',
931 html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
932 style : 'float: left; line-height: 34px; width: 125px; margin-left: 15px;',
934 render : function (_self)
936 this.indicator.setVisibilityMode(Roo.Element.DISPLAY).hide();
940 '|xns' : 'Roo.bootstrap'
944 placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
945 style : 'float:left; width: 150px;',
947 change : function (_self, newValue, oldValue)
949 _this.table.footer.onClick('first');
951 render : function (_self)
953 _this.dateFrom = _self;
957 '|xns' : 'Roo.bootstrap'
961 placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
962 style : 'float:left; width: 150px; margin-left: 15px;',
964 change : function (_self, newValue, oldValue)
966 _this.table.footer.onClick('first');
968 render : function (_self)
970 _this.dateTo = _self;
974 '|xns' : 'Roo.bootstrap'
996 render : function (_self)
1000 if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
1001 this.colModel.setHidden(this.colModel.findColumnIndex('id'), true);
1002 this.colModel.setHidden(this.colModel.findColumnIndex('on_table'), true);
1003 this.colModel.setHidden(this.colModel.findColumnIndex('ipaddr'), true);
1004 this.colModel.getColumnByDataIndex('remarks').md = 7;
1005 this.colModel.getColumnByDataIndex('remarks').sm = 7;
1006 this.colModel.getColumnByDataIndex('remarks').xs = 7;
1010 rowdblclick : function (_self, el, rowIndex, e)
1013 if (!_this.dialog) {
1016 _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
1018 _this.table.footer.onClick('first');
1024 xns : Roo.bootstrap,
1025 '|xns' : 'Roo.bootstrap',
1027 xtype : 'PagingToolbar',
1028 displayInfo : false,
1029 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
1030 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
1034 render : function (_self)
1036 _this.footer = _self;
1039 xns : Roo.bootstrap,
1040 '|xns' : 'Roo.bootstrap'
1047 rowSelection : true,
1048 sortInfo : { field: 'event_when', direction: 'DESC'},
1051 beforeload : function (_self, o)
1053 if (!Pman.buildCompleted) {
1057 o.params = o.params || {};
1059 o.params.person_id = _this.personSel.getValue();
1061 var act = _this.actionSel.getValue();
1065 o.params.action = act;
1068 var tbl = _this.affectSel.getValue();
1072 o.params.on_table = tbl;
1076 var f = _this.dateFrom.getValue().split("/");
1078 var df_string = f[2]+"-"+f[0]+"-"+f[1];
1080 var df = new Date(Date.parse(f));
1082 var t = _this.dateTo.getValue().split("/");
1084 var dt_string = t[2]+"-"+t[0]+"-"+t[1];
1086 var dt = new Date(Date.parse(t));
1089 _this.dateFrom.format &&
1091 _this.dateTo.format &&
1095 o.params['query[from]'] = df_string;
1097 o.params['query[to]'] = dt_string;
1102 load : function (_self, records, options)
1108 '|xns' : 'Roo.data',
1110 xtype : 'HttpProxy',
1112 url : baseURL + '/Roo/Events',
1114 load : function (This, o, arg)
1116 //_this.table.footer.onClick('first');
1123 xtype : 'JsonReader',
1130 'name': 'person_name',
1134 'name': 'event_when',
1136 'dateFormat': 'Y-m-d'
1155 'name': 'person_id',
1163 'name': 'person_id_id',
1167 'name': 'person_id_office_id',
1171 'name': 'person_id_name',
1175 'name': 'person_id_phone',
1179 'name': 'person_id_fax',
1183 'name': 'person_id_email',
1187 'name': 'person_id_company_id',
1191 'name': 'person_id_role',
1195 'name': 'person_id_active',
1199 'name': 'person_id_remarks',
1203 'name': 'person_id_passwd',
1207 'name': 'person_id_owner_id',
1211 'name': 'person_id_lang',
1215 'name': 'person_id_no_reset_sent',
1219 'name': 'person_id_action_type',
1223 'name': 'person_id_project_id',
1227 'name': 'person_id_deleted_by',
1231 'name': 'person_id_deleted_dt',
1237 totalProperty : 'total',
1243 xtype : 'RowSelectionModel',
1244 singleSelect : true,
1246 afterselectionchange : function (_self)
1249 if (!this.getSelected()) {
1251 _this.viewPanel.setContent("Nothing Selected");
1257 var id = this.getSelected().data.id;
1259 _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
1263 xns : Roo.bootstrap.Table,
1264 '|xns' : 'Roo.bootstrap.Table'
1268 xtype : 'ColumnModel',
1269 dataIndex : 'event_when',
1270 header : _this._strings['4e97aeeaa8b15ca1180fcd1f3ac478d1'] /* When */,
1272 renderer : function(v) { return v ? v.dateFormat('Y/m/d H:i') : ''; },
1280 xtype : 'ColumnModel',
1282 header : _this._strings['1b7f7d24575cdbfadb83b9587fa1bf97'] /* #id */,
1284 renderer : function(v) { return String.format('{0}', v); },
1292 xtype : 'ColumnModel',
1293 dataIndex : 'person_id_name',
1294 header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
1296 renderer : function(v) { return String.format('{0}', v); },
1304 xtype : 'ColumnModel',
1305 dataIndex : 'action',
1306 header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1308 renderer : function(v)
1310 var vv = v.charAt(0).toUpperCase() + v.slice(1).toLowerCase();
1312 return String.format('{0}', vv);
1320 xtype : 'ColumnModel',
1321 dataIndex : 'ipaddr',
1322 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
1324 renderer : function(v) { return String.format('{0}', v); },
1331 xtype : 'ColumnModel',
1332 dataIndex : 'on_table',
1333 header : _this._strings['2c92a9a6a5dbf570825e62eabcdecd8d'] /* Affected */,
1335 renderer : function(v, x, r) {
1337 return v ? String.format('{0}({1})', v, r.data.on_id) : '';
1346 xtype : 'ColumnModel',
1347 dataIndex : 'remarks',
1348 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1350 renderer : function(v) { return String.format('{0}', v); },