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