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');
66 xns : Roo.bootstrap.panel,
67 '|xns' : 'Roo.bootstrap.panel',
70 xns : Roo.bootstrap.layout,
71 '|xns' : 'Roo.bootstrap.layout',
76 xns : Roo.bootstrap.layout,
77 '|xns' : 'Roo.bootstrap.layout'
82 cls : 'event-south-pane',
87 xns : Roo.bootstrap.layout,
88 '|xns' : 'Roo.bootstrap.layout'
95 title : _this._strings['06bff0cfe47afca536033ab51f4e2cdc'] /* Log View */,
97 render : function (_self)
99 _this.viewPanel = _self;
102 xns : Roo.bootstrap.panel,
103 '|xns' : 'Roo.bootstrap.panel'
110 title : _this._strings['a3ec0cd6d6acd83df3e2095c5edcf8b5'] /* Log Grid */,
112 activate : function (_self)
117 _this.table.footer.onClick('first');
122 render : function (_self)
127 xns : Roo.bootstrap.panel,
128 '|xns' : 'Roo.bootstrap.panel',
130 xtype : 'NavSimplebar',
132 '|xns' : 'Roo.bootstrap',
137 '|xns' : 'Roo.bootstrap',
142 '|xns' : 'Roo.bootstrap',
147 '|xns' : 'Roo.bootstrap',
153 '|xns' : 'Roo.bootstrap',
159 '|xns' : 'Roo.bootstrap',
162 xtype : 'FieldLabel',
163 cls : 'roo-toolbar-label',
164 html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
165 style : 'line-height: 34px;',
167 '|xns' : 'Roo.bootstrap'
175 '|xns' : 'Roo.bootstrap',
181 displayField : 'name',
183 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 '|xns' : 'Roo.bootstrap',
579 displayField : 'action',
581 forceSelection : true,
584 placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
586 triggerAction : 'all',
590 render : function (_self)
592 _this.actionSel = this;
594 select : function (combo, record, index)
596 _this.table.footer.onClick('first');
600 '|xns' : 'Roo.bootstrap',
604 sortInfo : { field : 'action' , direction : 'ASC' },
606 beforeload : function (_self, o)
608 o.params = o.params || {};
611 // staff can see all logs, other companies can only see their own.
612 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
613 o.params.company_id = Pman.Login.authUser.company_id;
616 o.params.limit = 9999;
617 o.params._distinct = 'action';
619 o.params._columns ='action';
627 url : baseURL + '/Roo/Events',
632 xtype : 'JsonReader',
639 'name': 'person_name',
643 'name': 'event_when',
645 'dateFormat': 'Y-m-d'
672 'name': 'person_id_id',
676 'name': 'person_id_office_id',
680 'name': 'person_id_name',
684 'name': 'person_id_phone',
688 'name': 'person_id_fax',
692 'name': 'person_id_email',
696 'name': 'person_id_company_id',
700 'name': 'person_id_role',
704 'name': 'person_id_active',
708 'name': 'person_id_remarks',
712 'name': 'person_id_passwd',
716 'name': 'person_id_owner_id',
720 'name': 'person_id_lang',
724 'name': 'person_id_no_reset_sent',
728 'name': 'person_id_action_type',
732 'name': 'person_id_project_id',
736 'name': 'person_id_deleted_by',
740 'name': 'person_id_deleted_dt',
755 '|xns' : 'Roo.bootstrap',
761 displayField : 'on_table',
763 forceSelection : true,
766 placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
768 triggerAction : 'all',
772 render : function (_self)
774 _this.affectSel = this;
776 select : function (combo, record, index)
778 _this.table.footer.onClick('first');
782 '|xns' : 'Roo.bootstrap',
786 sortInfo : '{ field : \'on_table\' , direction : \'ASC\' }',
788 beforeload : function (_self, o)
790 o.params = o.params || {};
793 // staff can see all logs, other companies can only see their own.
794 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
795 o.params.company_id = Pman.Login.authUser.company_id;
798 o.params.limit = 9999;
799 o.params._distinct = 'on_table';
801 o.params._columns ='on_table';
809 url : baseURL + '/Roo/Events',
814 xtype : 'JsonReader',
821 'name': 'person_name',
825 'name': 'event_when',
827 'dateFormat': 'Y-m-d'
854 'name': 'person_id_id',
858 'name': 'person_id_office_id',
862 'name': 'person_id_name',
866 'name': 'person_id_phone',
870 'name': 'person_id_fax',
874 'name': 'person_id_email',
878 'name': 'person_id_company_id',
882 'name': 'person_id_role',
886 'name': 'person_id_active',
890 'name': 'person_id_remarks',
894 'name': 'person_id_passwd',
898 'name': 'person_id_owner_id',
902 'name': 'person_id_lang',
906 'name': 'person_id_no_reset_sent',
910 'name': 'person_id_action_type',
914 'name': 'person_id_project_id',
918 'name': 'person_id_deleted_by',
922 'name': 'person_id_deleted_dt',
937 '|xns' : 'Roo.bootstrap',
940 xtype : 'FieldLabel',
941 cls : 'roo-toolbar-label',
942 html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
943 style : 'line-height: 34px;',
945 '|xns' : 'Roo.bootstrap'
953 '|xns' : 'Roo.bootstrap',
957 placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
959 change : function (_self, newValue, oldValue)
961 _this.table.footer.onClick('first');
963 render : function (_self)
965 _this.dateFrom = _self;
969 '|xns' : 'Roo.bootstrap'
977 '|xns' : 'Roo.bootstrap',
981 placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
983 change : function (_self, newValue, oldValue)
985 _this.table.footer.onClick('first');
987 render : function (_self)
989 _this.dateTo = _self;
993 '|xns' : 'Roo.bootstrap'
1009 cls : 'table-fixed',
1013 rowSelection : true,
1016 render : function (_self)
1019 _this.table = _self;
1022 rowdblclick : function (_self, el, rowIndex, e)
1025 if (!_this.dialog) {
1028 _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
1030 _this.table.footer.onClick('first');
1036 xns : Roo.bootstrap,
1037 '|xns' : 'Roo.bootstrap',
1039 xtype : 'PagingToolbar',
1040 displayInfo : false,
1041 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
1042 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
1046 render : function (_self)
1048 _this.footer = _self;
1051 xns : Roo.bootstrap,
1052 '|xns' : 'Roo.bootstrap'
1059 rowSelection : true,
1060 sortInfo : { field: 'event_when', direction: 'DESC'},
1063 beforeload : function (_self, o)
1065 if (!Pman.buildCompleted) {
1069 o.params = o.params || {};
1071 o.params.person_id = _this.personSel.getValue();
1073 var act = _this.actionSel.getValue();
1077 o.params.action = act;
1080 var tbl = _this.affectSel.getValue();
1084 o.params.on_table = tbl;
1088 var f = _this.dateFrom.getValue().split("/");
1090 var df_string = f[2]+"-"+f[0]+"-"+f[1];
1092 var df = new Date(Date.parse(f));
1094 var t = _this.dateTo.getValue().split("/");
1096 var dt_string = t[2]+"-"+t[0]+"-"+t[1];
1098 var dt = new Date(Date.parse(t));
1101 _this.dateFrom.format &&
1103 _this.dateTo.format &&
1107 o.params['query[from]'] = df_string;
1109 o.params['query[to]'] = dt_string;
1114 load : function (_self, records, options)
1120 '|xns' : 'Roo.data',
1122 xtype : 'HttpProxy',
1124 url : baseURL + '/Roo/Events',
1126 load : function (This, o, arg)
1128 //_this.table.footer.onClick('first');
1135 xtype : 'JsonReader',
1142 'name': 'person_name',
1146 'name': 'event_when',
1148 'dateFormat': 'Y-m-d'
1167 'name': 'person_id',
1175 'name': 'person_id_id',
1179 'name': 'person_id_office_id',
1183 'name': 'person_id_name',
1187 'name': 'person_id_phone',
1191 'name': 'person_id_fax',
1195 'name': 'person_id_email',
1199 'name': 'person_id_company_id',
1203 'name': 'person_id_role',
1207 'name': 'person_id_active',
1211 'name': 'person_id_remarks',
1215 'name': 'person_id_passwd',
1219 'name': 'person_id_owner_id',
1223 'name': 'person_id_lang',
1227 'name': 'person_id_no_reset_sent',
1231 'name': 'person_id_action_type',
1235 'name': 'person_id_project_id',
1239 'name': 'person_id_deleted_by',
1243 'name': 'person_id_deleted_dt',
1249 totalProperty : 'total',
1255 xtype : 'RowSelectionModel',
1256 singleSelect : true,
1258 afterselectionchange : function (_self)
1261 if (!this.getSelected()) {
1263 _this.viewPanel.setContent("Nothing Selected");
1269 var id = this.getSelected().data.id;
1271 _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
1275 xns : Roo.bootstrap.Table,
1276 '|xns' : 'Roo.bootstrap.Table'
1280 xtype : 'ColumnModel',
1281 dataIndex : 'event_when',
1282 header : _this._strings['4e97aeeaa8b15ca1180fcd1f3ac478d1'] /* When */,
1284 renderer : function(v) { return v ? v.dateFormat('Y/m/d H:i') : ''; },
1292 xtype : 'ColumnModel',
1294 header : _this._strings['1b7f7d24575cdbfadb83b9587fa1bf97'] /* #id */,
1296 renderer : function(v) { return String.format('{0}', v); },
1304 xtype : 'ColumnModel',
1305 dataIndex : 'person_id_name',
1306 header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
1308 renderer : function(v) { return String.format('{0}', v); },
1316 xtype : 'ColumnModel',
1317 dataIndex : 'action',
1318 header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1320 renderer : function(v) { return String.format('{0}', v); },
1327 xtype : 'ColumnModel',
1328 dataIndex : 'ipaddr',
1329 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
1331 renderer : function(v) { return String.format('{0}', v); },
1338 xtype : 'ColumnModel',
1339 dataIndex : 'on_table',
1340 header : _this._strings['2c92a9a6a5dbf570825e62eabcdecd8d'] /* Affected */,
1342 renderer : function(v, x, r) {
1344 return v ? String.format('{0}({1})', v, r.data.on_id) : '';
1353 xtype : 'ColumnModel',
1354 dataIndex : 'remarks',
1355 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1357 renderer : function(v) { return String.format('{0}', v); },