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