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                                                 allowBlank : 'false',
1326                                                 displayField : '',
1327                                                 editable : 'false',
1328                                                 emptyText : "Select Project",
1329                                                 fieldLabel : 'mtrack_ticket',
1330                                                 forceSelection : true,
1331                                                 hiddenName : '',
1332                                                 listWidth : 400,
1333                                                 loadingText : "Searching...",
1334                                                 minChars : 2,
1335                                                 name : '',
1336                                                 pageSize : 20,
1337                                                 qtip : "Select mtrack_ticket",
1338                                                 queryParam : '',
1339                                                 selectOnFocus : true,
1340                                                 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
1341                                                 triggerAction : 'all',
1342                                                 typeAhead : true,
1343                                                 valueField : 'id',
1344                                                 width : 300,
1345                                                 store : {
1346                                                     xtype: 'Store',
1347                                                     xns: Roo.data,
1348                                                     remoteSort : true,
1349                                                     sortInfo : { direction : 'ASC', field: 'id' },
1350                                                     listeners : {
1351                                                         beforeload : function (_self, o){
1352                                                             o.params = o.params || {};
1353                                                             // set more here
1354                                                         }
1355                                                     },
1356                                                     proxy : {
1357                                                         xtype: 'HttpProxy',
1358                                                         xns: Roo.data,
1359                                                         method : 'GET',
1360                                                         url : baseURL + '/Roo/mtrack_ticket.php'
1361                                                     },
1362                                                     reader : {
1363                                                         xtype: 'JsonReader',
1364                                                         xns: Roo.data,
1365                                                         id : 'id',
1366                                                         root : 'data',
1367                                                         totalProperty : 'total',
1368                                                         fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}]
1369                                                     }
1370                                                 }
1371                                             }
1372                                         ]
1373                                     },
1374                                     dataSource : {
1375                                         xtype: 'Store',
1376                                         xns: Roo.data,
1377                                         remoteSort : true,
1378                                         sortInfo : { field : 'summary', direction: 'ASC' },
1379                                         proxy : {
1380                                             xtype: 'HttpProxy',
1381                                             xns: Roo.data,
1382                                             method : 'GET',
1383                                             url : baseURL + '/Roo/mtrack_ticket.php'
1384                                         },
1385                                         reader : {
1386                                             xtype: 'JsonReader',
1387                                             xns: Roo.data,
1388                                             totalProperty : 'total',
1389                                             root : 'data',
1390                                             id : 'id',
1391                                             fields : [
1392                                                 {
1393                                                     'name': 'id',
1394                                                     'type': 'int'
1395                                                 },
1396                                                 {
1397                                                     'name': 'project_id',
1398                                                     'type': 'int'
1399                                                 },
1400                                                 {
1401                                                     'name': 'summary',
1402                                                     'type': 'string'
1403                                                 },
1404                                                 {
1405                                                     'name': 'description',
1406                                                     'type': 'string'
1407                                                 },
1408                                                 {
1409                                                     'name': 'changelog',
1410                                                     'type': 'string'
1411                                                 },
1412                                                 {
1413                                                     'name': 'created',
1414                                                     'type': 'int'
1415                                                 },
1416                                                 {
1417                                                     'name': 'updated',
1418                                                     'type': 'int'
1419                                                 },
1420                                                 {
1421                                                     'name': 'owner_id',
1422                                                     'type': 'int'
1423                                                 },
1424                                                 {
1425                                                     'name': 'priority_id',
1426                                                     'type': 'int'
1427                                                 },
1428                                                 {
1429                                                     'name': 'severity_id',
1430                                                     'type': 'int'
1431                                                 },
1432                                                 {
1433                                                     'name': 'classification_id',
1434                                                     'type': 'int'
1435                                                 },
1436                                                 {
1437                                                     'name': 'resolution_id',
1438                                                     'type': 'int'
1439                                                 },
1440                                                 {
1441                                                     'name': 'cc',
1442                                                     'type': 'string'
1443                                                 },
1444                                                 {
1445                                                     'name': 'status',
1446                                                     'type': 'int'
1447                                                 },
1448                                                 {
1449                                                     'name': 'estimated',
1450                                                     'type': 'float'
1451                                                 },
1452                                                 {
1453                                                     'name': 'spent',
1454                                                     'type': 'float'
1455                                                 },
1456                                                 {
1457                                                     'name': 'x_fieldname',
1458                                                     'type': 'string'
1459                                                 },
1460                                                 {
1461                                                     'name': 'developer_id',
1462                                                     'type': 'int'
1463                                                 },
1464                                                 {
1465                                                     'name': 'milestone_id',
1466                                                     'type': 'int'
1467                                                 },
1468                                                 {
1469                                                     'name': 'updated_id',
1470                                                     'type': 'int'
1471                                                 },
1472                                                 {
1473                                                     'name': 'updated_person_id',
1474                                                     'type': 'int'
1475                                                 },
1476                                                 {
1477                                                     'name': 'updated_ontable',
1478                                                     'type': 'string'
1479                                                 },
1480                                                 {
1481                                                     'name': 'updated_onid',
1482                                                     'type': 'int'
1483                                                 },
1484                                                 {
1485                                                     'name': 'updated_changedate',
1486                                                     'type': 'date'
1487                                                 },
1488                                                 {
1489                                                     'name': 'updated_reason',
1490                                                     'type': 'string'
1491                                                 },
1492                                                 {
1493                                                     'name': 'created_id',
1494                                                     'type': 'int'
1495                                                 },
1496                                                 {
1497                                                     'name': 'created_person_id',
1498                                                     'type': 'int'
1499                                                 },
1500                                                 {
1501                                                     'name': 'created_ontable',
1502                                                     'type': 'string'
1503                                                 },
1504                                                 {
1505                                                     'name': 'created_onid',
1506                                                     'type': 'int'
1507                                                 },
1508                                                 {
1509                                                     'name': 'created_changedate',
1510                                                     'type': 'date'
1511                                                 },
1512                                                 {
1513                                                     'name': 'created_reason',
1514                                                     'type': 'string'
1515                                                 },
1516                                                 {
1517                                                     'name': 'owner_id_id',
1518                                                     'type': 'int'
1519                                                 },
1520                                                 {
1521                                                     'name': 'owner_id_office_id',
1522                                                     'type': 'int'
1523                                                 },
1524                                                 {
1525                                                     'name': 'owner_id_name',
1526                                                     'type': 'string'
1527                                                 },
1528                                                 {
1529                                                     'name': 'owner_id_phone',
1530                                                     'type': 'string'
1531                                                 },
1532                                                 {
1533                                                     'name': 'owner_id_fax',
1534                                                     'type': 'string'
1535                                                 },
1536                                                 {
1537                                                     'name': 'owner_id_email',
1538                                                     'type': 'string'
1539                                                 },
1540                                                 {
1541                                                     'name': 'owner_id_company_id',
1542                                                     'type': 'int'
1543                                                 },
1544                                                 {
1545                                                     'name': 'owner_id_role',
1546                                                     'type': 'string'
1547                                                 },
1548                                                 {
1549                                                     'name': 'owner_id_active',
1550                                                     'type': 'int'
1551                                                 },
1552                                                 {
1553                                                     'name': 'owner_id_remarks',
1554                                                     'type': 'string'
1555                                                 },
1556                                                 {
1557                                                     'name': 'owner_id_passwd',
1558                                                     'type': 'string'
1559                                                 },
1560                                                 {
1561                                                     'name': 'owner_id_owner_id',
1562                                                     'type': 'int'
1563                                                 },
1564                                                 {
1565                                                     'name': 'owner_id_lang',
1566                                                     'type': 'string'
1567                                                 },
1568                                                 {
1569                                                     'name': 'owner_id_no_reset_sent',
1570                                                     'type': 'int'
1571                                                 },
1572                                                 {
1573                                                     'name': 'owner_id_action_type',
1574                                                     'type': 'string'
1575                                                 },
1576                                                 {
1577                                                     'name': 'owner_id_project_id',
1578                                                     'type': 'int'
1579                                                 },
1580                                                 {
1581                                                     'name': 'owner_id_deleted_by',
1582                                                     'type': 'int'
1583                                                 },
1584                                                 {
1585                                                     'name': 'owner_id_deleted_dt',
1586                                                     'type': 'date'
1587                                                 },
1588                                                 {
1589                                                     'name': 'developer_id_id',
1590                                                     'type': 'int'
1591                                                 },
1592                                                 {
1593                                                     'name': 'developer_id_office_id',
1594                                                     'type': 'int'
1595                                                 },
1596                                                 {
1597                                                     'name': 'developer_id_name',
1598                                                     'type': 'string'
1599                                                 },
1600                                                 {
1601                                                     'name': 'developer_id_phone',
1602                                                     'type': 'string'
1603                                                 },
1604                                                 {
1605                                                     'name': 'developer_id_fax',
1606                                                     'type': 'string'
1607                                                 },
1608                                                 {
1609                                                     'name': 'developer_id_email',
1610                                                     'type': 'string'
1611                                                 },
1612                                                 {
1613                                                     'name': 'developer_id_company_id',
1614                                                     'type': 'int'
1615                                                 },
1616                                                 {
1617                                                     'name': 'developer_id_role',
1618                                                     'type': 'string'
1619                                                 },
1620                                                 {
1621                                                     'name': 'developer_id_active',
1622                                                     'type': 'int'
1623                                                 },
1624                                                 {
1625                                                     'name': 'developer_id_remarks',
1626                                                     'type': 'string'
1627                                                 },
1628                                                 {
1629                                                     'name': 'developer_id_passwd',
1630                                                     'type': 'string'
1631                                                 },
1632                                                 {
1633                                                     'name': 'developer_id_owner_id',
1634                                                     'type': 'int'
1635                                                 },
1636                                                 {
1637                                                     'name': 'developer_id_lang',
1638                                                     'type': 'string'
1639                                                 },
1640                                                 {
1641                                                     'name': 'developer_id_no_reset_sent',
1642                                                     'type': 'int'
1643                                                 },
1644                                                 {
1645                                                     'name': 'developer_id_action_type',
1646                                                     'type': 'string'
1647                                                 },
1648                                                 {
1649                                                     'name': 'developer_id_project_id',
1650                                                     'type': 'int'
1651                                                 },
1652                                                 {
1653                                                     'name': 'developer_id_deleted_by',
1654                                                     'type': 'int'
1655                                                 },
1656                                                 {
1657                                                     'name': 'developer_id_deleted_dt',
1658                                                     'type': 'date'
1659                                                 },
1660                                                 {
1661                                                     'name': 'priority_id_id',
1662                                                     'type': 'int'
1663                                                 },
1664                                                 {
1665                                                     'name': 'priority_id_etype',
1666                                                     'type': 'string'
1667                                                 },
1668                                                 {
1669                                                     'name': 'priority_id_name',
1670                                                     'type': 'string'
1671                                                 },
1672                                                 {
1673                                                     'name': 'priority_id_active',
1674                                                     'type': 'int'
1675                                                 },
1676                                                 {
1677                                                     'name': 'priority_id_seqid',
1678                                                     'type': 'int'
1679                                                 },
1680                                                 {
1681                                                     'name': 'severity_id_id',
1682                                                     'type': 'int'
1683                                                 },
1684                                                 {
1685                                                     'name': 'severity_id_etype',
1686                                                     'type': 'string'
1687                                                 },
1688                                                 {
1689                                                     'name': 'severity_id_name',
1690                                                     'type': 'string'
1691                                                 },
1692                                                 {
1693                                                     'name': 'severity_id_active',
1694                                                     'type': 'int'
1695                                                 },
1696                                                 {
1697                                                     'name': 'severity_id_seqid',
1698                                                     'type': 'int'
1699                                                 },
1700                                                 {
1701                                                     'name': 'classification_id_id',
1702                                                     'type': 'int'
1703                                                 },
1704                                                 {
1705                                                     'name': 'classification_id_etype',
1706                                                     'type': 'string'
1707                                                 },
1708                                                 {
1709                                                     'name': 'classification_id_name',
1710                                                     'type': 'string'
1711                                                 },
1712                                                 {
1713                                                     'name': 'classification_id_active',
1714                                                     'type': 'int'
1715                                                 },
1716                                                 {
1717                                                     'name': 'classification_id_seqid',
1718                                                     'type': 'int'
1719                                                 },
1720                                                 {
1721                                                     'name': 'resolution_id_id',
1722                                                     'type': 'int'
1723                                                 },
1724                                                 {
1725                                                     'name': 'resolution_id_etype',
1726                                                     'type': 'string'
1727                                                 },
1728                                                 {
1729                                                     'name': 'resolution_id_name',
1730                                                     'type': 'string'
1731                                                 },
1732                                                 {
1733                                                     'name': 'resolution_id_active',
1734                                                     'type': 'int'
1735                                                 },
1736                                                 {
1737                                                     'name': 'resolution_id_seqid',
1738                                                     'type': 'int'
1739                                                 },
1740                                                 {
1741                                                     'name': 'status_id',
1742                                                     'type': 'int'
1743                                                 },
1744                                                 {
1745                                                     'name': 'status_etype',
1746                                                     'type': 'string'
1747                                                 },
1748                                                 {
1749                                                     'name': 'status_name',
1750                                                     'type': 'string'
1751                                                 },
1752                                                 {
1753                                                     'name': 'status_active',
1754                                                     'type': 'int'
1755                                                 },
1756                                                 {
1757                                                     'name': 'status_seqid',
1758                                                     'type': 'int'
1759                                                 },
1760                                                 {
1761                                                     'name': 'project_id_id',
1762                                                     'type': 'int'
1763                                                 },
1764                                                 {
1765                                                     'name': 'project_id_name',
1766                                                     'type': 'string'
1767                                                 },
1768                                                 {
1769                                                     'name': 'project_id_remarks',
1770                                                     'type': 'string'
1771                                                 },
1772                                                 {
1773                                                     'name': 'project_id_owner_id',
1774                                                     'type': 'int'
1775                                                 },
1776                                                 {
1777                                                     'name': 'project_id_code',
1778                                                     'type': 'string'
1779                                                 },
1780                                                 {
1781                                                     'name': 'project_id_active',
1782                                                     'type': 'int'
1783                                                 },
1784                                                 {
1785                                                     'name': 'project_id_type',
1786                                                     'type': 'string'
1787                                                 },
1788                                                 {
1789                                                     'name': 'project_id_client_id',
1790                                                     'type': 'int'
1791                                                 },
1792                                                 {
1793                                                     'name': 'project_id_team_id',
1794                                                     'type': 'int'
1795                                                 },
1796                                                 {
1797                                                     'name': 'project_id_file_location',
1798                                                     'type': 'string'
1799                                                 },
1800                                                 {
1801                                                     'name': 'project_id_open_date',
1802                                                     'type': 'date'
1803                                                 },
1804                                                 {
1805                                                     'name': 'project_id_open_by',
1806                                                     'type': 'int'
1807                                                 },
1808                                                 {
1809                                                     'name': 'project_id_close_date',
1810                                                     'type': 'date'
1811                                                 },
1812                                                 {
1813                                                     'name': 'project_id_countries',
1814                                                     'type': 'string'
1815                                                 },
1816                                                 {
1817                                                     'name': 'project_id_languages',
1818                                                     'type': 'string'
1819                                                 },
1820                                                 {
1821                                                     'name': 'project_id_agency_id',
1822                                                     'type': 'int'
1823                                                 },
1824                                                 {
1825                                                     'name': 'milestone_id_id',
1826                                                     'type': 'int'
1827                                                 },
1828                                                 {
1829                                                     'name': 'milestone_id_name',
1830                                                     'type': 'string'
1831                                                 },
1832                                                 {
1833                                                     'name': 'milestone_id_description',
1834                                                     'type': 'string'
1835                                                 },
1836                                                 {
1837                                                     'name': 'milestone_id_startdate',
1838                                                     'type': 'date'
1839                                                 },
1840                                                 {
1841                                                     'name': 'milestone_id_duedate',
1842                                                     'type': 'date'
1843                                                 },
1844                                                 {
1845                                                     'name': 'milestone_id_completed',
1846                                                     'type': 'date'
1847                                                 },
1848                                                 {
1849                                                     'name': 'milestone_id_deleted',
1850                                                     'type': 'int'
1851                                                 },
1852                                                 {
1853                                                     'name': 'milestone_id_created',
1854                                                     'type': 'int'
1855                                                 },
1856                                                 {
1857                                                     'name': 'milestone_id_updated',
1858                                                     'type': 'int'
1859                                                 },
1860                                                 {
1861                                                     'name': 'milestone_id_project_id',
1862                                                     'type': 'int'
1863                                                 }
1864                                             ]
1865                                         }
1866                                     },
1867                                     colModel : [
1868                                         {
1869                                             xtype: 'ColumnModel',
1870                                             xns: Roo.grid,
1871                                             header : 'Summary',
1872                                             width : 200,
1873                                             dataIndex : 'summary',
1874                                             renderer : function(v) { return String.format('{0}', v); }
1875                                         },
1876                                         {
1877                                             xtype: 'ColumnModel',
1878                                             xns: Roo.grid,
1879                                             header : 'Status',
1880                                             width : 75,
1881                                             dataIndex : 'status',
1882                                             renderer : function(v) { return String.format('{0}', v); }
1883                                         },
1884                                         {
1885                                             xtype: 'ColumnModel',
1886                                             xns: Roo.grid,
1887                                             header : 'Estimated',
1888                                             width : 75,
1889                                             dataIndex : 'estimated',
1890                                             renderer : function(v) { return String.format('{0}', v); }
1891                                         },
1892                                         {
1893                                             xtype: 'ColumnModel',
1894                                             xns: Roo.grid,
1895                                             header : 'Spent',
1896                                             width : 75,
1897                                             dataIndex : 'spent',
1898                                             renderer : function(v) { return String.format('{0}', v); }
1899                                         },
1900                                         {
1901                                             xtype: 'ColumnModel',
1902                                             xns: Roo.grid,
1903                                             header : 'X fieldname',
1904                                             width : 200,
1905                                             dataIndex : 'x_fieldname',
1906                                             renderer : function(v) { return String.format('{0}', v); }
1907                                         },
1908                                         {
1909                                             xtype: 'ColumnModel',
1910                                             xns: Roo.grid,
1911                                             header : 'Developer',
1912                                             width : 75,
1913                                             dataIndex : 'developer_id',
1914                                             renderer : function(v) { return String.format('{0}', v); }
1915                                         },
1916                                         {
1917                                             xtype: 'ColumnModel',
1918                                             xns: Roo.grid,
1919                                             header : 'Milestone',
1920                                             width : 75,
1921                                             dataIndex : 'milestone_id',
1922                                             renderer : function(v) { return String.format('{0}', v); }
1923                                         }
1924                                     ]
1925                                 }
1926                             }
1927                         ],
1928                         west : {
1929                             xtype: 'LayoutRegion',
1930                             xns: Roo,
1931                             title : "Open Tasks (Unassigned) / Select Project",
1932                             width : 450
1933                         },
1934                         center : {
1935                             xtype: 'LayoutRegion',
1936                             xns: Roo,
1937                             title : "Assigned to  / Prioritized (all projects)"
1938                         }
1939                     }
1940                 }
1941             ],
1942             center : {
1943                 xtype: 'LayoutRegion',
1944                 xns: Roo,
1945                 tabPosition : 'top'
1946             }
1947         });
1948     }
1949 };