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