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 : 'line-height: 34px;',
168 '|xns' : 'Roo.bootstrap'
176 '|xns' : 'Roo.bootstrap',
182 displayField : 'name',
184 forceSelection : true,
185 loadingText : _this._strings['098f6bcd4621d373cade4e832627b4f6'] /* test */,
187 placeholder : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
189 triggerAction : 'all',
193 render : function (_self)
195 _this.personSel = this;
198 select : function (combo, record, index)
200 _this.table.footer.onClick('first');
204 '|xns' : 'Roo.bootstrap',
208 sortInfo : {field : 'name' , direction : 'ASC'},
210 beforeload : function (_self, o)
212 o.params = o.params || {};
213 o.params.limit = 9999;
221 url : baseURL+'/Roo/Core_person',
226 xtype : 'JsonReader',
253 'name': 'company_id',
281 'name': 'no_reset_sent',
285 'name': 'action_type',
289 'name': 'project_id',
293 'name': 'deleted_by',
297 'name': 'deleted_dt',
299 'dateFormat': 'Y-m-d'
302 'name': 'office_id_id',
306 'name': 'office_id_company_id',
310 'name': 'office_id_name',
314 'name': 'office_id_address',
318 'name': 'office_id_phone',
322 'name': 'office_id_fax',
326 'name': 'office_id_email',
330 'name': 'office_id_role',
334 'name': 'company_id_code',
338 'name': 'company_id_name',
342 'name': 'company_id_remarks',
346 'name': 'company_id_owner_id',
350 'name': 'company_id_address',
354 'name': 'company_id_tel',
358 'name': 'company_id_fax',
362 'name': 'company_id_email',
366 'name': 'company_id_id',
370 'name': 'company_id_isOwner',
374 'name': 'company_id_logo_id',
378 'name': 'company_id_background_color',
382 'name': 'company_id_comptype',
386 'name': 'company_id_url',
390 'name': 'company_id_main_office_id',
394 'name': 'company_id_created_by',
398 'name': 'company_id_created_dt',
402 'name': 'company_id_updated_by',
406 'name': 'company_id_updated_dt',
410 'name': 'company_id_passwd',
414 'name': 'company_id_dispatch_port',
418 'name': 'company_id_province',
422 'name': 'company_id_country',
426 'name': 'project_id_id',
430 'name': 'project_id_name',
434 'name': 'project_id_remarks',
438 'name': 'project_id_owner_id',
442 'name': 'project_id_code',
446 'name': 'project_id_active',
450 'name': 'project_id_type',
454 'name': 'project_id_client_id',
458 'name': 'project_id_team_id',
462 'name': 'project_id_file_location',
466 'name': 'project_id_open_date',
470 'name': 'project_id_open_by',
474 'name': 'project_id_close_date',
478 'name': 'project_id_countries',
482 'name': 'project_id_languages',
486 'name': 'project_id_agency_id',
490 'name': 'owner_id_id',
494 'name': 'owner_id_office_id',
498 'name': 'owner_id_name',
502 'name': 'owner_id_phone',
506 'name': 'owner_id_fax',
510 'name': 'owner_id_email',
514 'name': 'owner_id_company_id',
518 'name': 'owner_id_role',
522 'name': 'owner_id_active',
526 'name': 'owner_id_remarks',
530 'name': 'owner_id_passwd',
534 'name': 'owner_id_owner_id',
538 'name': 'owner_id_lang',
542 'name': 'owner_id_no_reset_sent',
546 'name': 'owner_id_action_type',
550 'name': 'owner_id_project_id',
554 'name': 'owner_id_deleted_by',
558 'name': 'owner_id_deleted_dt',
573 render : function (_self)
577 if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
583 '|xns' : 'Roo.bootstrap',
589 displayField : 'action',
591 forceSelection : true,
594 placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
596 triggerAction : 'all',
600 render : function (_self)
602 _this.actionSel = this;
605 select : function (combo, record, index)
607 _this.table.footer.onClick('first');
611 '|xns' : 'Roo.bootstrap',
615 sortInfo : { field : 'action' , direction : 'ASC' },
617 beforeload : function (_self, o)
619 o.params = o.params || {};
622 // staff can see all logs, other companies can only see their own.
623 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
624 o.params.company_id = Pman.Login.authUser.company_id;
627 o.params.limit = 9999;
628 o.params._distinct = 'action';
630 o.params._columns ='action';
638 url : baseURL + '/Roo/Events',
643 xtype : 'JsonReader',
650 'name': 'person_name',
654 'name': 'event_when',
656 'dateFormat': 'Y-m-d'
683 'name': 'person_id_id',
687 'name': 'person_id_office_id',
691 'name': 'person_id_name',
695 'name': 'person_id_phone',
699 'name': 'person_id_fax',
703 'name': 'person_id_email',
707 'name': 'person_id_company_id',
711 'name': 'person_id_role',
715 'name': 'person_id_active',
719 'name': 'person_id_remarks',
723 'name': 'person_id_passwd',
727 'name': 'person_id_owner_id',
731 'name': 'person_id_lang',
735 'name': 'person_id_no_reset_sent',
739 'name': 'person_id_action_type',
743 'name': 'person_id_project_id',
747 'name': 'person_id_deleted_by',
751 'name': 'person_id_deleted_dt',
766 render : function (_self)
770 if(appDisabled.indexOf('Core.SuperAdmin') * 1 != -1) {
776 '|xns' : 'Roo.bootstrap',
782 displayField : 'on_table',
784 forceSelection : true,
787 placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
789 triggerAction : 'all',
793 render : function (_self)
795 _this.affectSel = this;
797 select : function (combo, record, index)
799 _this.table.footer.onClick('first');
803 '|xns' : 'Roo.bootstrap',
807 sortInfo : '{ field : \'on_table\' , direction : \'ASC\' }',
809 beforeload : function (_self, o)
811 o.params = o.params || {};
814 // staff can see all logs, other companies can only see their own.
815 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
816 o.params.company_id = Pman.Login.authUser.company_id;
819 o.params.limit = 9999;
820 o.params._distinct = 'on_table';
822 o.params._columns ='on_table';
830 url : baseURL + '/Roo/Events',
835 xtype : 'JsonReader',
842 'name': 'person_name',
846 'name': 'event_when',
848 'dateFormat': 'Y-m-d'
875 'name': 'person_id_id',
879 'name': 'person_id_office_id',
883 'name': 'person_id_name',
887 'name': 'person_id_phone',
891 'name': 'person_id_fax',
895 'name': 'person_id_email',
899 'name': 'person_id_company_id',
903 'name': 'person_id_role',
907 'name': 'person_id_active',
911 'name': 'person_id_remarks',
915 'name': 'person_id_passwd',
919 'name': 'person_id_owner_id',
923 'name': 'person_id_lang',
927 'name': 'person_id_no_reset_sent',
931 'name': 'person_id_action_type',
935 'name': 'person_id_project_id',
939 'name': 'person_id_deleted_by',
943 'name': 'person_id_deleted_dt',
958 '|xns' : 'Roo.bootstrap',
961 xtype : 'FieldLabel',
962 cls : 'roo-toolbar-label',
963 html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
964 style : 'line-height: 34px;',
966 '|xns' : 'Roo.bootstrap'
974 '|xns' : 'Roo.bootstrap',
978 placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
980 change : function (_self, newValue, oldValue)
982 _this.table.footer.onClick('first');
984 render : function (_self)
986 _this.dateFrom = _self;
990 '|xns' : 'Roo.bootstrap'
998 '|xns' : 'Roo.bootstrap',
1001 xtype : 'DateField',
1002 placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
1004 change : function (_self, newValue, oldValue)
1006 _this.table.footer.onClick('first');
1008 render : function (_self)
1010 _this.dateTo = _self;
1013 xns : Roo.bootstrap,
1014 '|xns' : 'Roo.bootstrap'
1022 cls : 'roo-toolbar',
1023 xns : Roo.bootstrap,
1024 '|xns' : 'Roo.bootstrap',
1029 xns : Roo.bootstrap,
1030 '|xns' : 'Roo.bootstrap',
1033 xtype : 'FieldLabel',
1034 cls : 'roo-toolbar-label',
1035 html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
1036 style : 'line-height: 34px; width: 80px;',
1038 render : function (_self)
1040 this.indicator.setVisibilityMode(Roo.Element.DISPLAY).hide();
1043 xns : Roo.bootstrap,
1044 '|xns' : 'Roo.bootstrap'
1060 cls : 'table-fixed',
1064 rowSelection : true,
1067 render : function (_self)
1070 _this.table = _self;
1073 rowdblclick : function (_self, el, rowIndex, e)
1076 if (!_this.dialog) {
1079 _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
1081 _this.table.footer.onClick('first');
1087 xns : Roo.bootstrap,
1088 '|xns' : 'Roo.bootstrap',
1090 xtype : 'PagingToolbar',
1091 displayInfo : false,
1092 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
1093 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
1097 render : function (_self)
1099 _this.footer = _self;
1102 xns : Roo.bootstrap,
1103 '|xns' : 'Roo.bootstrap'
1110 rowSelection : true,
1111 sortInfo : { field: 'event_when', direction: 'DESC'},
1114 beforeload : function (_self, o)
1116 if (!Pman.buildCompleted) {
1120 o.params = o.params || {};
1122 o.params.person_id = _this.personSel.getValue();
1124 var act = _this.actionSel.getValue();
1128 o.params.action = act;
1131 var tbl = _this.affectSel.getValue();
1135 o.params.on_table = tbl;
1139 var f = _this.dateFrom.getValue().split("/");
1141 var df_string = f[2]+"-"+f[0]+"-"+f[1];
1143 var df = new Date(Date.parse(f));
1145 var t = _this.dateTo.getValue().split("/");
1147 var dt_string = t[2]+"-"+t[0]+"-"+t[1];
1149 var dt = new Date(Date.parse(t));
1152 _this.dateFrom.format &&
1154 _this.dateTo.format &&
1158 o.params['query[from]'] = df_string;
1160 o.params['query[to]'] = dt_string;
1165 load : function (_self, records, options)
1171 '|xns' : 'Roo.data',
1173 xtype : 'HttpProxy',
1175 url : baseURL + '/Roo/Events',
1177 load : function (This, o, arg)
1179 //_this.table.footer.onClick('first');
1186 xtype : 'JsonReader',
1193 'name': 'person_name',
1197 'name': 'event_when',
1199 'dateFormat': 'Y-m-d'
1218 'name': 'person_id',
1226 'name': 'person_id_id',
1230 'name': 'person_id_office_id',
1234 'name': 'person_id_name',
1238 'name': 'person_id_phone',
1242 'name': 'person_id_fax',
1246 'name': 'person_id_email',
1250 'name': 'person_id_company_id',
1254 'name': 'person_id_role',
1258 'name': 'person_id_active',
1262 'name': 'person_id_remarks',
1266 'name': 'person_id_passwd',
1270 'name': 'person_id_owner_id',
1274 'name': 'person_id_lang',
1278 'name': 'person_id_no_reset_sent',
1282 'name': 'person_id_action_type',
1286 'name': 'person_id_project_id',
1290 'name': 'person_id_deleted_by',
1294 'name': 'person_id_deleted_dt',
1300 totalProperty : 'total',
1306 xtype : 'RowSelectionModel',
1307 singleSelect : true,
1309 afterselectionchange : function (_self)
1312 if (!this.getSelected()) {
1314 _this.viewPanel.setContent("Nothing Selected");
1320 var id = this.getSelected().data.id;
1322 _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
1326 xns : Roo.bootstrap.Table,
1327 '|xns' : 'Roo.bootstrap.Table'
1331 xtype : 'ColumnModel',
1332 dataIndex : 'event_when',
1333 header : _this._strings['4e97aeeaa8b15ca1180fcd1f3ac478d1'] /* When */,
1335 renderer : function(v) { return v ? v.dateFormat('Y/m/d H:i') : ''; },
1343 xtype : 'ColumnModel',
1345 header : _this._strings['1b7f7d24575cdbfadb83b9587fa1bf97'] /* #id */,
1347 renderer : function(v) { return String.format('{0}', v); },
1355 xtype : 'ColumnModel',
1356 dataIndex : 'person_id_name',
1357 header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
1359 renderer : function(v) { return String.format('{0}', v); },
1367 xtype : 'ColumnModel',
1368 dataIndex : 'action',
1369 header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1371 renderer : function(v) { return String.format('{0}', v); },
1378 xtype : 'ColumnModel',
1379 dataIndex : 'ipaddr',
1380 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
1382 renderer : function(v) { return String.format('{0}', v); },
1389 xtype : 'ColumnModel',
1390 dataIndex : 'on_table',
1391 header : _this._strings['2c92a9a6a5dbf570825e62eabcdecd8d'] /* Affected */,
1393 renderer : function(v, x, r) {
1395 return v ? String.format('{0}({1})', v, r.data.on_id) : '';
1404 xtype : 'ColumnModel',
1405 dataIndex : 'remarks',
1406 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1408 renderer : function(v) { return String.format('{0}', v); },