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 '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> */,
166 '|xns' : 'Roo.bootstrap'
174 '|xns' : 'Roo.bootstrap',
180 displayField : 'name',
182 forceSelection : true,
184 loadingText : _this._strings['098f6bcd4621d373cade4e832627b4f6'] /* test */,
186 placeholder : _this._strings['e09692a588440a717f79563aed7ac7e5'] /* select person */,
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',
572 '|xns' : 'Roo.bootstrap',
578 displayField : 'action',
580 forceSelection : true,
583 placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
585 triggerAction : 'all',
589 render : function (_self)
591 _this.actionSel = this;
593 select : function (combo, record, index)
595 _this.table.footer.onClick('first');
599 '|xns' : 'Roo.bootstrap',
603 sortInfo : { field : 'action' , direction : 'ASC' },
605 beforeload : function (_self, o)
607 o.params = o.params || {};
610 // staff can see all logs, other companies can only see their own.
611 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
612 o.params.company_id = Pman.Login.authUser.company_id;
615 o.params.limit = 9999;
616 o.params._distinct = 'action';
618 o.params._columns ='action';
626 url : baseURL + '/Roo/Events',
631 xtype : 'JsonReader',
638 'name': 'person_name',
642 'name': 'event_when',
644 'dateFormat': 'Y-m-d'
671 'name': 'person_id_id',
675 'name': 'person_id_office_id',
679 'name': 'person_id_name',
683 'name': 'person_id_phone',
687 'name': 'person_id_fax',
691 'name': 'person_id_email',
695 'name': 'person_id_company_id',
699 'name': 'person_id_role',
703 'name': 'person_id_active',
707 'name': 'person_id_remarks',
711 'name': 'person_id_passwd',
715 'name': 'person_id_owner_id',
719 'name': 'person_id_lang',
723 'name': 'person_id_no_reset_sent',
727 'name': 'person_id_action_type',
731 'name': 'person_id_project_id',
735 'name': 'person_id_deleted_by',
739 'name': 'person_id_deleted_dt',
754 '|xns' : 'Roo.bootstrap',
760 displayField : 'on_table',
762 forceSelection : true,
765 placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
767 triggerAction : 'all',
771 render : function (_self)
773 _this.affectSel = this;
775 select : function (combo, record, index)
777 _this.table.footer.onClick('first');
781 '|xns' : 'Roo.bootstrap',
785 sortInfo : '{ field : \'on_table\' , direction : \'ASC\' }',
787 beforeload : function (_self, o)
789 o.params = o.params || {};
792 // staff can see all logs, other companies can only see their own.
793 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
794 o.params.company_id = Pman.Login.authUser.company_id;
797 o.params.limit = 9999;
798 o.params._distinct = 'on_table';
800 o.params._columns ='on_table';
808 url : baseURL + '/Roo/Events',
813 xtype : 'JsonReader',
820 'name': 'person_name',
824 'name': 'event_when',
826 'dateFormat': 'Y-m-d'
853 'name': 'person_id_id',
857 'name': 'person_id_office_id',
861 'name': 'person_id_name',
865 'name': 'person_id_phone',
869 'name': 'person_id_fax',
873 'name': 'person_id_email',
877 'name': 'person_id_company_id',
881 'name': 'person_id_role',
885 'name': 'person_id_active',
889 'name': 'person_id_remarks',
893 'name': 'person_id_passwd',
897 'name': 'person_id_owner_id',
901 'name': 'person_id_lang',
905 'name': 'person_id_no_reset_sent',
909 'name': 'person_id_action_type',
913 'name': 'person_id_project_id',
917 'name': 'person_id_deleted_by',
921 'name': 'person_id_deleted_dt',
936 '|xns' : 'Roo.bootstrap',
939 xtype : 'FieldLabel',
940 cls : 'roo-toolbar-label',
941 html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
943 '|xns' : 'Roo.bootstrap'
951 '|xns' : 'Roo.bootstrap',
955 placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
957 change : function (_self, newValue, oldValue)
959 _this.table.footer.onClick('first');
961 render : function (_self)
963 _this.dateFrom = _self;
967 '|xns' : 'Roo.bootstrap'
975 '|xns' : 'Roo.bootstrap',
979 placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
981 change : function (_self, newValue, oldValue)
983 _this.table.footer.onClick('first');
985 render : function (_self)
987 _this.dateTo = _self;
991 '|xns' : 'Roo.bootstrap'
1007 cls : 'table-fixed',
1011 rowSelection : true,
1014 render : function (_self)
1017 _this.table = _self;
1020 rowdblclick : function (_self, el, rowIndex, e)
1023 if (!_this.dialog) {
1026 _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
1028 _this.table.footer.onClick('first');
1034 xns : Roo.bootstrap,
1035 '|xns' : 'Roo.bootstrap',
1037 xtype : 'PagingToolbar',
1038 displayInfo : false,
1039 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
1040 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
1044 render : function (_self)
1046 _this.footer = _self;
1049 xns : Roo.bootstrap,
1050 '|xns' : 'Roo.bootstrap'
1057 rowSelection : true,
1058 sortInfo : { field: 'event_when', direction: 'DESC'},
1061 beforeload : function (_self, o)
1063 if (!Pman.buildCompleted) {
1067 o.params = o.params || {};
1069 o.params.person_id = _this.personSel.getValue();
1071 var act = _this.actionSel.getValue();
1075 o.params.action = act;
1078 var tbl = _this.affectSel.getValue();
1082 o.params.on_table = tbl;
1086 var f = _this.dateFrom.getValue().split("/");
1088 var df_string = f[2]+"-"+f[0]+"-"+f[1];
1090 var df = new Date(Date.parse(f));
1092 var t = _this.dateTo.getValue().split("/");
1094 var dt_string = t[2]+"-"+t[0]+"-"+t[1];
1096 var dt = new Date(Date.parse(t));
1099 _this.dateFrom.format &&
1101 _this.dateTo.format &&
1105 o.params['query[from]'] = df_string;
1107 o.params['query[to]'] = dt_string;
1112 load : function (_self, records, options)
1118 '|xns' : 'Roo.data',
1120 xtype : 'HttpProxy',
1122 url : baseURL + '/Roo/Events',
1124 load : function (This, o, arg)
1126 //_this.table.footer.onClick('first');
1133 xtype : 'JsonReader',
1140 'name': 'person_name',
1144 'name': 'event_when',
1146 'dateFormat': 'Y-m-d'
1165 'name': 'person_id',
1173 'name': 'person_id_id',
1177 'name': 'person_id_office_id',
1181 'name': 'person_id_name',
1185 'name': 'person_id_phone',
1189 'name': 'person_id_fax',
1193 'name': 'person_id_email',
1197 'name': 'person_id_company_id',
1201 'name': 'person_id_role',
1205 'name': 'person_id_active',
1209 'name': 'person_id_remarks',
1213 'name': 'person_id_passwd',
1217 'name': 'person_id_owner_id',
1221 'name': 'person_id_lang',
1225 'name': 'person_id_no_reset_sent',
1229 'name': 'person_id_action_type',
1233 'name': 'person_id_project_id',
1237 'name': 'person_id_deleted_by',
1241 'name': 'person_id_deleted_dt',
1247 totalProperty : 'total',
1253 xtype : 'RowSelectionModel',
1254 singleSelect : true,
1256 afterselectionchange : function (_self)
1259 if (!this.getSelected()) {
1261 _this.viewPanel.setContent("Nothing Selected");
1267 var id = this.getSelected().data.id;
1269 _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
1273 xns : Roo.bootstrap.Table,
1274 '|xns' : 'Roo.bootstrap.Table'
1278 xtype : 'ColumnModel',
1279 dataIndex : 'event_when',
1280 header : _this._strings['4e97aeeaa8b15ca1180fcd1f3ac478d1'] /* When */,
1282 renderer : function(v) { return v ? v.dateFormat('Y/m/d H:i') : ''; },
1290 xtype : 'ColumnModel',
1292 header : _this._strings['1b7f7d24575cdbfadb83b9587fa1bf97'] /* #id */,
1294 renderer : function(v) { return String.format('{0}', v); },
1302 xtype : 'ColumnModel',
1303 dataIndex : 'person_id_name',
1304 header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
1306 renderer : function(v) { return String.format('{0}', v); },
1314 xtype : 'ColumnModel',
1315 dataIndex : 'action',
1316 header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1318 renderer : function(v) { return String.format('{0}', v); },
1325 xtype : 'ColumnModel',
1326 dataIndex : 'ipaddr',
1327 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
1329 renderer : function(v) { return String.format('{0}', v); },
1336 xtype : 'ColumnModel',
1337 dataIndex : 'on_table',
1338 header : _this._strings['2c92a9a6a5dbf570825e62eabcdecd8d'] /* Affected */,
1340 renderer : function(v, x, r) {
1342 return v ? String.format('{0}({1})', v, r.data.on_id) : '';
1351 xtype : 'ColumnModel',
1352 dataIndex : 'remarks',
1353 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1355 renderer : function(v) { return String.format('{0}', v); },