Pman.Tab.BAdminLogEvents.bjs
[Pman.BAdmin] / Pman.Tab.BAdminLogEvents.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Tab');
6
7 Pman.Tab.BAdminLogEvents = new Roo.XComponent({
8
9  _strings : {
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"
30  },
31  _named_strings : {
32   'footer_displayMsg' : '155ca6a755e25c15ad7ce45e2f638f10' /* Displaying Companies{0} - {1} of {2} */ ,
33   'footer_emptyMsg' : 'fc6f97505d89fe9277965c126744647a' /* No Companies found */ 
34  },
35
36   part     :  ["BAdmin", "LogEvents" ],
37   order    : '001-Pman.Tab.BAdminLogEvents',
38   region   : 'center',
39   parent   : 'Pman.Tab.BAdminLogs',
40   name     : "Pman.Tab.BAdminLogEvents",
41   disabled : false, 
42   permname : '', 
43   _tree : function(_data)
44   {
45    var _this = this;
46    var MODULE = this;
47    return {
48    xtype : 'Nest',
49    title : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
50    listeners : {
51     activate : function (_self)
52      {
53          if(!document.getElementsByClassName('event-south-pane')) {
54              return;
55          }
56          
57          document.getElementsByClassName('event-south-pane')[0].classList.remove('disable-pane');
58          
59          if(
60              appDisabled.indexOf('Core.SuperAdmin') * 1 != -1
61          ) {
62              document.getElementsByClassName('event-south-pane')[0].classList.add('disable-pane');
63          }
64      }
65    },
66    xns : Roo.bootstrap.panel,
67    '|xns' : 'Roo.bootstrap.panel',
68    layout : {
69     xtype : 'Border',
70     xns : Roo.bootstrap.layout,
71     '|xns' : 'Roo.bootstrap.layout',
72     center : {
73      xtype : 'Region',
74      hideTabs : true,
75      tabPosition : 'top',
76      xns : Roo.bootstrap.layout,
77      '|xns' : 'Roo.bootstrap.layout'
78     },
79     south : {
80      xtype : 'Region',
81      autoScroll : true,
82      cls : 'event-south-pane',
83      height : 150,
84      hideTabs : true,
85      split : true,
86      tabPosition : 'top',
87      xns : Roo.bootstrap.layout,
88      '|xns' : 'Roo.bootstrap.layout'
89     },
90     items  : [
91      {
92       xtype : 'Content',
93       fitToFrame : true,
94       region : 'south',
95       title : _this._strings['06bff0cfe47afca536033ab51f4e2cdc'] /* Log View */,
96       listeners : {
97        render : function (_self)
98         {
99           _this.viewPanel = _self;
100         }
101       },
102       xns : Roo.bootstrap.panel,
103       '|xns' : 'Roo.bootstrap.panel'
104      },
105      {
106       xtype : 'Grid',
107       closable : false,
108       fitToFrame : true,
109       region : 'center',
110       title : _this._strings['a3ec0cd6d6acd83df3e2095c5edcf8b5'] /* Log Grid */,
111       listeners : {
112        activate : function (_self)
113         {
114             
115             if (_this.table) {
116                 
117                 _this.table.footer.onClick('first');
118                 
119             }
120             
121         },
122        render : function (_self)
123         {
124             _this.grid = _self;
125         }
126       },
127       xns : Roo.bootstrap.panel,
128       '|xns' : 'Roo.bootstrap.panel',
129       toolbar : {
130        xtype : 'NavSimplebar',
131        xns : Roo.bootstrap,
132        '|xns' : 'Roo.bootstrap',
133        items  : [
134         {
135          xtype : 'NavGroup',
136          xns : Roo.bootstrap,
137          '|xns' : 'Roo.bootstrap',
138          items  : [
139           {
140            xtype : 'NavItem',
141            xns : Roo.bootstrap,
142            '|xns' : 'Roo.bootstrap',
143            items  : [
144             {
145              xtype : 'Element',
146              xns : Roo.bootstrap,
147              '|xns' : 'Roo.bootstrap',
148              items  : [
149               {
150                xtype : 'Row',
151                cls : 'roo-toolbar',
152                xns : Roo.bootstrap,
153                '|xns' : 'Roo.bootstrap',
154                items  : [
155                 {
156                  xtype : 'Column',
157                  md : 1,
158                  xns : Roo.bootstrap,
159                  '|xns' : 'Roo.bootstrap',
160                  items  : [
161                   {
162                    xtype : 'FieldLabel',
163                    cls : 'roo-toolbar-label',
164                    html : _this._strings['31c03fdb82204f0ac1fe916b2c713c8c'] /* Show <i class="fa fa-search" aria-hidden="true"></i> */,
165                    xns : Roo.bootstrap,
166                    '|xns' : 'Roo.bootstrap'
167                   }
168                  ]
169                 },
170                 {
171                  xtype : 'Column',
172                  md : 2,
173                  xns : Roo.bootstrap,
174                  '|xns' : 'Roo.bootstrap',
175                  items  : [
176                   {
177                    xtype : 'ComboBox',
178                    allowBlank : true,
179                    alwaysQuery : false,
180                    displayField : 'name',
181                    editable : false,
182                    forceSelection : true,
183                    listWidth : 300,
184                    loadingText : _this._strings['098f6bcd4621d373cade4e832627b4f6'] /* test */,
185                    multiple : false,
186                    placeholder : _this._strings['e09692a588440a717f79563aed7ac7e5'] /* select person */,
187                    removable : true,
188                    triggerAction : 'all',
189                    typeAhead : true,
190                    valueField : 'id',
191                    listeners : {
192                     render : function (_self)
193                      {
194                          _this.personSel = this;
195                          
196                      },
197                     select : function (combo, record, index)
198                      {
199                          _this.table.footer.onClick('first');
200                      }
201                    },
202                    xns : Roo.bootstrap,
203                    '|xns' : 'Roo.bootstrap',
204                    store : {
205                     xtype : 'Store',
206                     remoteSort : true,
207                     sortInfo : {field : 'name' , direction : 'ASC'},
208                     listeners : {
209                      beforeload : function (_self, o)
210                       {
211                           o.params = o.params || {};
212                               o.params.limit = 9999;
213                       }
214                     },
215                     xns : Roo.data,
216                     '|xns' : 'Roo.data',
217                     proxy : {
218                      xtype : 'HttpProxy',
219                      method : 'GET',
220                      url : baseURL+'/Roo/Core_person',
221                      xns : Roo.data,
222                      '|xns' : 'Roo.data'
223                     },
224                     reader : {
225                      xtype : 'JsonReader',
226                      fields : [
227                          {
228                              'name': 'id',
229                              'type': 'int'
230                          },
231                          {
232                              'name': 'office_id',
233                              'type': 'int'
234                          },
235                          {
236                              'name': 'name',
237                              'type': 'string'
238                          },
239                          {
240                              'name': 'phone',
241                              'type': 'string'
242                          },
243                          {
244                              'name': 'fax',
245                              'type': 'string'
246                          },
247                          {
248                              'name': 'email',
249                              'type': 'string'
250                          },
251                          {
252                              'name': 'company_id',
253                              'type': 'int'
254                          },
255                          {
256                              'name': 'role',
257                              'type': 'string'
258                          },
259                          {
260                              'name': 'active',
261                              'type': 'int'
262                          },
263                          {
264                              'name': 'remarks',
265                              'type': 'string'
266                          },
267                          {
268                              'name': 'passwd',
269                              'type': 'string'
270                          },
271                          {
272                              'name': 'owner_id',
273                              'type': 'int'
274                          },
275                          {
276                              'name': 'lang',
277                              'type': 'string'
278                          },
279                          {
280                              'name': 'no_reset_sent',
281                              'type': 'int'
282                          },
283                          {
284                              'name': 'action_type',
285                              'type': 'string'
286                          },
287                          {
288                              'name': 'project_id',
289                              'type': 'int'
290                          },
291                          {
292                              'name': 'deleted_by',
293                              'type': 'int'
294                          },
295                          {
296                              'name': 'deleted_dt',
297                              'type': 'date',
298                              'dateFormat': 'Y-m-d'
299                          },
300                          {
301                              'name': 'office_id_id',
302                              'type': 'int'
303                          },
304                          {
305                              'name': 'office_id_company_id',
306                              'type': 'int'
307                          },
308                          {
309                              'name': 'office_id_name',
310                              'type': 'string'
311                          },
312                          {
313                              'name': 'office_id_address',
314                              'type': 'string'
315                          },
316                          {
317                              'name': 'office_id_phone',
318                              'type': 'string'
319                          },
320                          {
321                              'name': 'office_id_fax',
322                              'type': 'string'
323                          },
324                          {
325                              'name': 'office_id_email',
326                              'type': 'string'
327                          },
328                          {
329                              'name': 'office_id_role',
330                              'type': 'string'
331                          },
332                          {
333                              'name': 'company_id_code',
334                              'type': 'string'
335                          },
336                          {
337                              'name': 'company_id_name',
338                              'type': 'string'
339                          },
340                          {
341                              'name': 'company_id_remarks',
342                              'type': 'string'
343                          },
344                          {
345                              'name': 'company_id_owner_id',
346                              'type': 'int'
347                          },
348                          {
349                              'name': 'company_id_address',
350                              'type': 'string'
351                          },
352                          {
353                              'name': 'company_id_tel',
354                              'type': 'string'
355                          },
356                          {
357                              'name': 'company_id_fax',
358                              'type': 'string'
359                          },
360                          {
361                              'name': 'company_id_email',
362                              'type': 'string'
363                          },
364                          {
365                              'name': 'company_id_id',
366                              'type': 'int'
367                          },
368                          {
369                              'name': 'company_id_isOwner',
370                              'type': 'int'
371                          },
372                          {
373                              'name': 'company_id_logo_id',
374                              'type': 'int'
375                          },
376                          {
377                              'name': 'company_id_background_color',
378                              'type': 'string'
379                          },
380                          {
381                              'name': 'company_id_comptype',
382                              'type': 'string'
383                          },
384                          {
385                              'name': 'company_id_url',
386                              'type': 'string'
387                          },
388                          {
389                              'name': 'company_id_main_office_id',
390                              'type': 'int'
391                          },
392                          {
393                              'name': 'company_id_created_by',
394                              'type': 'int'
395                          },
396                          {
397                              'name': 'company_id_created_dt',
398                              'type': 'date'
399                          },
400                          {
401                              'name': 'company_id_updated_by',
402                              'type': 'int'
403                          },
404                          {
405                              'name': 'company_id_updated_dt',
406                              'type': 'date'
407                          },
408                          {
409                              'name': 'company_id_passwd',
410                              'type': 'string'
411                          },
412                          {
413                              'name': 'company_id_dispatch_port',
414                              'type': 'string'
415                          },
416                          {
417                              'name': 'company_id_province',
418                              'type': 'string'
419                          },
420                          {
421                              'name': 'company_id_country',
422                              'type': 'string'
423                          },
424                          {
425                              'name': 'project_id_id',
426                              'type': 'int'
427                          },
428                          {
429                              'name': 'project_id_name',
430                              'type': 'string'
431                          },
432                          {
433                              'name': 'project_id_remarks',
434                              'type': 'string'
435                          },
436                          {
437                              'name': 'project_id_owner_id',
438                              'type': 'int'
439                          },
440                          {
441                              'name': 'project_id_code',
442                              'type': 'string'
443                          },
444                          {
445                              'name': 'project_id_active',
446                              'type': 'int'
447                          },
448                          {
449                              'name': 'project_id_type',
450                              'type': 'string'
451                          },
452                          {
453                              'name': 'project_id_client_id',
454                              'type': 'int'
455                          },
456                          {
457                              'name': 'project_id_team_id',
458                              'type': 'int'
459                          },
460                          {
461                              'name': 'project_id_file_location',
462                              'type': 'string'
463                          },
464                          {
465                              'name': 'project_id_open_date',
466                              'type': 'date'
467                          },
468                          {
469                              'name': 'project_id_open_by',
470                              'type': 'int'
471                          },
472                          {
473                              'name': 'project_id_close_date',
474                              'type': 'date'
475                          },
476                          {
477                              'name': 'project_id_countries',
478                              'type': 'string'
479                          },
480                          {
481                              'name': 'project_id_languages',
482                              'type': 'string'
483                          },
484                          {
485                              'name': 'project_id_agency_id',
486                              'type': 'int'
487                          },
488                          {
489                              'name': 'owner_id_id',
490                              'type': 'int'
491                          },
492                          {
493                              'name': 'owner_id_office_id',
494                              'type': 'int'
495                          },
496                          {
497                              'name': 'owner_id_name',
498                              'type': 'string'
499                          },
500                          {
501                              'name': 'owner_id_phone',
502                              'type': 'string'
503                          },
504                          {
505                              'name': 'owner_id_fax',
506                              'type': 'string'
507                          },
508                          {
509                              'name': 'owner_id_email',
510                              'type': 'string'
511                          },
512                          {
513                              'name': 'owner_id_company_id',
514                              'type': 'int'
515                          },
516                          {
517                              'name': 'owner_id_role',
518                              'type': 'string'
519                          },
520                          {
521                              'name': 'owner_id_active',
522                              'type': 'int'
523                          },
524                          {
525                              'name': 'owner_id_remarks',
526                              'type': 'string'
527                          },
528                          {
529                              'name': 'owner_id_passwd',
530                              'type': 'string'
531                          },
532                          {
533                              'name': 'owner_id_owner_id',
534                              'type': 'int'
535                          },
536                          {
537                              'name': 'owner_id_lang',
538                              'type': 'string'
539                          },
540                          {
541                              'name': 'owner_id_no_reset_sent',
542                              'type': 'int'
543                          },
544                          {
545                              'name': 'owner_id_action_type',
546                              'type': 'string'
547                          },
548                          {
549                              'name': 'owner_id_project_id',
550                              'type': 'int'
551                          },
552                          {
553                              'name': 'owner_id_deleted_by',
554                              'type': 'int'
555                          },
556                          {
557                              'name': 'owner_id_deleted_dt',
558                              'type': 'date'
559                          }
560                      ],
561                      xns : Roo.data,
562                      '|xns' : 'Roo.data'
563                     }
564                    }
565                   }
566                  ]
567                 },
568                 {
569                  xtype : 'Column',
570                  md : 2,
571                  xns : Roo.bootstrap,
572                  '|xns' : 'Roo.bootstrap',
573                  items  : [
574                   {
575                    xtype : 'ComboBox',
576                    allowBlank : true,
577                    alwaysQuery : false,
578                    displayField : 'action',
579                    editable : false,
580                    forceSelection : true,
581                    listWidth : 300,
582                    multiple : false,
583                    placeholder : _this._strings['10927a67903afd162cc29267d434a2bb'] /* select action */,
584                    removable : true,
585                    triggerAction : 'all',
586                    typeAhead : true,
587                    valueField : 'id',
588                    listeners : {
589                     render : function (_self)
590                      {
591                          _this.actionSel = this;
592                      },
593                     select : function (combo, record, index)
594                      {
595                          _this.table.footer.onClick('first');
596                      }
597                    },
598                    xns : Roo.bootstrap,
599                    '|xns' : 'Roo.bootstrap',
600                    store : {
601                     xtype : 'Store',
602                     remoteSort : true,
603                     sortInfo : { field : 'action' , direction : 'ASC' },
604                     listeners : {
605                      beforeload : function (_self, o)
606                       {
607                           o.params = o.params || {};
608                           
609                           /*
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;
613                           }
614                           */
615                           o.params.limit = 9999;
616                           o.params._distinct = 'action';
617                           
618                           o.params._columns ='action';
619                       }
620                     },
621                     xns : Roo.data,
622                     '|xns' : 'Roo.data',
623                     proxy : {
624                      xtype : 'HttpProxy',
625                      method : 'GET',
626                      url : baseURL + '/Roo/Events',
627                      xns : Roo.data,
628                      '|xns' : 'Roo.data'
629                     },
630                     reader : {
631                      xtype : 'JsonReader',
632                      fields : [
633                          {
634                              'name': 'id',
635                              'type': 'int'
636                          },
637                          {
638                              'name': 'person_name',
639                              'type': 'string'
640                          },
641                          {
642                              'name': 'event_when',
643                              'type': 'date',
644                              'dateFormat': 'Y-m-d'
645                          },
646                          {
647                              'name': 'action',
648                              'type': 'string'
649                          },
650                          {
651                              'name': 'ipaddr',
652                              'type': 'string'
653                          },
654                          {
655                              'name': 'on_id',
656                              'type': 'int'
657                          },
658                          {
659                              'name': 'on_table',
660                              'type': 'string'
661                          },
662                          {
663                              'name': 'person_id',
664                              'type': 'int'
665                          },
666                          {
667                              'name': 'remarks',
668                              'type': 'string'
669                          },
670                          {
671                              'name': 'person_id_id',
672                              'type': 'int'
673                          },
674                          {
675                              'name': 'person_id_office_id',
676                              'type': 'int'
677                          },
678                          {
679                              'name': 'person_id_name',
680                              'type': 'string'
681                          },
682                          {
683                              'name': 'person_id_phone',
684                              'type': 'string'
685                          },
686                          {
687                              'name': 'person_id_fax',
688                              'type': 'string'
689                          },
690                          {
691                              'name': 'person_id_email',
692                              'type': 'string'
693                          },
694                          {
695                              'name': 'person_id_company_id',
696                              'type': 'int'
697                          },
698                          {
699                              'name': 'person_id_role',
700                              'type': 'string'
701                          },
702                          {
703                              'name': 'person_id_active',
704                              'type': 'int'
705                          },
706                          {
707                              'name': 'person_id_remarks',
708                              'type': 'string'
709                          },
710                          {
711                              'name': 'person_id_passwd',
712                              'type': 'string'
713                          },
714                          {
715                              'name': 'person_id_owner_id',
716                              'type': 'int'
717                          },
718                          {
719                              'name': 'person_id_lang',
720                              'type': 'string'
721                          },
722                          {
723                              'name': 'person_id_no_reset_sent',
724                              'type': 'int'
725                          },
726                          {
727                              'name': 'person_id_action_type',
728                              'type': 'string'
729                          },
730                          {
731                              'name': 'person_id_project_id',
732                              'type': 'int'
733                          },
734                          {
735                              'name': 'person_id_deleted_by',
736                              'type': 'int'
737                          },
738                          {
739                              'name': 'person_id_deleted_dt',
740                              'type': 'date'
741                          }
742                      ],
743                      xns : Roo.data,
744                      '|xns' : 'Roo.data'
745                     }
746                    }
747                   }
748                  ]
749                 },
750                 {
751                  xtype : 'Column',
752                  md : 2,
753                  xns : Roo.bootstrap,
754                  '|xns' : 'Roo.bootstrap',
755                  items  : [
756                   {
757                    xtype : 'ComboBox',
758                    allowBlank : true,
759                    alwaysQuery : false,
760                    displayField : 'on_table',
761                    editable : false,
762                    forceSelection : true,
763                    listWidth : 300,
764                    multiple : false,
765                    placeholder : _this._strings['c759559b750d502a5be8dceae85ed841'] /* select affected */,
766                    removable : true,
767                    triggerAction : 'all',
768                    typeAhead : true,
769                    valueField : 'id',
770                    listeners : {
771                     render : function (_self)
772                      {
773                          _this.affectSel = this;
774                      },
775                     select : function (combo, record, index)
776                      {
777                          _this.table.footer.onClick('first');
778                      }
779                    },
780                    xns : Roo.bootstrap,
781                    '|xns' : 'Roo.bootstrap',
782                    store : {
783                     xtype : 'Store',
784                     remoteSort : true,
785                     sortInfo : '{ field : \'on_table\' , direction : \'ASC\' }',
786                     listeners : {
787                      beforeload : function (_self, o)
788                       {
789                           o.params = o.params || {};
790                           
791                           /*
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;
795                           }
796                           */
797                               o.params.limit = 9999;
798                           o.params._distinct = 'on_table';
799                           
800                           o.params._columns ='on_table';
801                       }
802                     },
803                     xns : Roo.data,
804                     '|xns' : 'Roo.data',
805                     proxy : {
806                      xtype : 'HttpProxy',
807                      method : 'GET',
808                      url : baseURL + '/Roo/Events',
809                      xns : Roo.data,
810                      '|xns' : 'Roo.data'
811                     },
812                     reader : {
813                      xtype : 'JsonReader',
814                      fields : [
815                          {
816                              'name': 'id',
817                              'type': 'int'
818                          },
819                          {
820                              'name': 'person_name',
821                              'type': 'string'
822                          },
823                          {
824                              'name': 'event_when',
825                              'type': 'date',
826                              'dateFormat': 'Y-m-d'
827                          },
828                          {
829                              'name': 'action',
830                              'type': 'string'
831                          },
832                          {
833                              'name': 'ipaddr',
834                              'type': 'string'
835                          },
836                          {
837                              'name': 'on_id',
838                              'type': 'int'
839                          },
840                          {
841                              'name': 'on_table',
842                              'type': 'string'
843                          },
844                          {
845                              'name': 'person_id',
846                              'type': 'int'
847                          },
848                          {
849                              'name': 'remarks',
850                              'type': 'string'
851                          },
852                          {
853                              'name': 'person_id_id',
854                              'type': 'int'
855                          },
856                          {
857                              'name': 'person_id_office_id',
858                              'type': 'int'
859                          },
860                          {
861                              'name': 'person_id_name',
862                              'type': 'string'
863                          },
864                          {
865                              'name': 'person_id_phone',
866                              'type': 'string'
867                          },
868                          {
869                              'name': 'person_id_fax',
870                              'type': 'string'
871                          },
872                          {
873                              'name': 'person_id_email',
874                              'type': 'string'
875                          },
876                          {
877                              'name': 'person_id_company_id',
878                              'type': 'int'
879                          },
880                          {
881                              'name': 'person_id_role',
882                              'type': 'string'
883                          },
884                          {
885                              'name': 'person_id_active',
886                              'type': 'int'
887                          },
888                          {
889                              'name': 'person_id_remarks',
890                              'type': 'string'
891                          },
892                          {
893                              'name': 'person_id_passwd',
894                              'type': 'string'
895                          },
896                          {
897                              'name': 'person_id_owner_id',
898                              'type': 'int'
899                          },
900                          {
901                              'name': 'person_id_lang',
902                              'type': 'string'
903                          },
904                          {
905                              'name': 'person_id_no_reset_sent',
906                              'type': 'int'
907                          },
908                          {
909                              'name': 'person_id_action_type',
910                              'type': 'string'
911                          },
912                          {
913                              'name': 'person_id_project_id',
914                              'type': 'int'
915                          },
916                          {
917                              'name': 'person_id_deleted_by',
918                              'type': 'int'
919                          },
920                          {
921                              'name': 'person_id_deleted_dt',
922                              'type': 'date'
923                          }
924                      ],
925                      xns : Roo.data,
926                      '|xns' : 'Roo.data'
927                     }
928                    }
929                   }
930                  ]
931                 },
932                 {
933                  xtype : 'Column',
934                  md : 1,
935                  xns : Roo.bootstrap,
936                  '|xns' : 'Roo.bootstrap',
937                  items  : [
938                   {
939                    xtype : 'FieldLabel',
940                    cls : 'roo-toolbar-label',
941                    html : _this._strings['90275c90e270853fee34db3b87d24d7c'] /* Date Range <i class="fa fa-calendar" aria-hidden="true"></i> */,
942                    xns : Roo.bootstrap,
943                    '|xns' : 'Roo.bootstrap'
944                   }
945                  ]
946                 },
947                 {
948                  xtype : 'Column',
949                  md : 2,
950                  xns : Roo.bootstrap,
951                  '|xns' : 'Roo.bootstrap',
952                  items  : [
953                   {
954                    xtype : 'DateField',
955                    placeholder : _this._strings['a6122a65eaa676f700ae68d393054a37'] /* Start */,
956                    listeners : {
957                     change : function (_self, newValue, oldValue)
958                      {
959                            _this.table.footer.onClick('first');
960                      },
961                     render : function (_self)
962                      {
963                          _this.dateFrom = _self;
964                      }
965                    },
966                    xns : Roo.bootstrap,
967                    '|xns' : 'Roo.bootstrap'
968                   }
969                  ]
970                 },
971                 {
972                  xtype : 'Column',
973                  md : 2,
974                  xns : Roo.bootstrap,
975                  '|xns' : 'Roo.bootstrap',
976                  items  : [
977                   {
978                    xtype : 'DateField',
979                    placeholder : _this._strings['87557f11575c0ad78e4e28abedc13b6e'] /* End */,
980                    listeners : {
981                     change : function (_self, newValue, oldValue)
982                      {
983                          _this.table.footer.onClick('first');
984                      },
985                     render : function (_self)
986                      {
987                          _this.dateTo = _self;
988                      }
989                    },
990                    xns : Roo.bootstrap,
991                    '|xns' : 'Roo.bootstrap'
992                   }
993                  ]
994                 }
995                ]
996               }
997              ]
998             }
999            ]
1000           }
1001          ]
1002         }
1003        ]
1004       },
1005       grid : {
1006        xtype : 'Table',
1007        cls : 'table-fixed',
1008        hover : true,
1009        loadMask : true,
1010        responsive : true,
1011        rowSelection : true,
1012        striped : false,
1013        listeners : {
1014         render : function (_self)
1015          {
1016              
1017              _this.table = _self;
1018              
1019          },
1020         rowdblclick : function (_self, el, rowIndex, e)
1021          {
1022          /*
1023              if (!_this.dialog) {
1024                  return;
1025              }
1026              _this.dialog.show(_this.grid.grid.store.getAt(rowIndex).data, function() {
1027                  if (_this.table) {
1028                      _this.table.footer.onClick('first');
1029                  }
1030              });
1031          */
1032          }
1033        },
1034        xns : Roo.bootstrap,
1035        '|xns' : 'Roo.bootstrap',
1036        footer : {
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 */,
1041         name : 'footer',
1042         pageSize : 25,
1043         listeners : {
1044          render : function (_self)
1045           {
1046               _this.footer = _self;
1047           }
1048         },
1049         xns : Roo.bootstrap,
1050         '|xns' : 'Roo.bootstrap'
1051        },
1052        store : {
1053         xtype : 'Store',
1054         hover : true,
1055         loadMask : true,
1056         remoteSort : true,
1057         rowSelection : true,
1058         sortInfo : { field: 'event_when', direction: 'DESC'},
1059         striped : true,
1060         listeners : {
1061          beforeload : function (_self, o)
1062           {
1063               if (!Pman.buildCompleted) {
1064                   return false;
1065               }
1066               
1067               o.params = o.params || {};
1068               
1069               o.params.person_id = _this.personSel.getValue();
1070               
1071               var act = _this.actionSel.getValue();
1072               
1073               if (act.length) {
1074                   
1075                   o.params.action = act;
1076                   
1077               }
1078               var tbl = _this.affectSel.getValue();
1079               
1080               if (tbl.length) {
1081               
1082                   o.params.on_table = tbl;
1083                   
1084               }
1085               
1086               var f = _this.dateFrom.getValue().split("/");
1087               
1088               var df_string = f[2]+"-"+f[0]+"-"+f[1];
1089               
1090               var df = new Date(Date.parse(f));
1091               
1092               var t = _this.dateTo.getValue().split("/");
1093                   
1094               var dt_string = t[2]+"-"+t[0]+"-"+t[1];
1095               
1096               var dt = new Date(Date.parse(t));
1097               
1098               if (
1099                   _this.dateFrom.format && 
1100                   
1101                   _this.dateTo.format &&
1102                   
1103                   (dt > df)
1104               ) {
1105                   o.params['query[from]'] = df_string;
1106                   
1107                   o.params['query[to]'] = dt_string;
1108                   
1109               }
1110               
1111           },
1112          load : function (_self, records, options)
1113           {
1114               //Roo.log(records);
1115           }
1116         },
1117         xns : Roo.data,
1118         '|xns' : 'Roo.data',
1119         proxy : {
1120          xtype : 'HttpProxy',
1121          method : 'GET',
1122          url : baseURL + '/Roo/Events',
1123          listeners : {
1124           load : function (This, o, arg)
1125            {
1126                //_this.table.footer.onClick('first');
1127            }
1128          },
1129          xns : Roo.data,
1130          '|xns' : 'Roo.data'
1131         },
1132         reader : {
1133          xtype : 'JsonReader',
1134          fields : [
1135              {
1136                  'name': 'id',
1137                  'type': 'int'
1138              },
1139              {
1140                  'name': 'person_name',
1141                  'type': 'string'
1142              },
1143              {
1144                  'name': 'event_when',
1145                  'type': 'date',
1146                  'dateFormat': 'Y-m-d'
1147              },
1148              {
1149                  'name': 'action',
1150                  'type': 'string'
1151              },
1152              {
1153                  'name': 'ipaddr',
1154                  'type': 'string'
1155              },
1156              {
1157                  'name': 'on_id',
1158                  'type': 'int'
1159              },
1160              {
1161                  'name': 'on_table',
1162                  'type': 'string'
1163              },
1164              {
1165                  'name': 'person_id',
1166                  'type': 'int'
1167              },
1168              {
1169                  'name': 'remarks',
1170                  'type': 'string'
1171              },
1172              {
1173                  'name': 'person_id_id',
1174                  'type': 'int'
1175              },
1176              {
1177                  'name': 'person_id_office_id',
1178                  'type': 'int'
1179              },
1180              {
1181                  'name': 'person_id_name',
1182                  'type': 'string'
1183              },
1184              {
1185                  'name': 'person_id_phone',
1186                  'type': 'string'
1187              },
1188              {
1189                  'name': 'person_id_fax',
1190                  'type': 'string'
1191              },
1192              {
1193                  'name': 'person_id_email',
1194                  'type': 'string'
1195              },
1196              {
1197                  'name': 'person_id_company_id',
1198                  'type': 'int'
1199              },
1200              {
1201                  'name': 'person_id_role',
1202                  'type': 'string'
1203              },
1204              {
1205                  'name': 'person_id_active',
1206                  'type': 'int'
1207              },
1208              {
1209                  'name': 'person_id_remarks',
1210                  'type': 'string'
1211              },
1212              {
1213                  'name': 'person_id_passwd',
1214                  'type': 'string'
1215              },
1216              {
1217                  'name': 'person_id_owner_id',
1218                  'type': 'int'
1219              },
1220              {
1221                  'name': 'person_id_lang',
1222                  'type': 'string'
1223              },
1224              {
1225                  'name': 'person_id_no_reset_sent',
1226                  'type': 'int'
1227              },
1228              {
1229                  'name': 'person_id_action_type',
1230                  'type': 'string'
1231              },
1232              {
1233                  'name': 'person_id_project_id',
1234                  'type': 'int'
1235              },
1236              {
1237                  'name': 'person_id_deleted_by',
1238                  'type': 'int'
1239              },
1240              {
1241                  'name': 'person_id_deleted_dt',
1242                  'type': 'date'
1243              }
1244          ],
1245          id : 'id',
1246          root : 'data',
1247          totalProperty : 'total',
1248          xns : Roo.data,
1249          '|xns' : 'Roo.data'
1250         }
1251        },
1252        sm : {
1253         xtype : 'RowSelectionModel',
1254         singleSelect : true,
1255         listeners : {
1256          afterselectionchange : function (_self)
1257           {
1258               
1259               if (!this.getSelected()) {
1260                   
1261                   _this.viewPanel.setContent("Nothing Selected");
1262                   
1263                   return;
1264                   
1265               }
1266               
1267               var id = this.getSelected().data.id;
1268               
1269               _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
1270               
1271           }
1272         },
1273         xns : Roo.bootstrap.Table,
1274         '|xns' : 'Roo.bootstrap.Table'
1275        },
1276        cm : [
1277         {
1278          xtype : 'ColumnModel',
1279          dataIndex : 'event_when',
1280          header : _this._strings['4e97aeeaa8b15ca1180fcd1f3ac478d1'] /* When */,
1281          md : 2,
1282          renderer : function(v) { return v ? v.dateFormat('Y/m/d H:i') : ''; },
1283          sm : 2,
1284          sortable : true,
1285          xs : 2,
1286          xns : Roo.grid,
1287          '|xns' : 'Roo.grid'
1288         },
1289         {
1290          xtype : 'ColumnModel',
1291          dataIndex : 'id',
1292          header : _this._strings['1b7f7d24575cdbfadb83b9587fa1bf97'] /* #id */,
1293          md : 1,
1294          renderer : function(v) { return String.format('{0}', v); },
1295          sm : 1,
1296          sortable : true,
1297          xs : 1,
1298          xns : Roo.grid,
1299          '|xns' : 'Roo.grid'
1300         },
1301         {
1302          xtype : 'ColumnModel',
1303          dataIndex : 'person_id_name',
1304          header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
1305          md : 2,
1306          renderer : function(v) { return String.format('{0}', v); },
1307          sm : 2,
1308          sortable : true,
1309          xs : 2,
1310          xns : Roo.grid,
1311          '|xns' : 'Roo.grid'
1312         },
1313         {
1314          xtype : 'ColumnModel',
1315          dataIndex : 'action',
1316          header : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
1317          md : 1,
1318          renderer : function(v) { return String.format('{0}', v); },
1319          sm : 1,
1320          xs : 1,
1321          xns : Roo.grid,
1322          '|xns' : 'Roo.grid'
1323         },
1324         {
1325          xtype : 'ColumnModel',
1326          dataIndex : 'ipaddr',
1327          header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
1328          md : 1,
1329          renderer : function(v) { return String.format('{0}', v); },
1330          sm : 1,
1331          xs : 1,
1332          xns : Roo.grid,
1333          '|xns' : 'Roo.grid'
1334         },
1335         {
1336          xtype : 'ColumnModel',
1337          dataIndex : 'on_table',
1338          header : _this._strings['2c92a9a6a5dbf570825e62eabcdecd8d'] /* Affected */,
1339          md : 1,
1340          renderer : function(v, x, r) {
1341              
1342              return v ? String.format('{0}({1})', v,  r.data.on_id)  : '';
1343              
1344          },
1345          sm : 1,
1346          xs : 1,
1347          xns : Roo.grid,
1348          '|xns' : 'Roo.grid'
1349         },
1350         {
1351          xtype : 'ColumnModel',
1352          dataIndex : 'remarks',
1353          header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
1354          md : 4,
1355          renderer : function(v) { return String.format('{0}', v); },
1356          sm : 4,
1357          xs : 4,
1358          xns : Roo.grid,
1359          '|xns' : 'Roo.grid'
1360         }
1361        ]
1362       }
1363      }
1364     ]
1365    }
1366   };  }
1367 });