Pman.Dialog.MTrackTime.bjs
[Pman.MTrack] / Pman.Dialog.MTrackTime.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Dialog.MTrackTime = {
6
7     dialog : false,
8     callback:  false,
9
10     show : function(data, cb)
11     {
12         if (!this.dialog) {
13             this.create();
14         }
15
16         this.callback = cb;
17         this.data = data;
18         this.dialog.show(this.data._el);
19         if (this.form) {
20            this.form.reset();
21            this.form.setValues(data);
22            this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
23         }
24
25     },
26
27     create : function()
28     {
29         var _this = this;
30         this.dialog = Roo.factory({
31             xtype: 'LayoutDialog',
32             xns: Roo,
33             height : 700,
34             title : "Time Manager",
35             width : 1000,
36             items : [
37                 {
38                     xtype: 'NestedLayoutPanel',
39                     xns: Roo,
40                     region : 'center',
41                     title : "Log Time",
42                     layout : {
43                         xtype: 'BorderLayout',
44                         xns: Roo,
45                         items : [
46                             {
47                                 xtype: 'GridPanel',
48                                 xns: Roo,
49                                 listeners : {
50                                     activate : function() {
51                                         _this.timepanel = this;
52                                         if (_this.timegrid) {
53                                            // _this.grid.footer.onClick('first');
54                                         }
55                                     }
56                                 },
57                                 background : true,
58                                 fitContainer : true,
59                                 fitToframe : true,
60                                 region : 'center',
61                                 tableName : 'cash_invoice_entry',
62                                 title : "cash_invoice_entry",
63                                 grid : {
64                                     xtype: 'Grid',
65                                     xns: Roo.grid,
66                                     listeners : {
67                                         render : function() 
68                                         {
69                                             _this.timegrid = this; 
70                                             //_this.dialog = Pman.Dialog.FILL_IN
71                                             if (_this.timepanel.active) {
72                                               // this.footer.onClick('first');
73                                             }
74                                         },
75                                         rowdblclick : function (_self, rowIndex, e)
76                                         {
77                                             if (!_this.dialog) return;
78                                             _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
79                                                 _this.grid.footer.onClick('first');
80                                             }); 
81                                         }
82                                     },
83                                     autoExpandColumn : 'activity_ref',
84                                     loadMask : true,
85                                     toolbar : {
86                                         xtype: 'Toolbar',
87                                         xns: Roo,
88                                         items : [
89                                             {
90                                                 xtype: 'ComboBox',
91                                                 xns: Roo.form,
92                                                 allowBlank : 'false',
93                                                 editable : 'false',
94                                                 emptyText : "Select Person",
95                                                 forceSelection : true,
96                                                 listWidth : 400,
97                                                 loadingText : "Searching...",
98                                                 minChars : 2,
99                                                 pageSize : 20,
100                                                 qtip : "Select Person",
101                                                 selectOnFocus : true,
102                                                 triggerAction : 'all',
103                                                 typeAhead : true,
104                                                 width : 300,
105                                                 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
106                                                 queryParam : '',
107                                                 fieldLabel : 'Person',
108                                                 valueField : 'id',
109                                                 displayField : '',
110                                                 hiddenName : '',
111                                                 name : '',
112                                                 store : {
113                                                     xtype: 'Store',
114                                                     xns: Roo.data,
115                                                     remoteSort : true,
116                                                     sortInfo : { direction : 'ASC', field: 'id' },
117                                                     listeners : {
118                                                         beforeload : function (_self, o){
119                                                             o.params = o.params || {};
120                                                             // set more here
121                                                         }
122                                                     },
123                                                     proxy : {
124                                                         xtype: 'HttpProxy',
125                                                         xns: Roo.data,
126                                                         method : 'GET',
127                                                         url : baseURL + '/Roo/Person.php'
128                                                     },
129                                                     reader : {
130                                                         xtype: 'JsonReader',
131                                                         xns: Roo.data,
132                                                         id : 'id',
133                                                         root : 'data',
134                                                         totalProperty : 'total',
135                                                         fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
136                                                     }
137                                                 }
138                                             }
139                                         ]
140                                     },
141                                     dataSource : {
142                                         xtype: 'Store',
143                                         xns: Roo.data,
144                                         remoteSort : true,
145                                         sortInfo : { field : 'description', direction: 'ASC' },
146                                         proxy : {
147                                             xtype: 'HttpProxy',
148                                             xns: Roo.data,
149                                             method : 'GET',
150                                             url : baseURL + '/Roo/cash_invoice_entry.php'
151                                         },
152                                         reader : {
153                                             xtype: 'JsonReader',
154                                             xns: Roo.data,
155                                             totalProperty : 'total',
156                                             root : 'data',
157                                             id : 'id',
158                                             fields : [
159                                                 {
160                                                     'name': 'id',
161                                                     'type': 'int'
162                                                 },
163                                                 {
164                                                     'name': 'entry_dt',
165                                                     'type': 'date',
166                                                     'dateFormat': 'Y-m-d'
167                                                 },
168                                                 {
169                                                     'name': 'entered_dt',
170                                                     'type': 'date',
171                                                     'dateFormat': 'Y-m-d'
172                                                 },
173                                                 {
174                                                     'name': 'description',
175                                                     'type': 'string'
176                                                 },
177                                                 {
178                                                     'name': 'action',
179                                                     'type': 'string'
180                                                 },
181                                                 {
182                                                     'name': 'qty',
183                                                     'type': 'string'
184                                                 },
185                                                 {
186                                                     'name': 'invoice_id',
187                                                     'type': 'int'
188                                                 },
189                                                 {
190                                                     'name': 'pricevalue',
191                                                     'type': 'float'
192                                                 },
193                                                 {
194                                                     'name': 'qtyvalue',
195                                                     'type': 'float'
196                                                 },
197                                                 {
198                                                     'name': 'to_account_id',
199                                                     'type': 'int'
200                                                 },
201                                                 {
202                                                     'name': 'discount',
203                                                     'type': 'float'
204                                                 },
205                                                 {
206                                                     'name': 'action_dt',
207                                                     'type': 'date',
208                                                     'dateFormat': 'Y-m-d'
209                                                 },
210                                                 {
211                                                     'name': 'staff_id',
212                                                     'type': 'int'
213                                                 },
214                                                 {
215                                                     'name': 'invoice_id_id',
216                                                     'type': 'int'
217                                                 },
218                                                 {
219                                                     'name': 'invoice_id_idtxt',
220                                                     'type': 'string'
221                                                 },
222                                                 {
223                                                     'name': 'invoice_id_project_id',
224                                                     'type': 'int'
225                                                 },
226                                                 {
227                                                     'name': 'invoice_id_opened_dt',
228                                                     'type': 'date'
229                                                 },
230                                                 {
231                                                     'name': 'invoice_id_posted',
232                                                     'type': 'date'
233                                                 },
234                                                 {
235                                                     'name': 'invoice_id_post_transaction_id',
236                                                     'type': 'int'
237                                                 },
238                                                 {
239                                                     'name': 'invoice_id_post_account_id',
240                                                     'type': 'int'
241                                                 },
242                                                 {
243                                                     'name': 'invoice_id_paid',
244                                                     'type': 'float'
245                                                 },
246                                                 {
247                                                     'name': 'invoice_id_total',
248                                                     'type': 'float'
249                                                 },
250                                                 {
251                                                     'name': 'invoice_id_duedate',
252                                                     'type': 'date'
253                                                 },
254                                                 {
255                                                     'name': 'to_account_id_id',
256                                                     'type': 'int'
257                                                 },
258                                                 {
259                                                     'name': 'to_account_id_name',
260                                                     'type': 'string'
261                                                 },
262                                                 {
263                                                     'name': 'to_account_id_type',
264                                                     'type': 'string'
265                                                 },
266                                                 {
267                                                     'name': 'to_account_id_commodity',
268                                                     'type': 'string'
269                                                 },
270                                                 {
271                                                     'name': 'to_account_id_scu',
272                                                     'type': 'string'
273                                                 },
274                                                 {
275                                                     'name': 'to_account_id_description',
276                                                     'type': 'string'
277                                                 },
278                                                 {
279                                                     'name': 'to_account_id_parent',
280                                                     'type': 'int'
281                                                 },
282                                                 {
283                                                     'name': 'to_account_id_fullname',
284                                                     'type': 'string'
285                                                 },
286                                                 {
287                                                     'name': 'staff_id_id',
288                                                     'type': 'int'
289                                                 },
290                                                 {
291                                                     'name': 'staff_id_office_id',
292                                                     'type': 'int'
293                                                 },
294                                                 {
295                                                     'name': 'staff_id_name',
296                                                     'type': 'string'
297                                                 },
298                                                 {
299                                                     'name': 'staff_id_phone',
300                                                     'type': 'string'
301                                                 },
302                                                 {
303                                                     'name': 'staff_id_fax',
304                                                     'type': 'string'
305                                                 },
306                                                 {
307                                                     'name': 'staff_id_email',
308                                                     'type': 'string'
309                                                 },
310                                                 {
311                                                     'name': 'staff_id_company_id',
312                                                     'type': 'int'
313                                                 },
314                                                 {
315                                                     'name': 'staff_id_role',
316                                                     'type': 'string'
317                                                 },
318                                                 {
319                                                     'name': 'staff_id_active',
320                                                     'type': 'int'
321                                                 },
322                                                 {
323                                                     'name': 'staff_id_remarks',
324                                                     'type': 'string'
325                                                 },
326                                                 {
327                                                     'name': 'staff_id_passwd',
328                                                     'type': 'string'
329                                                 },
330                                                 {
331                                                     'name': 'staff_id_owner_id',
332                                                     'type': 'int'
333                                                 },
334                                                 {
335                                                     'name': 'staff_id_lang',
336                                                     'type': 'string'
337                                                 },
338                                                 {
339                                                     'name': 'staff_id_no_reset_sent',
340                                                     'type': 'int'
341                                                 },
342                                                 {
343                                                     'name': 'staff_id_action_type',
344                                                     'type': 'string'
345                                                 },
346                                                 {
347                                                     'name': 'staff_id_project_id',
348                                                     'type': 'int'
349                                                 },
350                                                 {
351                                                     'name': 'staff_id_deleted_by',
352                                                     'type': 'int'
353                                                 },
354                                                 {
355                                                     'name': 'staff_id_deleted_dt',
356                                                     'type': 'date'
357                                                 }
358                                             ]
359                                         }
360                                     },
361                                     colModel : [
362                                         {
363                                             xtype: 'ColumnModel',
364                                             xns: Roo.grid,
365                                             dataIndex : 'hour',
366                                             header : 'Hour',
367                                             width : 50,
368                                             renderer : function(v) { return String.format('{0}', v); }
369                                         },
370                                         {
371                                             xtype: 'ColumnModel',
372                                             xns: Roo.grid,
373                                             dataIndex : 'activity_ref',
374                                             header : 'Activity',
375                                             width : 300,
376                                             renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
377                                         },
378                                         {
379                                             xtype: 'ColumnModel',
380                                             xns: Roo.grid,
381                                             dataIndex : 'entered_dt',
382                                             header : 'Timesheet',
383                                             width : 300,
384                                             renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
385                                         }
386                                     ]
387                                 }
388                             },
389                             {
390                                 xtype: 'NestedLayoutPanel',
391                                 xns: Roo,
392                                 region : 'east',
393                                 layout : {
394                                     xtype: 'BorderLayout',
395                                     xns: Roo,
396                                     items : [
397                                         {
398                                             xtype: 'GridPanel',
399                                             xns: Roo,
400                                             listeners : {
401                                                 activate : function() {
402                                                     _this.queuepanel = this;
403                                                     if (_this.queuegrid) {
404                                                         //_this.queuegrid.footer.onClick('first');
405                                                     }
406                                                 }
407                                             },
408                                             background : true,
409                                             fitContainer : true,
410                                             fitToframe : true,
411                                             region : 'center',
412                                             tableName : 'mtrack_ticket',
413                                             title : "mtrack_ticket",
414                                             grid : {
415                                                 xtype: 'Grid',
416                                                 xns: Roo.grid,
417                                                 listeners : {
418                                                     render : function() 
419                                                     {
420                                                         _this.queuegrid = this; 
421                                                         //_this.dialog = Pman.Dialog.FILL_IN
422                                                         if (_this.queuepanel.active) {
423                                                            //this.footer.onClick('first');
424                                                         }
425                                                     },
426                                                     rowdblclick : function (_self, rowIndex, e)
427                                                     {
428                                                         if (!_this.dialog) return;
429                                                         _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
430                                                             _this.grid.footer.onClick('first');
431                                                         }); 
432                                                     }
433                                                 },
434                                                 autoExpandColumn : 'summary',
435                                                 loadMask : true,
436                                                 dataSource : {
437                                                     xtype: 'Store',
438                                                     xns: Roo.data,
439                                                     remoteSort : true,
440                                                     sortInfo : { field : 'summary', direction: 'ASC' },
441                                                     proxy : {
442                                                         xtype: 'HttpProxy',
443                                                         xns: Roo.data,
444                                                         method : 'GET',
445                                                         url : baseURL + '/Roo/mtrack_ticket.php'
446                                                     },
447                                                     reader : {
448                                                         xtype: 'JsonReader',
449                                                         xns: Roo.data,
450                                                         totalProperty : 'total',
451                                                         root : 'data',
452                                                         id : 'id',
453                                                         fields : [
454                                                             {
455                                                                 'name': 'id',
456                                                                 'type': 'int'
457                                                             },
458                                                             {
459                                                                 'name': 'project_id',
460                                                                 'type': 'int'
461                                                             },
462                                                             {
463                                                                 'name': 'summary',
464                                                                 'type': 'string'
465                                                             },
466                                                             {
467                                                                 'name': 'description',
468                                                                 'type': 'string'
469                                                             },
470                                                             {
471                                                                 'name': 'changelog',
472                                                                 'type': 'string'
473                                                             },
474                                                             {
475                                                                 'name': 'created',
476                                                                 'type': 'int'
477                                                             },
478                                                             {
479                                                                 'name': 'updated',
480                                                                 'type': 'int'
481                                                             },
482                                                             {
483                                                                 'name': 'owner_id',
484                                                                 'type': 'int'
485                                                             },
486                                                             {
487                                                                 'name': 'priority_id',
488                                                                 'type': 'int'
489                                                             },
490                                                             {
491                                                                 'name': 'severity_id',
492                                                                 'type': 'int'
493                                                             },
494                                                             {
495                                                                 'name': 'classification_id',
496                                                                 'type': 'int'
497                                                             },
498                                                             {
499                                                                 'name': 'resolution_id',
500                                                                 'type': 'int'
501                                                             },
502                                                             {
503                                                                 'name': 'cc',
504                                                                 'type': 'string'
505                                                             },
506                                                             {
507                                                                 'name': 'status',
508                                                                 'type': 'int'
509                                                             },
510                                                             {
511                                                                 'name': 'estimated',
512                                                                 'type': 'float'
513                                                             },
514                                                             {
515                                                                 'name': 'spent',
516                                                                 'type': 'float'
517                                                             },
518                                                             {
519                                                                 'name': 'x_fieldname',
520                                                                 'type': 'string'
521                                                             },
522                                                             {
523                                                                 'name': 'developer_id',
524                                                                 'type': 'int'
525                                                             },
526                                                             {
527                                                                 'name': 'milestone_id',
528                                                                 'type': 'int'
529                                                             },
530                                                             {
531                                                                 'name': 'updated_id',
532                                                                 'type': 'int'
533                                                             },
534                                                             {
535                                                                 'name': 'updated_person_id',
536                                                                 'type': 'int'
537                                                             },
538                                                             {
539                                                                 'name': 'updated_ontable',
540                                                                 'type': 'string'
541                                                             },
542                                                             {
543                                                                 'name': 'updated_onid',
544                                                                 'type': 'int'
545                                                             },
546                                                             {
547                                                                 'name': 'updated_changedate',
548                                                                 'type': 'date'
549                                                             },
550                                                             {
551                                                                 'name': 'updated_reason',
552                                                                 'type': 'string'
553                                                             },
554                                                             {
555                                                                 'name': 'created_id',
556                                                                 'type': 'int'
557                                                             },
558                                                             {
559                                                                 'name': 'created_person_id',
560                                                                 'type': 'int'
561                                                             },
562                                                             {
563                                                                 'name': 'created_ontable',
564                                                                 'type': 'string'
565                                                             },
566                                                             {
567                                                                 'name': 'created_onid',
568                                                                 'type': 'int'
569                                                             },
570                                                             {
571                                                                 'name': 'created_changedate',
572                                                                 'type': 'date'
573                                                             },
574                                                             {
575                                                                 'name': 'created_reason',
576                                                                 'type': 'string'
577                                                             },
578                                                             {
579                                                                 'name': 'owner_id_id',
580                                                                 'type': 'int'
581                                                             },
582                                                             {
583                                                                 'name': 'owner_id_office_id',
584                                                                 'type': 'int'
585                                                             },
586                                                             {
587                                                                 'name': 'owner_id_name',
588                                                                 'type': 'string'
589                                                             },
590                                                             {
591                                                                 'name': 'owner_id_phone',
592                                                                 'type': 'string'
593                                                             },
594                                                             {
595                                                                 'name': 'owner_id_fax',
596                                                                 'type': 'string'
597                                                             },
598                                                             {
599                                                                 'name': 'owner_id_email',
600                                                                 'type': 'string'
601                                                             },
602                                                             {
603                                                                 'name': 'owner_id_company_id',
604                                                                 'type': 'int'
605                                                             },
606                                                             {
607                                                                 'name': 'owner_id_role',
608                                                                 'type': 'string'
609                                                             },
610                                                             {
611                                                                 'name': 'owner_id_active',
612                                                                 'type': 'int'
613                                                             },
614                                                             {
615                                                                 'name': 'owner_id_remarks',
616                                                                 'type': 'string'
617                                                             },
618                                                             {
619                                                                 'name': 'owner_id_passwd',
620                                                                 'type': 'string'
621                                                             },
622                                                             {
623                                                                 'name': 'owner_id_owner_id',
624                                                                 'type': 'int'
625                                                             },
626                                                             {
627                                                                 'name': 'owner_id_lang',
628                                                                 'type': 'string'
629                                                             },
630                                                             {
631                                                                 'name': 'owner_id_no_reset_sent',
632                                                                 'type': 'int'
633                                                             },
634                                                             {
635                                                                 'name': 'owner_id_action_type',
636                                                                 'type': 'string'
637                                                             },
638                                                             {
639                                                                 'name': 'owner_id_project_id',
640                                                                 'type': 'int'
641                                                             },
642                                                             {
643                                                                 'name': 'owner_id_deleted_by',
644                                                                 'type': 'int'
645                                                             },
646                                                             {
647                                                                 'name': 'owner_id_deleted_dt',
648                                                                 'type': 'date'
649                                                             },
650                                                             {
651                                                                 'name': 'developer_id_id',
652                                                                 'type': 'int'
653                                                             },
654                                                             {
655                                                                 'name': 'developer_id_office_id',
656                                                                 'type': 'int'
657                                                             },
658                                                             {
659                                                                 'name': 'developer_id_name',
660                                                                 'type': 'string'
661                                                             },
662                                                             {
663                                                                 'name': 'developer_id_phone',
664                                                                 'type': 'string'
665                                                             },
666                                                             {
667                                                                 'name': 'developer_id_fax',
668                                                                 'type': 'string'
669                                                             },
670                                                             {
671                                                                 'name': 'developer_id_email',
672                                                                 'type': 'string'
673                                                             },
674                                                             {
675                                                                 'name': 'developer_id_company_id',
676                                                                 'type': 'int'
677                                                             },
678                                                             {
679                                                                 'name': 'developer_id_role',
680                                                                 'type': 'string'
681                                                             },
682                                                             {
683                                                                 'name': 'developer_id_active',
684                                                                 'type': 'int'
685                                                             },
686                                                             {
687                                                                 'name': 'developer_id_remarks',
688                                                                 'type': 'string'
689                                                             },
690                                                             {
691                                                                 'name': 'developer_id_passwd',
692                                                                 'type': 'string'
693                                                             },
694                                                             {
695                                                                 'name': 'developer_id_owner_id',
696                                                                 'type': 'int'
697                                                             },
698                                                             {
699                                                                 'name': 'developer_id_lang',
700                                                                 'type': 'string'
701                                                             },
702                                                             {
703                                                                 'name': 'developer_id_no_reset_sent',
704                                                                 'type': 'int'
705                                                             },
706                                                             {
707                                                                 'name': 'developer_id_action_type',
708                                                                 'type': 'string'
709                                                             },
710                                                             {
711                                                                 'name': 'developer_id_project_id',
712                                                                 'type': 'int'
713                                                             },
714                                                             {
715                                                                 'name': 'developer_id_deleted_by',
716                                                                 'type': 'int'
717                                                             },
718                                                             {
719                                                                 'name': 'developer_id_deleted_dt',
720                                                                 'type': 'date'
721                                                             },
722                                                             {
723                                                                 'name': 'priority_id_id',
724                                                                 'type': 'int'
725                                                             },
726                                                             {
727                                                                 'name': 'priority_id_etype',
728                                                                 'type': 'string'
729                                                             },
730                                                             {
731                                                                 'name': 'priority_id_name',
732                                                                 'type': 'string'
733                                                             },
734                                                             {
735                                                                 'name': 'priority_id_active',
736                                                                 'type': 'int'
737                                                             },
738                                                             {
739                                                                 'name': 'priority_id_seqid',
740                                                                 'type': 'int'
741                                                             },
742                                                             {
743                                                                 'name': 'severity_id_id',
744                                                                 'type': 'int'
745                                                             },
746                                                             {
747                                                                 'name': 'severity_id_etype',
748                                                                 'type': 'string'
749                                                             },
750                                                             {
751                                                                 'name': 'severity_id_name',
752                                                                 'type': 'string'
753                                                             },
754                                                             {
755                                                                 'name': 'severity_id_active',
756                                                                 'type': 'int'
757                                                             },
758                                                             {
759                                                                 'name': 'severity_id_seqid',
760                                                                 'type': 'int'
761                                                             },
762                                                             {
763                                                                 'name': 'classification_id_id',
764                                                                 'type': 'int'
765                                                             },
766                                                             {
767                                                                 'name': 'classification_id_etype',
768                                                                 'type': 'string'
769                                                             },
770                                                             {
771                                                                 'name': 'classification_id_name',
772                                                                 'type': 'string'
773                                                             },
774                                                             {
775                                                                 'name': 'classification_id_active',
776                                                                 'type': 'int'
777                                                             },
778                                                             {
779                                                                 'name': 'classification_id_seqid',
780                                                                 'type': 'int'
781                                                             },
782                                                             {
783                                                                 'name': 'resolution_id_id',
784                                                                 'type': 'int'
785                                                             },
786                                                             {
787                                                                 'name': 'resolution_id_etype',
788                                                                 'type': 'string'
789                                                             },
790                                                             {
791                                                                 'name': 'resolution_id_name',
792                                                                 'type': 'string'
793                                                             },
794                                                             {
795                                                                 'name': 'resolution_id_active',
796                                                                 'type': 'int'
797                                                             },
798                                                             {
799                                                                 'name': 'resolution_id_seqid',
800                                                                 'type': 'int'
801                                                             },
802                                                             {
803                                                                 'name': 'status_id',
804                                                                 'type': 'int'
805                                                             },
806                                                             {
807                                                                 'name': 'status_etype',
808                                                                 'type': 'string'
809                                                             },
810                                                             {
811                                                                 'name': 'status_name',
812                                                                 'type': 'string'
813                                                             },
814                                                             {
815                                                                 'name': 'status_active',
816                                                                 'type': 'int'
817                                                             },
818                                                             {
819                                                                 'name': 'status_seqid',
820                                                                 'type': 'int'
821                                                             },
822                                                             {
823                                                                 'name': 'project_id_id',
824                                                                 'type': 'int'
825                                                             },
826                                                             {
827                                                                 'name': 'project_id_name',
828                                                                 'type': 'string'
829                                                             },
830                                                             {
831                                                                 'name': 'project_id_remarks',
832                                                                 'type': 'string'
833                                                             },
834                                                             {
835                                                                 'name': 'project_id_owner_id',
836                                                                 'type': 'int'
837                                                             },
838                                                             {
839                                                                 'name': 'project_id_code',
840                                                                 'type': 'string'
841                                                             },
842                                                             {
843                                                                 'name': 'project_id_active',
844                                                                 'type': 'int'
845                                                             },
846                                                             {
847                                                                 'name': 'project_id_type',
848                                                                 'type': 'string'
849                                                             },
850                                                             {
851                                                                 'name': 'project_id_client_id',
852                                                                 'type': 'int'
853                                                             },
854                                                             {
855                                                                 'name': 'project_id_team_id',
856                                                                 'type': 'int'
857                                                             },
858                                                             {
859                                                                 'name': 'project_id_file_location',
860                                                                 'type': 'string'
861                                                             },
862                                                             {
863                                                                 'name': 'project_id_open_date',
864                                                                 'type': 'date'
865                                                             },
866                                                             {
867                                                                 'name': 'project_id_open_by',
868                                                                 'type': 'int'
869                                                             },
870                                                             {
871                                                                 'name': 'project_id_close_date',
872                                                                 'type': 'date'
873                                                             },
874                                                             {
875                                                                 'name': 'project_id_countries',
876                                                                 'type': 'string'
877                                                             },
878                                                             {
879                                                                 'name': 'project_id_languages',
880                                                                 'type': 'string'
881                                                             },
882                                                             {
883                                                                 'name': 'project_id_agency_id',
884                                                                 'type': 'int'
885                                                             },
886                                                             {
887                                                                 'name': 'milestone_id_id',
888                                                                 'type': 'int'
889                                                             },
890                                                             {
891                                                                 'name': 'milestone_id_name',
892                                                                 'type': 'string'
893                                                             },
894                                                             {
895                                                                 'name': 'milestone_id_description',
896                                                                 'type': 'string'
897                                                             },
898                                                             {
899                                                                 'name': 'milestone_id_startdate',
900                                                                 'type': 'date'
901                                                             },
902                                                             {
903                                                                 'name': 'milestone_id_duedate',
904                                                                 'type': 'date'
905                                                             },
906                                                             {
907                                                                 'name': 'milestone_id_completed',
908                                                                 'type': 'date'
909                                                             },
910                                                             {
911                                                                 'name': 'milestone_id_deleted',
912                                                                 'type': 'int'
913                                                             },
914                                                             {
915                                                                 'name': 'milestone_id_created',
916                                                                 'type': 'int'
917                                                             },
918                                                             {
919                                                                 'name': 'milestone_id_updated',
920                                                                 'type': 'int'
921                                                             },
922                                                             {
923                                                                 'name': 'milestone_id_project_id',
924                                                                 'type': 'int'
925                                                             }
926                                                         ]
927                                                     }
928                                                 },
929                                                 colModel : [
930                                                     {
931                                                         xtype: 'ColumnModel',
932                                                         xns: Roo.grid,
933                                                         header : 'Summary',
934                                                         width : 200,
935                                                         dataIndex : 'summary',
936                                                         renderer : function(v) { return String.format('{0}', v); }
937                                                     }
938                                                 ]
939                                             }
940                                         },
941                                         {
942                                             xtype: 'ContentPanel',
943                                             xns: Roo,
944                                             region : 'north',
945                                             items : [
946                                                 {
947                                                     xtype: 'Form',
948                                                     xns: Roo.form,
949                                                     listeners : {
950                                                         actioncomplete : function(_self,action)
951                                                         {
952                                                             
953                                                          
954                                                             Roo.log('action complete');
955                                                             Roo .log(action);
956                                                             if (action.type == 'setdata') {
957                                                         
958                                                                 _this.isClose = false; // force flag..
959                                                                 
960                                                                 if (this.activeRecord) {
961                                                                      this.saveActive( this.activeRecord);
962                                                                 }
963                                                                 
964                                                                 
965                                                                  
966                                                                 // show form..
967                                                                 if (!action.data || !action.data.action) {
968                                                                     _this.form.el.mask('select something'); 
969                                                                     this.activeRecord  = false;
970                                                                     _this.form.reset(); 
971                                                                     return;
972                                                                 }
973                                                                 _this.form.el.unmask();   
974                                                                 
975                                                                 this.activeRecord = action.rec;
976                                                                  
977                                                                 
978                                                         
979                                                                     
980                                                                 
981                                                                 // should save here if we are 'dirty!';
982                                                                 _this.form.reset();
983                                                                 _this.form.setValues(action.data);
984                                                                 // set the dates so they are correct..
985                                                                  _this.form.setValues( { 
986                                                          
987                                                                         action_dt : action.data.action_dt.format('Y-m-d H:i:s'),
988                                                                         entry_dt: action.data.action_dt.format('Y-m-d'),
989                                                                         qtyvalue2 : action.data.qtyvalue
990                                                                     });
991                                                                 // set the default values..
992                                                                 // for dirty test...
993                                                                 _this.form.items.each(function(f) {
994                                                                     f.originalValue = f.getValue();
995                                                                 });
996                                                                 
997                                                                 
998                                                                 
999                                                                 
1000                                                                 // form is set to an event.
1001                                                                 
1002                                                                         
1003                                                                 
1004                                                                return;
1005                                                             }
1006                                                             
1007                                                             
1008                                                             if (action.type == 'load') {
1009                                                          
1010                                                                 return;
1011                                                             }
1012                                                             if (action.type =='submit') {
1013                                                                 // set this on the close button..
1014                                                                  if (_this.isClose) {
1015                                                                     _this.dialog.hide();
1016                                                                  }
1017                                                                 
1018                                                                  if (_this.callback) {
1019                                                                     _this.callback.call(_this, _this.form.getValues());
1020                                                                  }
1021                                                         
1022                                                                  return;
1023                                                             }
1024                                                         },
1025                                                         rendered : function (form)
1026                                                         {
1027                                                             _this.form= form;
1028                                                         }
1029                                                     },
1030                                                     activeData : false,
1031                                                     method : 'POST',
1032                                                     style : 'margin-left:10px;',
1033                                                     saveActive : function(rec, effort) {
1034                                                         
1035                                                          effort = effort || 0;
1036                                                         
1037                                                     
1038                                                         if (!rec) {
1039                                                             Roo.log("ERROR: saveActive: record not set ");
1040                                                             return;
1041                                                         }
1042                                                     
1043                                                          var d = Roo.apply({}, rec.data); // copy it so changes do not affect crap...
1044                                                          
1045                                                          var upd = (new Date()).format('Y-m-d H:i:s');
1046                                                          
1047                                                      
1048                                                          
1049                                                          
1050                                                          //Roo.log("SAVE IT: " + Roo.encode(d) );
1051                                                          
1052                                                          //     return;
1053                                                          var at = typeof(d.action_dt) == 'string' ? Date.parseDate(d.action_dt, 'Y-m-d H:i:s') : d.action_dt
1054                                                          
1055                                                          new Pman.Request({
1056                                                             url : baseURL + '/Roo/Cash_invoice_entry.php',
1057                                                             method : 'POST',
1058                                                             params : {
1059                                                                 id : d.id,
1060                                                                 entry_dt: at.format('Y-m-d'),  // this should not change for posted entries really...
1061                                                                 entered_dt: upd,            
1062                                                                 action_dt : at.format('Y-m-d H:i:s'),
1063                                                                 qtyvalue : d.qtyvalue,
1064                                                                 action: 'Hours',
1065                                                                 description: d.description,
1066                                                                 pricevalue: d.pricevalue,  
1067                                                                 project_id : d.project_id,
1068                                                                 staff_id : d.staff_id * 1 ? d.staff_id : Pman.Login.authUser.id,
1069                                                                 ticket_id : d.ticket_id ? d.ticket_id : 0
1070                                                                 
1071                                                             },
1072                                                             success : function(res)
1073                                                             {
1074                                                                 // everythings fine..
1075                                                                 
1076                                                                 // we have to update the view object... now...
1077                                                                 // we can not reload as that may blank out data..
1078                                                                 if (!rec.data.id) {
1079                                                                     Roo.log("Setting data id to " + res.data.id);
1080                                                                     rec.set('id', res.data.id);
1081                                                     
1082                                                                 }
1083                                                     
1084                                                                 
1085                                                             },
1086                                                             failure : function()
1087                                                             {
1088                                                                 effort++;
1089                                                                 if (effort > 3) {
1090                                                                     Roo.MessageBox.alert("Error", "Saving timesheet failed");
1091                                                                     return;
1092                                                                 }
1093                                                                 _this.form.saveActive(rec, effort);
1094                                                             }
1095                                                             
1096                                                          });
1097                                                     },
1098                                                     url : baseURL + '/Roo/cash_invoice_entry.php',
1099                                                     items : [
1100                                                         {
1101                                                             xtype: 'ComboBox',
1102                                                             xns: Roo.form,
1103                                                             listeners : {
1104                                                                 render : function (_self)
1105                                                                 {
1106                                                                     _this.projectSel = _self;
1107                                                                 },
1108                                                                 beforeselect : function (combo, record, index)
1109                                                                 {
1110                                                                 
1111                                                                     Roo.log('save it');
1112                                                                     var sel = _this.grid.ds.selectedBar();
1113                                                                  
1114                                                                     if (!sel) {
1115                                                                         Roo.log("nothing selected?");
1116                                                                         return;
1117                                                                     }
1118                                                                      
1119                                                                     // active record should be the same thing.
1120                                                                     sel.set('project_id', record.data.id);
1121                                                                     sel.set('project_id_code',     record.data.code);
1122                                                                     sel.set('project_id_name',   record.data.name);
1123                                                                     
1124                                                                     
1125                                                                     _this.grid.ds.updateBar(sel);
1126                                                                     
1127                                                                       
1128                                                                      
1129                                                                 }
1130                                                             },
1131                                                             allowBlank : 'false',
1132                                                             displayField : 'name',
1133                                                             editable : 'false',
1134                                                             emptyText : "Select Project",
1135                                                             fieldLabel : 'Project',
1136                                                             forceSelection : true,
1137                                                             hiddenName : 'project_id',
1138                                                             listWidth : 400,
1139                                                             loadingText : "Searching...",
1140                                                             minChars : 2,
1141                                                             name : 'project_id_name',
1142                                                             pageSize : 20,
1143                                                             qtip : "Select Projects",
1144                                                             queryParam : 'query[name]',
1145                                                             selectOnFocus : true,
1146                                                             tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> - {name}</div>',
1147                                                             triggerAction : 'all',
1148                                                             typeAhead : true,
1149                                                             valueField : 'id',
1150                                                             width : 200,
1151                                                             store : {
1152                                                                 xtype: 'Store',
1153                                                                 xns: Roo.data,
1154                                                                 listeners : {
1155                                                                     beforeload : function (_self, o){
1156                                                                         o.params = o.params || {};
1157                                                                         o.params['query[project_filter]'] = 'P,N,U'; // actually this is the default.
1158                                                                         
1159                                                                         // set more here
1160                                                                     }
1161                                                                 },
1162                                                                 remoteSort : true,
1163                                                                 sortInfo : { field: 'code', direction: 'ASC' },
1164                                                                 proxy : {
1165                                                                     xtype: 'HttpProxy',
1166                                                                     xns: Roo.data,
1167                                                                     method : 'GET',
1168                                                                     url : baseURL + '/Roo/Projects.php'
1169                                                                 },
1170                                                                 reader : {
1171                                                                     xtype: 'JsonReader',
1172                                                                     xns: Roo.data,
1173                                                                     id : 'id',
1174                                                                     root : 'data',
1175                                                                     totalProperty : 'total',
1176                                                                     fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
1177                                                                 }
1178                                                             }
1179                                                         },
1180                                                         {
1181                                                             xtype: 'Column',
1182                                                             xns: Roo.form,
1183                                                             labelAlign : 'top',
1184                                                             width : 300,
1185                                                             items : [
1186                                                                 {
1187                                                                     xtype: 'TextArea',
1188                                                                     xns: Roo.form,
1189                                                                     listeners : {
1190                                                                         keyup : function (_self, e)
1191                                                                         {
1192                                                                             _this.selectedRec.set('description',   this.getValue());
1193                                                                             _this.grid.dataSource.updateBar(_this.selectedRec);
1194                                                                          
1195                                                                         }
1196                                                                     },
1197                                                                     fieldLabel : 'Description',
1198                                                                     height : 120,
1199                                                                     name : 'description',
1200                                                                     width : 300
1201                                                                 }
1202                                                             ]
1203                                                         },
1204                                                         {
1205                                                             xtype: 'Hidden',
1206                                                             xns: Roo.form,
1207                                                             name : 'action'
1208                                                         },
1209                                                         {
1210                                                             xtype: 'Hidden',
1211                                                             xns: Roo.form,
1212                                                             name : 'staff_id'
1213                                                         },
1214                                                         {
1215                                                             xtype: 'Hidden',
1216                                                             xns: Roo.form,
1217                                                             name : 'qtyvalue'
1218                                                         },
1219                                                         {
1220                                                             xtype: 'Hidden',
1221                                                             xns: Roo.form,
1222                                                             name : 'qtyvalue2'
1223                                                         },
1224                                                         {
1225                                                             xtype: 'Hidden',
1226                                                             xns: Roo.form,
1227                                                             name : 'entry_dt'
1228                                                         },
1229                                                         {
1230                                                             xtype: 'Hidden',
1231                                                             xns: Roo.form,
1232                                                             name : 'action_dt'
1233                                                         },
1234                                                         {
1235                                                             xtype: 'Hidden',
1236                                                             xns: Roo.form,
1237                                                             name : 'id'
1238                                                         }
1239                                                     ]
1240                                                 }
1241                                             ]
1242                                         }
1243                                     ],
1244                                     north : {
1245                                         xtype: 'LayoutRegion',
1246                                         xns: Roo,
1247                                         height : 200,
1248                                         title : "Details"
1249                                     },
1250                                     center : {
1251                                         xtype: 'LayoutRegion',
1252                                         xns: Roo,
1253                                         title : "Task Queue"
1254                                     }
1255                                 }
1256                             }
1257                         ],
1258                         center : {
1259                             xtype: 'LayoutRegion',
1260                             xns: Roo,
1261                             title : "Active / Logged Time"
1262                         },
1263                         east : {
1264                             xtype: 'LayoutRegion',
1265                             xns: Roo,
1266                             width : 350
1267                         }
1268                     }
1269                 },
1270                 {
1271                     xtype: 'NestedLayoutPanel',
1272                     xns: Roo,
1273                     region : 'center',
1274                     title : "Plan Time",
1275                     layout : {
1276                         xtype: 'BorderLayout',
1277                         xns: Roo,
1278                         items : [
1279                             {
1280                                 xtype: 'GridPanel',
1281                                 xns: Roo,
1282                                 listeners : {
1283                                     activate : function() {
1284                                         _this.openpanel = this;
1285                                         if (_this.opengrid) {
1286                                        //    _this.opengrid.footer.onClick('first');
1287                                         }
1288                                     }
1289                                 },
1290                                 background : false,
1291                                 fitContainer : true,
1292                                 fitToframe : true,
1293                                 region : 'west',
1294                                 tableName : 'mtrack_ticket',
1295                                 title : "mtrack_ticket",
1296                                 grid : {
1297                                     xtype: 'Grid',
1298                                     xns: Roo.grid,
1299                                     listeners : {
1300                                         render : function() 
1301                                         {
1302                                             _this.opengrid = this; 
1303                                             //_this.dialog = Pman.Dialog.FILL_IN
1304                                             if (_this.openpanel.active) {
1305                                                //this.footer.onClick('first');
1306                                             }
1307                                         },
1308                                         rowdblclick : function (_self, rowIndex, e)
1309                                         {
1310                                             if (!_this.dialog) return;
1311                                             _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
1312                                                 _this.grid.footer.onClick('first');
1313                                             }); 
1314                                         }
1315                                     },
1316                                     autoExpandColumn : 'summary',
1317                                     loadMask : true,
1318                                     toolbar : {
1319                                         xtype: 'Toolbar',
1320                                         xns: Roo,
1321                                         items : [
1322                                             {
1323                                                 xtype: 'ComboBox',
1324                                                 xns: Roo.form,
1325                                                 displayField : '',
1326                                                 editable : 'false',
1327                                                 emptyText : "Select Project",
1328                                                 fieldLabel : 'mtrack_ticket',
1329                                                 forceSelection : true,
1330                                                 hiddenName : '',
1331                                                 listWidth : 400,
1332                                                 loadingText : "Searching...",
1333                                                 minChars : 2,
1334                                                 name : '',
1335                                                 pageSize : 20,
1336                                                 qtip : "Select mtrack_ticket",
1337                                                 queryParam : '',
1338                                                 selectOnFocus : true,
1339                                                 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
1340                                                 triggerAction : 'all',
1341                                                 typeAhead : true,
1342                                                 valueField : 'id',
1343                                                 width : 300,
1344                                                 store : {
1345                                                     xtype: 'Store',
1346                                                     xns: Roo.data,
1347                                                     remoteSort : true,
1348                                                     sortInfo : { direction : 'ASC', field: 'id' },
1349                                                     listeners : {
1350                                                         beforeload : function (_self, o){
1351                                                             o.params = o.params || {};
1352                                                             // set more here
1353                                                         }
1354                                                     },
1355                                                     proxy : {
1356                                                         xtype: 'HttpProxy',
1357                                                         xns: Roo.data,
1358                                                         method : 'GET',
1359                                                         url : baseURL + '/Roo/mtrack_ticket.php'
1360                                                     },
1361                                                     reader : {
1362                                                         xtype: 'JsonReader',
1363                                                         xns: Roo.data,
1364                                                         id : 'id',
1365                                                         root : 'data',
1366                                                         totalProperty : 'total',
1367                                                         fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}]
1368                                                     }
1369                                                 }
1370                                             }
1371                                         ]
1372                                     },
1373                                     dataSource : {
1374                                         xtype: 'Store',
1375                                         xns: Roo.data,
1376                                         remoteSort : true,
1377                                         sortInfo : { field : 'summary', direction: 'ASC' },
1378                                         proxy : {
1379                                             xtype: 'HttpProxy',
1380                                             xns: Roo.data,
1381                                             method : 'GET',
1382                                             url : baseURL + '/Roo/mtrack_ticket.php'
1383                                         },
1384                                         reader : {
1385                                             xtype: 'JsonReader',
1386                                             xns: Roo.data,
1387                                             totalProperty : 'total',
1388                                             root : 'data',
1389                                             id : 'id',
1390                                             fields : [
1391                                                 {
1392                                                     'name': 'id',
1393                                                     'type': 'int'
1394                                                 },
1395                                                 {
1396                                                     'name': 'project_id',
1397                                                     'type': 'int'
1398                                                 },
1399                                                 {
1400                                                     'name': 'summary',
1401                                                     'type': 'string'
1402                                                 },
1403                                                 {
1404                                                     'name': 'description',
1405                                                     'type': 'string'
1406                                                 },
1407                                                 {
1408                                                     'name': 'changelog',
1409                                                     'type': 'string'
1410                                                 },
1411                                                 {
1412                                                     'name': 'created',
1413                                                     'type': 'int'
1414                                                 },
1415                                                 {
1416                                                     'name': 'updated',
1417                                                     'type': 'int'
1418                                                 },
1419                                                 {
1420                                                     'name': 'owner_id',
1421                                                     'type': 'int'
1422                                                 },
1423                                                 {
1424                                                     'name': 'priority_id',
1425                                                     'type': 'int'
1426                                                 },
1427                                                 {
1428                                                     'name': 'severity_id',
1429                                                     'type': 'int'
1430                                                 },
1431                                                 {
1432                                                     'name': 'classification_id',
1433                                                     'type': 'int'
1434                                                 },
1435                                                 {
1436                                                     'name': 'resolution_id',
1437                                                     'type': 'int'
1438                                                 },
1439                                                 {
1440                                                     'name': 'cc',
1441                                                     'type': 'string'
1442                                                 },
1443                                                 {
1444                                                     'name': 'status',
1445                                                     'type': 'int'
1446                                                 },
1447                                                 {
1448                                                     'name': 'estimated',
1449                                                     'type': 'float'
1450                                                 },
1451                                                 {
1452                                                     'name': 'spent',
1453                                                     'type': 'float'
1454                                                 },
1455                                                 {
1456                                                     'name': 'x_fieldname',
1457                                                     'type': 'string'
1458                                                 },
1459                                                 {
1460                                                     'name': 'developer_id',
1461                                                     'type': 'int'
1462                                                 },
1463                                                 {
1464                                                     'name': 'milestone_id',
1465                                                     'type': 'int'
1466                                                 },
1467                                                 {
1468                                                     'name': 'updated_id',
1469                                                     'type': 'int'
1470                                                 },
1471                                                 {
1472                                                     'name': 'updated_person_id',
1473                                                     'type': 'int'
1474                                                 },
1475                                                 {
1476                                                     'name': 'updated_ontable',
1477                                                     'type': 'string'
1478                                                 },
1479                                                 {
1480                                                     'name': 'updated_onid',
1481                                                     'type': 'int'
1482                                                 },
1483                                                 {
1484                                                     'name': 'updated_changedate',
1485                                                     'type': 'date'
1486                                                 },
1487                                                 {
1488                                                     'name': 'updated_reason',
1489                                                     'type': 'string'
1490                                                 },
1491                                                 {
1492                                                     'name': 'created_id',
1493                                                     'type': 'int'
1494                                                 },
1495                                                 {
1496                                                     'name': 'created_person_id',
1497                                                     'type': 'int'
1498                                                 },
1499                                                 {
1500                                                     'name': 'created_ontable',
1501                                                     'type': 'string'
1502                                                 },
1503                                                 {
1504                                                     'name': 'created_onid',
1505                                                     'type': 'int'
1506                                                 },
1507                                                 {
1508                                                     'name': 'created_changedate',
1509                                                     'type': 'date'
1510                                                 },
1511                                                 {
1512                                                     'name': 'created_reason',
1513                                                     'type': 'string'
1514                                                 },
1515                                                 {
1516                                                     'name': 'owner_id_id',
1517                                                     'type': 'int'
1518                                                 },
1519                                                 {
1520                                                     'name': 'owner_id_office_id',
1521                                                     'type': 'int'
1522                                                 },
1523                                                 {
1524                                                     'name': 'owner_id_name',
1525                                                     'type': 'string'
1526                                                 },
1527                                                 {
1528                                                     'name': 'owner_id_phone',
1529                                                     'type': 'string'
1530                                                 },
1531                                                 {
1532                                                     'name': 'owner_id_fax',
1533                                                     'type': 'string'
1534                                                 },
1535                                                 {
1536                                                     'name': 'owner_id_email',
1537                                                     'type': 'string'
1538                                                 },
1539                                                 {
1540                                                     'name': 'owner_id_company_id',
1541                                                     'type': 'int'
1542                                                 },
1543                                                 {
1544                                                     'name': 'owner_id_role',
1545                                                     'type': 'string'
1546                                                 },
1547                                                 {
1548                                                     'name': 'owner_id_active',
1549                                                     'type': 'int'
1550                                                 },
1551                                                 {
1552                                                     'name': 'owner_id_remarks',
1553                                                     'type': 'string'
1554                                                 },
1555                                                 {
1556                                                     'name': 'owner_id_passwd',
1557                                                     'type': 'string'
1558                                                 },
1559                                                 {
1560                                                     'name': 'owner_id_owner_id',
1561                                                     'type': 'int'
1562                                                 },
1563                                                 {
1564                                                     'name': 'owner_id_lang',
1565                                                     'type': 'string'
1566                                                 },
1567                                                 {
1568                                                     'name': 'owner_id_no_reset_sent',
1569                                                     'type': 'int'
1570                                                 },
1571                                                 {
1572                                                     'name': 'owner_id_action_type',
1573                                                     'type': 'string'
1574                                                 },
1575                                                 {
1576                                                     'name': 'owner_id_project_id',
1577                                                     'type': 'int'
1578                                                 },
1579                                                 {
1580                                                     'name': 'owner_id_deleted_by',
1581                                                     'type': 'int'
1582                                                 },
1583                                                 {
1584                                                     'name': 'owner_id_deleted_dt',
1585                                                     'type': 'date'
1586                                                 },
1587                                                 {
1588                                                     'name': 'developer_id_id',
1589                                                     'type': 'int'
1590                                                 },
1591                                                 {
1592                                                     'name': 'developer_id_office_id',
1593                                                     'type': 'int'
1594                                                 },
1595                                                 {
1596                                                     'name': 'developer_id_name',
1597                                                     'type': 'string'
1598                                                 },
1599                                                 {
1600                                                     'name': 'developer_id_phone',
1601                                                     'type': 'string'
1602                                                 },
1603                                                 {
1604                                                     'name': 'developer_id_fax',
1605                                                     'type': 'string'
1606                                                 },
1607                                                 {
1608                                                     'name': 'developer_id_email',
1609                                                     'type': 'string'
1610                                                 },
1611                                                 {
1612                                                     'name': 'developer_id_company_id',
1613                                                     'type': 'int'
1614                                                 },
1615                                                 {
1616                                                     'name': 'developer_id_role',
1617                                                     'type': 'string'
1618                                                 },
1619                                                 {
1620                                                     'name': 'developer_id_active',
1621                                                     'type': 'int'
1622                                                 },
1623                                                 {
1624                                                     'name': 'developer_id_remarks',
1625                                                     'type': 'string'
1626                                                 },
1627                                                 {
1628                                                     'name': 'developer_id_passwd',
1629                                                     'type': 'string'
1630                                                 },
1631                                                 {
1632                                                     'name': 'developer_id_owner_id',
1633                                                     'type': 'int'
1634                                                 },
1635                                                 {
1636                                                     'name': 'developer_id_lang',
1637                                                     'type': 'string'
1638                                                 },
1639                                                 {
1640                                                     'name': 'developer_id_no_reset_sent',
1641                                                     'type': 'int'
1642                                                 },
1643                                                 {
1644                                                     'name': 'developer_id_action_type',
1645                                                     'type': 'string'
1646                                                 },
1647                                                 {
1648                                                     'name': 'developer_id_project_id',
1649                                                     'type': 'int'
1650                                                 },
1651                                                 {
1652                                                     'name': 'developer_id_deleted_by',
1653                                                     'type': 'int'
1654                                                 },
1655                                                 {
1656                                                     'name': 'developer_id_deleted_dt',
1657                                                     'type': 'date'
1658                                                 },
1659                                                 {
1660                                                     'name': 'priority_id_id',
1661                                                     'type': 'int'
1662                                                 },
1663                                                 {
1664                                                     'name': 'priority_id_etype',
1665                                                     'type': 'string'
1666                                                 },
1667                                                 {
1668                                                     'name': 'priority_id_name',
1669                                                     'type': 'string'
1670                                                 },
1671                                                 {
1672                                                     'name': 'priority_id_active',
1673                                                     'type': 'int'
1674                                                 },
1675                                                 {
1676                                                     'name': 'priority_id_seqid',
1677                                                     'type': 'int'
1678                                                 },
1679                                                 {
1680                                                     'name': 'severity_id_id',
1681                                                     'type': 'int'
1682                                                 },
1683                                                 {
1684                                                     'name': 'severity_id_etype',
1685                                                     'type': 'string'
1686                                                 },
1687                                                 {
1688                                                     'name': 'severity_id_name',
1689                                                     'type': 'string'
1690                                                 },
1691                                                 {
1692                                                     'name': 'severity_id_active',
1693                                                     'type': 'int'
1694                                                 },
1695                                                 {
1696                                                     'name': 'severity_id_seqid',
1697                                                     'type': 'int'
1698                                                 },
1699                                                 {
1700                                                     'name': 'classification_id_id',
1701                                                     'type': 'int'
1702                                                 },
1703                                                 {
1704                                                     'name': 'classification_id_etype',
1705                                                     'type': 'string'
1706                                                 },
1707                                                 {
1708                                                     'name': 'classification_id_name',
1709                                                     'type': 'string'
1710                                                 },
1711                                                 {
1712                                                     'name': 'classification_id_active',
1713                                                     'type': 'int'
1714                                                 },
1715                                                 {
1716                                                     'name': 'classification_id_seqid',
1717                                                     'type': 'int'
1718                                                 },
1719                                                 {
1720                                                     'name': 'resolution_id_id',
1721                                                     'type': 'int'
1722                                                 },
1723                                                 {
1724                                                     'name': 'resolution_id_etype',
1725                                                     'type': 'string'
1726                                                 },
1727                                                 {
1728                                                     'name': 'resolution_id_name',
1729                                                     'type': 'string'
1730                                                 },
1731                                                 {
1732                                                     'name': 'resolution_id_active',
1733                                                     'type': 'int'
1734                                                 },
1735                                                 {
1736                                                     'name': 'resolution_id_seqid',
1737                                                     'type': 'int'
1738                                                 },
1739                                                 {
1740                                                     'name': 'status_id',
1741                                                     'type': 'int'
1742                                                 },
1743                                                 {
1744                                                     'name': 'status_etype',
1745                                                     'type': 'string'
1746                                                 },
1747                                                 {
1748                                                     'name': 'status_name',
1749                                                     'type': 'string'
1750                                                 },
1751                                                 {
1752                                                     'name': 'status_active',
1753                                                     'type': 'int'
1754                                                 },
1755                                                 {
1756                                                     'name': 'status_seqid',
1757                                                     'type': 'int'
1758                                                 },
1759                                                 {
1760                                                     'name': 'project_id_id',
1761                                                     'type': 'int'
1762                                                 },
1763                                                 {
1764                                                     'name': 'project_id_name',
1765                                                     'type': 'string'
1766                                                 },
1767                                                 {
1768                                                     'name': 'project_id_remarks',
1769                                                     'type': 'string'
1770                                                 },
1771                                                 {
1772                                                     'name': 'project_id_owner_id',
1773                                                     'type': 'int'
1774                                                 },
1775                                                 {
1776                                                     'name': 'project_id_code',
1777                                                     'type': 'string'
1778                                                 },
1779                                                 {
1780                                                     'name': 'project_id_active',
1781                                                     'type': 'int'
1782                                                 },
1783                                                 {
1784                                                     'name': 'project_id_type',
1785                                                     'type': 'string'
1786                                                 },
1787                                                 {
1788                                                     'name': 'project_id_client_id',
1789                                                     'type': 'int'
1790                                                 },
1791                                                 {
1792                                                     'name': 'project_id_team_id',
1793                                                     'type': 'int'
1794                                                 },
1795                                                 {
1796                                                     'name': 'project_id_file_location',
1797                                                     'type': 'string'
1798                                                 },
1799                                                 {
1800                                                     'name': 'project_id_open_date',
1801                                                     'type': 'date'
1802                                                 },
1803                                                 {
1804                                                     'name': 'project_id_open_by',
1805                                                     'type': 'int'
1806                                                 },
1807                                                 {
1808                                                     'name': 'project_id_close_date',
1809                                                     'type': 'date'
1810                                                 },
1811                                                 {
1812                                                     'name': 'project_id_countries',
1813                                                     'type': 'string'
1814                                                 },
1815                                                 {
1816                                                     'name': 'project_id_languages',
1817                                                     'type': 'string'
1818                                                 },
1819                                                 {
1820                                                     'name': 'project_id_agency_id',
1821                                                     'type': 'int'
1822                                                 },
1823                                                 {
1824                                                     'name': 'milestone_id_id',
1825                                                     'type': 'int'
1826                                                 },
1827                                                 {
1828                                                     'name': 'milestone_id_name',
1829                                                     'type': 'string'
1830                                                 },
1831                                                 {
1832                                                     'name': 'milestone_id_description',
1833                                                     'type': 'string'
1834                                                 },
1835                                                 {
1836                                                     'name': 'milestone_id_startdate',
1837                                                     'type': 'date'
1838                                                 },
1839                                                 {
1840                                                     'name': 'milestone_id_duedate',
1841                                                     'type': 'date'
1842                                                 },
1843                                                 {
1844                                                     'name': 'milestone_id_completed',
1845                                                     'type': 'date'
1846                                                 },
1847                                                 {
1848                                                     'name': 'milestone_id_deleted',
1849                                                     'type': 'int'
1850                                                 },
1851                                                 {
1852                                                     'name': 'milestone_id_created',
1853                                                     'type': 'int'
1854                                                 },
1855                                                 {
1856                                                     'name': 'milestone_id_updated',
1857                                                     'type': 'int'
1858                                                 },
1859                                                 {
1860                                                     'name': 'milestone_id_project_id',
1861                                                     'type': 'int'
1862                                                 }
1863                                             ]
1864                                         }
1865                                     },
1866                                     colModel : [
1867                                         {
1868                                             xtype: 'ColumnModel',
1869                                             xns: Roo.grid,
1870                                             header : 'Summary',
1871                                             width : 200,
1872                                             dataIndex : 'summary',
1873                                             renderer : function(v) { return String.format('{0}', v); }
1874                                         }
1875                                     ]
1876                                 }
1877                             },
1878                             {
1879                                 xtype: 'GridPanel',
1880                                 xns: Roo,
1881                                 listeners : {
1882                                     activate : function() {
1883                                         _this.openpanel = this;
1884                                         if (_this.opengrid) {
1885                                        //    _this.opengrid.footer.onClick('first');
1886                                         }
1887                                     }
1888                                 },
1889                                 background : false,
1890                                 fitContainer : true,
1891                                 fitToframe : true,
1892                                 region : 'center',
1893                                 tableName : 'mtrack_ticket',
1894                                 title : "mtrack_ticket",
1895                                 grid : {
1896                                     xtype: 'Grid',
1897                                     xns: Roo.grid,
1898                                     listeners : {
1899                                         render : function() 
1900                                         {
1901                                             _this.opengrid = this; 
1902                                             //_this.dialog = Pman.Dialog.FILL_IN
1903                                             if (_this.openpanel.active) {
1904                                                //this.footer.onClick('first');
1905                                             }
1906                                         },
1907                                         rowdblclick : function (_self, rowIndex, e)
1908                                         {
1909                                             if (!_this.dialog) return;
1910                                             _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
1911                                                 _this.grid.footer.onClick('first');
1912                                             }); 
1913                                         }
1914                                     },
1915                                     autoExpandColumn : 'summary',
1916                                     loadMask : true,
1917                                     toolbar : {
1918                                         xtype: 'Toolbar',
1919                                         xns: Roo,
1920                                         items : [
1921                                             {
1922                                                 xtype: 'ComboBox',
1923                                                 xns: Roo.form,
1924                                                 displayField : '',
1925                                                 editable : 'false',
1926                                                 emptyText : "Select Person",
1927                                                 fieldLabel : 'mtrack_ticket',
1928                                                 forceSelection : true,
1929                                                 hiddenName : '',
1930                                                 listWidth : 400,
1931                                                 loadingText : "Searching...",
1932                                                 minChars : 2,
1933                                                 name : '',
1934                                                 pageSize : 20,
1935                                                 qtip : "Select mtrack_ticket",
1936                                                 queryParam : '',
1937                                                 selectOnFocus : true,
1938                                                 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
1939                                                 triggerAction : 'all',
1940                                                 typeAhead : true,
1941                                                 valueField : 'id',
1942                                                 width : 300,
1943                                                 store : {
1944                                                     xtype: 'Store',
1945                                                     xns: Roo.data,
1946                                                     remoteSort : true,
1947                                                     sortInfo : { direction : 'ASC', field: 'id' },
1948                                                     listeners : {
1949                                                         beforeload : function (_self, o){
1950                                                             o.params = o.params || {};
1951                                                             // set more here
1952                                                         }
1953                                                     },
1954                                                     proxy : {
1955                                                         xtype: 'HttpProxy',
1956                                                         xns: Roo.data,
1957                                                         method : 'GET',
1958                                                         url : baseURL + '/Roo/mtrack_ticket.php'
1959                                                     },
1960                                                     reader : {
1961                                                         xtype: 'JsonReader',
1962                                                         xns: Roo.data,
1963                                                         id : 'id',
1964                                                         root : 'data',
1965                                                         totalProperty : 'total',
1966                                                         fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}]
1967                                                     }
1968                                                 }
1969                                             }
1970                                         ]
1971                                     },
1972                                     dataSource : {
1973                                         xtype: 'Store',
1974                                         xns: Roo.data,
1975                                         remoteSort : true,
1976                                         sortInfo : { field : 'summary', direction: 'ASC' },
1977                                         proxy : {
1978                                             xtype: 'HttpProxy',
1979                                             xns: Roo.data,
1980                                             method : 'GET',
1981                                             url : baseURL + '/Roo/mtrack_ticket.php'
1982                                         },
1983                                         reader : {
1984                                             xtype: 'JsonReader',
1985                                             xns: Roo.data,
1986                                             totalProperty : 'total',
1987                                             root : 'data',
1988                                             id : 'id',
1989                                             fields : [
1990                                                 {
1991                                                     'name': 'id',
1992                                                     'type': 'int'
1993                                                 },
1994                                                 {
1995                                                     'name': 'project_id',
1996                                                     'type': 'int'
1997                                                 },
1998                                                 {
1999                                                     'name': 'summary',
2000                                                     'type': 'string'
2001                                                 },
2002                                                 {
2003                                                     'name': 'description',
2004                                                     'type': 'string'
2005                                                 },
2006                                                 {
2007                                                     'name': 'changelog',
2008                                                     'type': 'string'
2009                                                 },
2010                                                 {
2011                                                     'name': 'created',
2012                                                     'type': 'int'
2013                                                 },
2014                                                 {
2015                                                     'name': 'updated',
2016                                                     'type': 'int'
2017                                                 },
2018                                                 {
2019                                                     'name': 'owner_id',
2020                                                     'type': 'int'
2021                                                 },
2022                                                 {
2023                                                     'name': 'priority_id',
2024                                                     'type': 'int'
2025                                                 },
2026                                                 {
2027                                                     'name': 'severity_id',
2028                                                     'type': 'int'
2029                                                 },
2030                                                 {
2031                                                     'name': 'classification_id',
2032                                                     'type': 'int'
2033                                                 },
2034                                                 {
2035                                                     'name': 'resolution_id',
2036                                                     'type': 'int'
2037                                                 },
2038                                                 {
2039                                                     'name': 'cc',
2040                                                     'type': 'string'
2041                                                 },
2042                                                 {
2043                                                     'name': 'status',
2044                                                     'type': 'int'
2045                                                 },
2046                                                 {
2047                                                     'name': 'estimated',
2048                                                     'type': 'float'
2049                                                 },
2050                                                 {
2051                                                     'name': 'spent',
2052                                                     'type': 'float'
2053                                                 },
2054                                                 {
2055                                                     'name': 'x_fieldname',
2056                                                     'type': 'string'
2057                                                 },
2058                                                 {
2059                                                     'name': 'developer_id',
2060                                                     'type': 'int'
2061                                                 },
2062                                                 {
2063                                                     'name': 'milestone_id',
2064                                                     'type': 'int'
2065                                                 },
2066                                                 {
2067                                                     'name': 'updated_id',
2068                                                     'type': 'int'
2069                                                 },
2070                                                 {
2071                                                     'name': 'updated_person_id',
2072                                                     'type': 'int'
2073                                                 },
2074                                                 {
2075                                                     'name': 'updated_ontable',
2076                                                     'type': 'string'
2077                                                 },
2078                                                 {
2079                                                     'name': 'updated_onid',
2080                                                     'type': 'int'
2081                                                 },
2082                                                 {
2083                                                     'name': 'updated_changedate',
2084                                                     'type': 'date'
2085                                                 },
2086                                                 {
2087                                                     'name': 'updated_reason',
2088                                                     'type': 'string'
2089                                                 },
2090                                                 {
2091                                                     'name': 'created_id',
2092                                                     'type': 'int'
2093                                                 },
2094                                                 {
2095                                                     'name': 'created_person_id',
2096                                                     'type': 'int'
2097                                                 },
2098                                                 {
2099                                                     'name': 'created_ontable',
2100                                                     'type': 'string'
2101                                                 },
2102                                                 {
2103                                                     'name': 'created_onid',
2104                                                     'type': 'int'
2105                                                 },
2106                                                 {
2107                                                     'name': 'created_changedate',
2108                                                     'type': 'date'
2109                                                 },
2110                                                 {
2111                                                     'name': 'created_reason',
2112                                                     'type': 'string'
2113                                                 },
2114                                                 {
2115                                                     'name': 'owner_id_id',
2116                                                     'type': 'int'
2117                                                 },
2118                                                 {
2119                                                     'name': 'owner_id_office_id',
2120                                                     'type': 'int'
2121                                                 },
2122                                                 {
2123                                                     'name': 'owner_id_name',
2124                                                     'type': 'string'
2125                                                 },
2126                                                 {
2127                                                     'name': 'owner_id_phone',
2128                                                     'type': 'string'
2129                                                 },
2130                                                 {
2131                                                     'name': 'owner_id_fax',
2132                                                     'type': 'string'
2133                                                 },
2134                                                 {
2135                                                     'name': 'owner_id_email',
2136                                                     'type': 'string'
2137                                                 },
2138                                                 {
2139                                                     'name': 'owner_id_company_id',
2140                                                     'type': 'int'
2141                                                 },
2142                                                 {
2143                                                     'name': 'owner_id_role',
2144                                                     'type': 'string'
2145                                                 },
2146                                                 {
2147                                                     'name': 'owner_id_active',
2148                                                     'type': 'int'
2149                                                 },
2150                                                 {
2151                                                     'name': 'owner_id_remarks',
2152                                                     'type': 'string'
2153                                                 },
2154                                                 {
2155                                                     'name': 'owner_id_passwd',
2156                                                     'type': 'string'
2157                                                 },
2158                                                 {
2159                                                     'name': 'owner_id_owner_id',
2160                                                     'type': 'int'
2161                                                 },
2162                                                 {
2163                                                     'name': 'owner_id_lang',
2164                                                     'type': 'string'
2165                                                 },
2166                                                 {
2167                                                     'name': 'owner_id_no_reset_sent',
2168                                                     'type': 'int'
2169                                                 },
2170                                                 {
2171                                                     'name': 'owner_id_action_type',
2172                                                     'type': 'string'
2173                                                 },
2174                                                 {
2175                                                     'name': 'owner_id_project_id',
2176                                                     'type': 'int'
2177                                                 },
2178                                                 {
2179                                                     'name': 'owner_id_deleted_by',
2180                                                     'type': 'int'
2181                                                 },
2182                                                 {
2183                                                     'name': 'owner_id_deleted_dt',
2184                                                     'type': 'date'
2185                                                 },
2186                                                 {
2187                                                     'name': 'developer_id_id',
2188                                                     'type': 'int'
2189                                                 },
2190                                                 {
2191                                                     'name': 'developer_id_office_id',
2192                                                     'type': 'int'
2193                                                 },
2194                                                 {
2195                                                     'name': 'developer_id_name',
2196                                                     'type': 'string'
2197                                                 },
2198                                                 {
2199                                                     'name': 'developer_id_phone',
2200                                                     'type': 'string'
2201                                                 },
2202                                                 {
2203                                                     'name': 'developer_id_fax',
2204                                                     'type': 'string'
2205                                                 },
2206                                                 {
2207                                                     'name': 'developer_id_email',
2208                                                     'type': 'string'
2209                                                 },
2210                                                 {
2211                                                     'name': 'developer_id_company_id',
2212                                                     'type': 'int'
2213                                                 },
2214                                                 {
2215                                                     'name': 'developer_id_role',
2216                                                     'type': 'string'
2217                                                 },
2218                                                 {
2219                                                     'name': 'developer_id_active',
2220                                                     'type': 'int'
2221                                                 },
2222                                                 {
2223                                                     'name': 'developer_id_remarks',
2224                                                     'type': 'string'
2225                                                 },
2226                                                 {
2227                                                     'name': 'developer_id_passwd',
2228                                                     'type': 'string'
2229                                                 },
2230                                                 {
2231                                                     'name': 'developer_id_owner_id',
2232                                                     'type': 'int'
2233                                                 },
2234                                                 {
2235                                                     'name': 'developer_id_lang',
2236                                                     'type': 'string'
2237                                                 },
2238                                                 {
2239                                                     'name': 'developer_id_no_reset_sent',
2240                                                     'type': 'int'
2241                                                 },
2242                                                 {
2243                                                     'name': 'developer_id_action_type',
2244                                                     'type': 'string'
2245                                                 },
2246                                                 {
2247                                                     'name': 'developer_id_project_id',
2248                                                     'type': 'int'
2249                                                 },
2250                                                 {
2251                                                     'name': 'developer_id_deleted_by',
2252                                                     'type': 'int'
2253                                                 },
2254                                                 {
2255                                                     'name': 'developer_id_deleted_dt',
2256                                                     'type': 'date'
2257                                                 },
2258                                                 {
2259                                                     'name': 'priority_id_id',
2260                                                     'type': 'int'
2261                                                 },
2262                                                 {
2263                                                     'name': 'priority_id_etype',
2264                                                     'type': 'string'
2265                                                 },
2266                                                 {
2267                                                     'name': 'priority_id_name',
2268                                                     'type': 'string'
2269                                                 },
2270                                                 {
2271                                                     'name': 'priority_id_active',
2272                                                     'type': 'int'
2273                                                 },
2274                                                 {
2275                                                     'name': 'priority_id_seqid',
2276                                                     'type': 'int'
2277                                                 },
2278                                                 {
2279                                                     'name': 'severity_id_id',
2280                                                     'type': 'int'
2281                                                 },
2282                                                 {
2283                                                     'name': 'severity_id_etype',
2284                                                     'type': 'string'
2285                                                 },
2286                                                 {
2287                                                     'name': 'severity_id_name',
2288                                                     'type': 'string'
2289                                                 },
2290                                                 {
2291                                                     'name': 'severity_id_active',
2292                                                     'type': 'int'
2293                                                 },
2294                                                 {
2295                                                     'name': 'severity_id_seqid',
2296                                                     'type': 'int'
2297                                                 },
2298                                                 {
2299                                                     'name': 'classification_id_id',
2300                                                     'type': 'int'
2301                                                 },
2302                                                 {
2303                                                     'name': 'classification_id_etype',
2304                                                     'type': 'string'
2305                                                 },
2306                                                 {
2307                                                     'name': 'classification_id_name',
2308                                                     'type': 'string'
2309                                                 },
2310                                                 {
2311                                                     'name': 'classification_id_active',
2312                                                     'type': 'int'
2313                                                 },
2314                                                 {
2315                                                     'name': 'classification_id_seqid',
2316                                                     'type': 'int'
2317                                                 },
2318                                                 {
2319                                                     'name': 'resolution_id_id',
2320                                                     'type': 'int'
2321                                                 },
2322                                                 {
2323                                                     'name': 'resolution_id_etype',
2324                                                     'type': 'string'
2325                                                 },
2326                                                 {
2327                                                     'name': 'resolution_id_name',
2328                                                     'type': 'string'
2329                                                 },
2330                                                 {
2331                                                     'name': 'resolution_id_active',
2332                                                     'type': 'int'
2333                                                 },
2334                                                 {
2335                                                     'name': 'resolution_id_seqid',
2336                                                     'type': 'int'
2337                                                 },
2338                                                 {
2339                                                     'name': 'status_id',
2340                                                     'type': 'int'
2341                                                 },
2342                                                 {
2343                                                     'name': 'status_etype',
2344                                                     'type': 'string'
2345                                                 },
2346                                                 {
2347                                                     'name': 'status_name',
2348                                                     'type': 'string'
2349                                                 },
2350                                                 {
2351                                                     'name': 'status_active',
2352                                                     'type': 'int'
2353                                                 },
2354                                                 {
2355                                                     'name': 'status_seqid',
2356                                                     'type': 'int'
2357                                                 },
2358                                                 {
2359                                                     'name': 'project_id_id',
2360                                                     'type': 'int'
2361                                                 },
2362                                                 {
2363                                                     'name': 'project_id_name',
2364                                                     'type': 'string'
2365                                                 },
2366                                                 {
2367                                                     'name': 'project_id_remarks',
2368                                                     'type': 'string'
2369                                                 },
2370                                                 {
2371                                                     'name': 'project_id_owner_id',
2372                                                     'type': 'int'
2373                                                 },
2374                                                 {
2375                                                     'name': 'project_id_code',
2376                                                     'type': 'string'
2377                                                 },
2378                                                 {
2379                                                     'name': 'project_id_active',
2380                                                     'type': 'int'
2381                                                 },
2382                                                 {
2383                                                     'name': 'project_id_type',
2384                                                     'type': 'string'
2385                                                 },
2386                                                 {
2387                                                     'name': 'project_id_client_id',
2388                                                     'type': 'int'
2389                                                 },
2390                                                 {
2391                                                     'name': 'project_id_team_id',
2392                                                     'type': 'int'
2393                                                 },
2394                                                 {
2395                                                     'name': 'project_id_file_location',
2396                                                     'type': 'string'
2397                                                 },
2398                                                 {
2399                                                     'name': 'project_id_open_date',
2400                                                     'type': 'date'
2401                                                 },
2402                                                 {
2403                                                     'name': 'project_id_open_by',
2404                                                     'type': 'int'
2405                                                 },
2406                                                 {
2407                                                     'name': 'project_id_close_date',
2408                                                     'type': 'date'
2409                                                 },
2410                                                 {
2411                                                     'name': 'project_id_countries',
2412                                                     'type': 'string'
2413                                                 },
2414                                                 {
2415                                                     'name': 'project_id_languages',
2416                                                     'type': 'string'
2417                                                 },
2418                                                 {
2419                                                     'name': 'project_id_agency_id',
2420                                                     'type': 'int'
2421                                                 },
2422                                                 {
2423                                                     'name': 'milestone_id_id',
2424                                                     'type': 'int'
2425                                                 },
2426                                                 {
2427                                                     'name': 'milestone_id_name',
2428                                                     'type': 'string'
2429                                                 },
2430                                                 {
2431                                                     'name': 'milestone_id_description',
2432                                                     'type': 'string'
2433                                                 },
2434                                                 {
2435                                                     'name': 'milestone_id_startdate',
2436                                                     'type': 'date'
2437                                                 },
2438                                                 {
2439                                                     'name': 'milestone_id_duedate',
2440                                                     'type': 'date'
2441                                                 },
2442                                                 {
2443                                                     'name': 'milestone_id_completed',
2444                                                     'type': 'date'
2445                                                 },
2446                                                 {
2447                                                     'name': 'milestone_id_deleted',
2448                                                     'type': 'int'
2449                                                 },
2450                                                 {
2451                                                     'name': 'milestone_id_created',
2452                                                     'type': 'int'
2453                                                 },
2454                                                 {
2455                                                     'name': 'milestone_id_updated',
2456                                                     'type': 'int'
2457                                                 },
2458                                                 {
2459                                                     'name': 'milestone_id_project_id',
2460                                                     'type': 'int'
2461                                                 }
2462                                             ]
2463                                         }
2464                                     },
2465                                     colModel : [
2466                                         {
2467                                             xtype: 'ColumnModel',
2468                                             xns: Roo.grid,
2469                                             header : 'Summary',
2470                                             width : 200,
2471                                             dataIndex : 'summary',
2472                                             renderer : function(v) { return String.format('{0}', v); }
2473                                         }
2474                                     ]
2475                                 }
2476                             }
2477                         ],
2478                         west : {
2479                             xtype: 'LayoutRegion',
2480                             xns: Roo,
2481                             title : "Open Tasks (Unassigned) / Select Project",
2482                             width : 450
2483                         },
2484                         center : {
2485                             xtype: 'LayoutRegion',
2486                             xns: Roo,
2487                             title : "Assigned to  / Prioritized (all projects)"
2488                         }
2489                     }
2490                 }
2491             ],
2492             center : {
2493                 xtype: 'LayoutRegion',
2494                 xns: Roo,
2495                 tabPosition : 'top'
2496             }
2497         });
2498     }
2499 };