php warnings
[Pman.MTrack] / Pman.Dialog.MTrackTime.js
index f0690ba..230ea68 100644 (file)
 
 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
 
+Roo.namespace('Pman.Dialog');
+
 Pman.Dialog.MTrackTime = {
 
-    dialog : false,
-    callback:  false,
+ _strings : {
+  '9a221c25cceeb0d108ff6cb635dc8b8b' :"Open Tasks (Unassigned) / Select Project",
+  '9e727fdd3aec8274f46685441900280d' :"Project",
+  '6a58f977f2b623b695a340766f2a6843' :"Select Project",
+  '74cf22d20dea80f7bd8800a6da89a722' :"Select mtrack_ticket",
+  'c751439d0db3883ac1c8e816327adcab' :"Ticket",
+  '290612199861c31d1036b185b4e69b75' :"Summary",
+  '1fa1f1ccb57b2486b4c05122d64868d4' :"Not on Project work",
+  '6cca3734b44a6ae61b40c9a915d122f4' :"Task Queue",
+  'ed7b9312345d291c1ccf68096e65ca54' :"Ticket Details",
+  '1243daf593fa297e07ab03bf06d925af' :"Searching...",
+  '645fcdd1616f8c7dbb207f6802786431' :"Time Manager",
+  '329a87b3fae81c1c17a185c78d2e0e63' :"cash_invoice_entry",
+  '9deec6a3dfda06500b808d70875f0a8f' :"Log Time",
+  '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person",
+  '340c2ee497b85d5954b01c64de7f44f6' :"Select Person",
+  'f4c6f851b00d5518bf888815de279aba' :"Notes",
+  '24f27bda5dd2c488aa9bc7700ba98c34' :"Select Projects",
+  '07ca5050e697392c9ed47e6453f1453f' :"Completed",
+  'a76d4ef5f3f6a672bbfab2865563e530' :"Time",
+  'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
+  '642f8356fcf65868f037f92e0e10c3cd' :"Plan Time",
+  '9e51cf61fbb08a10c12619611dc818ad' :"Active / Logged Time",
+  '3efbc55730fd4af147b96183d8afbd3b' :"mtrack_ticket",
+  'b2439dea1dd89e6f694df484214e57cf' :"Working on this",
+  'f49f927095bb01b44c96d29c8c09f3a3' :"Assigned to  / Prioritized (all projects)"
+ },
+ _named_strings : {
+  'description_fieldLabel' : 'b5a7adde1af5c87d7fd797b6245c2a39' /* Description */ ,
+  'project_id_name_emptyText' : '6a58f977f2b623b695a340766f2a6843' /* Select Project */ ,
+  'project_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
+  'project_id_name_qtip' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
+  'project_id_name_fieldLabel' : '9e727fdd3aec8274f46685441900280d' /* Project */ 
+ },
 
-    show : function(data, cb)
-    {
-        if (!this.dialog) {
-            this.create();
-        }
+ dialog : false,
+ callback:  false,
 
-        this.callback = cb;
-        this.data = data;
-        this.dialog.show(this.data._el);
-        if (this.form) {
-           this.form.reset();
-           this.form.setValues(data);
-           this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
-        }
+ show : function(data, cb)
+ {
+  if (!this.dialog) {
+   this.create();
+  }
 
-    },
+  this.callback = cb;
+  this.data = data;
+  this.dialog.show(this.data._el);
+  if (this.form) {
+   this.form.reset();
+   this.form.setValues(data);
+   this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
+  }
 
-    create : function()
-    {
-        var _this = this;
-        this.dialog = Roo.factory({
-            xtype: 'LayoutDialog',
-            xns: Roo,
-            height : 700,
-            title : "Time Manager",
-            width : 1000,
-            items : [
-                {
-                    xtype: 'NestedLayoutPanel',
-                    xns: Roo,
-                    region : 'center',
-                    title : "Log Time",
-                    layout : {
-                        xtype: 'BorderLayout',
-                        xns: Roo,
-                        items : [
-                            {
-                                xtype: 'GridPanel',
-                                xns: Roo,
-                                listeners : {
-                                    activate : function() {
-                                        _this.timepanel = this;
-                                        if (_this.timegrid) {
-                                           // _this.grid.footer.onClick('first');
-                                        }
-                                    }
-                                },
-                                background : true,
-                                fitContainer : true,
-                                fitToframe : true,
-                                region : 'center',
-                                tableName : 'cash_invoice_entry',
-                                title : "cash_invoice_entry",
-                                grid : {
-                                    xtype: 'Grid',
-                                    xns: Roo.grid,
-                                    listeners : {
-                                        render : function() 
-                                        {
-                                            _this.timegrid = this; 
-                                            //_this.dialog = Pman.Dialog.FILL_IN
-                                            if (_this.timepanel.active) {
-                                              // this.footer.onClick('first');
-                                            }
-                                        },
-                                        rowdblclick : function (_self, rowIndex, e)
-                                        {
-                                            if (!_this.dialog) return;
-                                            _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
-                                                _this.grid.footer.onClick('first');
-                                            }); 
-                                        }
-                                    },
-                                    autoExpandColumn : 'activity_ref',
-                                    loadMask : true,
-                                    toolbar : {
-                                        xtype: 'Toolbar',
-                                        xns: Roo,
-                                        items : [
-                                            {
-                                                xtype: 'ComboBox',
-                                                xns: Roo.form,
-                                                allowBlank : 'false',
-                                                editable : 'false',
-                                                emptyText : "Select Person",
-                                                forceSelection : true,
-                                                listWidth : 400,
-                                                loadingText : "Searching...",
-                                                minChars : 2,
-                                                pageSize : 20,
-                                                qtip : "Select Person",
-                                                selectOnFocus : true,
-                                                triggerAction : 'all',
-                                                typeAhead : true,
-                                                width : 300,
-                                                tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
-                                                queryParam : '',
-                                                fieldLabel : 'Person',
-                                                valueField : 'id',
-                                                displayField : '',
-                                                hiddenName : '',
-                                                name : '',
-                                                store : {
-                                                    xtype: 'Store',
-                                                    xns: Roo.data,
-                                                    remoteSort : true,
-                                                    sortInfo : { direction : 'ASC', field: 'id' },
-                                                    listeners : {
-                                                        beforeload : function (_self, o){
-                                                            o.params = o.params || {};
-                                                            // set more here
-                                                        }
-                                                    },
-                                                    proxy : {
-                                                        xtype: 'HttpProxy',
-                                                        xns: Roo.data,
-                                                        method : 'GET',
-                                                        url : baseURL + '/Roo/Person.php'
-                                                    },
-                                                    reader : {
-                                                        xtype: 'JsonReader',
-                                                        xns: Roo.data,
-                                                        id : 'id',
-                                                        root : 'data',
-                                                        totalProperty : 'total',
-                                                        fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
-                                                    }
-                                                }
-                                            }
-                                        ]
-                                    },
-                                    dataSource : {
-                                        xtype: 'Store',
-                                        xns: Roo.data,
-                                        remoteSort : true,
-                                        sortInfo : { field : 'description', direction: 'ASC' },
-                                        proxy : {
-                                            xtype: 'HttpProxy',
-                                            xns: Roo.data,
-                                            method : 'GET',
-                                            url : baseURL + '/Roo/cash_invoice_entry.php'
-                                        },
-                                        reader : {
-                                            xtype: 'JsonReader',
-                                            xns: Roo.data,
-                                            totalProperty : 'total',
-                                            root : 'data',
-                                            id : 'id',
-                                            fields : [
-                                                {
-                                                    'name': 'id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'entry_dt',
-                                                    'type': 'date',
-                                                    'dateFormat': 'Y-m-d'
-                                                },
-                                                {
-                                                    'name': 'entered_dt',
-                                                    'type': 'date',
-                                                    'dateFormat': 'Y-m-d'
-                                                },
-                                                {
-                                                    'name': 'description',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'action',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'qty',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'invoice_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'pricevalue',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'qtyvalue',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'to_account_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'discount',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'action_dt',
-                                                    'type': 'date',
-                                                    'dateFormat': 'Y-m-d'
-                                                },
-                                                {
-                                                    'name': 'staff_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_idtxt',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_opened_dt',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_posted',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_post_transaction_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_post_account_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_paid',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_total',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'invoice_id_duedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_commodity',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_scu',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_description',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_parent',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'to_account_id_fullname',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_office_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_phone',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_fax',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_email',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_company_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_role',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_passwd',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_lang',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_no_reset_sent',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_action_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'staff_id_project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_deleted_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'staff_id_deleted_dt',
-                                                    'type': 'date'
-                                                }
-                                            ]
-                                        }
-                                    },
-                                    colModel : [
-                                        {
-                                            xtype: 'ColumnModel',
-                                            xns: Roo.grid,
-                                            dataIndex : 'hour',
-                                            header : 'Hour',
-                                            width : 50,
-                                            renderer : function(v) { return String.format('{0}', v); }
-                                        },
-                                        {
-                                            xtype: 'ColumnModel',
-                                            xns: Roo.grid,
-                                            dataIndex : 'activity_ref',
-                                            header : 'Activity',
-                                            width : 300,
-                                            renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
-                                        },
-                                        {
-                                            xtype: 'ColumnModel',
-                                            xns: Roo.grid,
-                                            dataIndex : 'entered_dt',
-                                            header : 'Timesheet',
-                                            width : 300,
-                                            renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
-                                        }
-                                    ]
-                                }
-                            },
-                            {
-                                xtype: 'NestedLayoutPanel',
-                                xns: Roo,
-                                region : 'center',
-                                layout : {
-                                    xtype: 'BorderLayout',
-                                    xns: Roo,
-                                    items : [
-                                        {
-                                            xtype: 'GridPanel',
-                                            xns: Roo,
-                                            listeners : {
-                                                activate : function() {
-                                                    _this.queuepanel = this;
-                                                    if (_this.queuegrid) {
-                                                        //_this.queuegrid.footer.onClick('first');
-                                                    }
-                                                }
-                                            },
-                                            background : true,
-                                            fitContainer : true,
-                                            fitToframe : true,
-                                            region : 'center',
-                                            tableName : 'mtrack_ticket',
-                                            title : "mtrack_ticket",
-                                            grid : {
-                                                xtype: 'Grid',
-                                                xns: Roo.grid,
-                                                listeners : {
-                                                    render : function() 
-                                                    {
-                                                        _this.queuegrid = this; 
-                                                        //_this.dialog = Pman.Dialog.FILL_IN
-                                                        if (_this.queuepanel.active) {
-                                                           //this.footer.onClick('first');
-                                                        }
-                                                    },
-                                                    rowdblclick : function (_self, rowIndex, e)
-                                                    {
-                                                        if (!_this.dialog) return;
-                                                        _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
-                                                            _this.grid.footer.onClick('first');
-                                                        }); 
-                                                    }
-                                                },
-                                                autoExpandColumn : 'summary',
-                                                loadMask : true,
-                                                dataSource : {
-                                                    xtype: 'Store',
-                                                    xns: Roo.data,
-                                                    remoteSort : true,
-                                                    sortInfo : { field : 'summary', direction: 'ASC' },
-                                                    proxy : {
-                                                        xtype: 'HttpProxy',
-                                                        xns: Roo.data,
-                                                        method : 'GET',
-                                                        url : baseURL + '/Roo/mtrack_ticket.php'
-                                                    },
-                                                    reader : {
-                                                        xtype: 'JsonReader',
-                                                        xns: Roo.data,
-                                                        totalProperty : 'total',
-                                                        root : 'data',
-                                                        id : 'id',
-                                                        fields : [
-                                                            {
-                                                                'name': 'id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'summary',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'description',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'changelog',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'created',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'updated',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'priority_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'severity_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'classification_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'resolution_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'cc',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'status',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'estimated',
-                                                                'type': 'float'
-                                                            },
-                                                            {
-                                                                'name': 'spent',
-                                                                'type': 'float'
-                                                            },
-                                                            {
-                                                                'name': 'x_fieldname',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'updated_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'updated_person_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'updated_ontable',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'updated_onid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'updated_changedate',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'updated_reason',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'created_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'created_person_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'created_ontable',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'created_onid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'created_changedate',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'created_reason',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_office_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_phone',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_fax',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_email',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_company_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_role',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_remarks',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_passwd',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_owner_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_lang',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_no_reset_sent',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_action_type',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_project_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_deleted_by',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'owner_id_deleted_dt',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_office_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_phone',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_fax',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_email',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_company_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_role',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_remarks',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_passwd',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_owner_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_lang',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_no_reset_sent',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_action_type',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_project_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_deleted_by',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'developer_id_deleted_dt',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'priority_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'priority_id_etype',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'priority_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'priority_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'priority_id_seqid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'severity_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'severity_id_etype',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'severity_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'severity_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'severity_id_seqid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'classification_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'classification_id_etype',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'classification_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'classification_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'classification_id_seqid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'resolution_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'resolution_id_etype',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'resolution_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'resolution_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'resolution_id_seqid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'status_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'status_etype',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'status_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'status_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'status_seqid',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_remarks',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_owner_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_code',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_active',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_type',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_client_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_team_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_file_location',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_open_date',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_open_by',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_close_date',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_countries',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_languages',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'project_id_agency_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_id',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_name',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_description',
-                                                                'type': 'string'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_startdate',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_duedate',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_completed',
-                                                                'type': 'date'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_deleted',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_created',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_updated',
-                                                                'type': 'int'
-                                                            },
-                                                            {
-                                                                'name': 'milestone_id_project_id',
-                                                                'type': 'int'
-                                                            }
-                                                        ]
-                                                    }
-                                                },
-                                                colModel : [
-                                                    {
-                                                        xtype: 'ColumnModel',
-                                                        xns: Roo.grid,
-                                                        header : 'Summary',
-                                                        width : 200,
-                                                        dataIndex : 'summary',
-                                                        renderer : function(v) { return String.format('{0}', v); }
-                                                    }
-                                                ]
-                                            }
-                                        },
-                                        {
-                                            xtype: 'ContentPanel',
-                                            xns: Roo,
-                                            region : 'north',
-                                            items : [
-                                                {
-                                                    xtype: 'Form',
-                                                    xns: Roo.form,
-                                                    listeners : {
-                                                        actioncomplete : function(_self,action)
-                                                        {
-                                                            
-                                                         
-                                                            Roo.log('action complete');
-                                                            Roo .log(action);
-                                                            if (action.type == 'setdata') {
-                                                        
-                                                                _this.isClose = false; // force flag..
-                                                                
-                                                                if (this.activeRecord) {
-                                                                     this.saveActive( this.activeRecord);
-                                                                }
-                                                                
-                                                                
-                                                                 
-                                                                // show form..
-                                                                if (!action.data || !action.data.action) {
-                                                                    _this.form.el.mask('select something'); 
-                                                                    this.activeRecord  = false;
-                                                                    _this.form.reset(); 
-                                                                    return;
-                                                                }
-                                                                _this.form.el.unmask();   
-                                                                
-                                                                this.activeRecord = action.rec;
-                                                                 
-                                                                
-                                                        
-                                                                    
-                                                                
-                                                                // should save here if we are 'dirty!';
-                                                                _this.form.reset();
-                                                                _this.form.setValues(action.data);
-                                                                // set the dates so they are correct..
-                                                                 _this.form.setValues( { 
-                                                         
-                                                                        action_dt : action.data.action_dt.format('Y-m-d H:i:s'),
-                                                                        entry_dt: action.data.action_dt.format('Y-m-d'),
-                                                                        qtyvalue2 : action.data.qtyvalue
-                                                                    });
-                                                                // set the default values..
-                                                                // for dirty test...
-                                                                _this.form.items.each(function(f) {
-                                                                    f.originalValue = f.getValue();
-                                                                });
-                                                                
-                                                                
-                                                                
-                                                                
-                                                                // form is set to an event.
-                                                                
-                                                                        
-                                                                
-                                                               return;
-                                                            }
-                                                            
-                                                            
-                                                            if (action.type == 'load') {
-                                                         
-                                                                return;
-                                                            }
-                                                            if (action.type =='submit') {
-                                                                // set this on the close button..
-                                                                 if (_this.isClose) {
-                                                                    _this.dialog.hide();
-                                                                 }
-                                                                
-                                                                 if (_this.callback) {
-                                                                    _this.callback.call(_this, _this.form.getValues());
-                                                                 }
-                                                        
-                                                                 return;
-                                                            }
-                                                        },
-                                                        rendered : function (form)
-                                                        {
-                                                            _this.form= form;
-                                                        }
-                                                    },
-                                                    activeData : false,
-                                                    method : 'POST',
-                                                    style : 'margin-left:10px;',
-                                                    saveActive : function(rec, effort) {
-                                                        
-                                                         effort = effort || 0;
-                                                        
-                                                    
-                                                        if (!rec) {
-                                                            Roo.log("ERROR: saveActive: record not set ");
-                                                            return;
-                                                        }
-                                                    
-                                                         var d = Roo.apply({}, rec.data); // copy it so changes do not affect crap...
-                                                         
-                                                         var upd = (new Date()).format('Y-m-d H:i:s');
-                                                         
-                                                     
-                                                         
-                                                         
-                                                         //Roo.log("SAVE IT: " + Roo.encode(d) );
-                                                         
-                                                         //     return;
-                                                         var at = typeof(d.action_dt) == 'string' ? Date.parseDate(d.action_dt, 'Y-m-d H:i:s') : d.action_dt
-                                                         
-                                                         new Pman.Request({
-                                                            url : baseURL + '/Roo/Cash_invoice_entry.php',
-                                                            method : 'POST',
-                                                            params : {
-                                                                id : d.id,
-                                                                entry_dt: at.format('Y-m-d'),  // this should not change for posted entries really...
-                                                                entered_dt: upd,            
-                                                                action_dt : at.format('Y-m-d H:i:s'),
-                                                                qtyvalue : d.qtyvalue,
-                                                                action: 'Hours',
-                                                                description: d.description,
-                                                                pricevalue: d.pricevalue,  
-                                                                project_id : d.project_id,
-                                                                staff_id : d.staff_id * 1 ? d.staff_id : Pman.Login.authUser.id,
-                                                                ticket_id : d.ticket_id ? d.ticket_id : 0
-                                                                
-                                                            },
-                                                            success : function(res)
-                                                            {
-                                                                // everythings fine..
-                                                                
-                                                                // we have to update the view object... now...
-                                                                // we can not reload as that may blank out data..
-                                                                if (!rec.data.id) {
-                                                                    Roo.log("Setting data id to " + res.data.id);
-                                                                    rec.set('id', res.data.id);
-                                                    
-                                                                }
-                                                    
-                                                                
-                                                            },
-                                                            failure : function()
-                                                            {
-                                                                effort++;
-                                                                if (effort > 3) {
-                                                                    Roo.MessageBox.alert("Error", "Saving timesheet failed");
-                                                                    return;
-                                                                }
-                                                                _this.form.saveActive(rec, effort);
-                                                            }
-                                                            
-                                                         });
-                                                    },
-                                                    url : baseURL + '/Roo/cash_invoice_entry.php',
-                                                    items : [
-                                                        {
-                                                            xtype: 'ComboBox',
-                                                            xns: Roo.form,
-                                                            listeners : {
-                                                                render : function (_self)
-                                                                {
-                                                                    _this.projectSel = _self;
-                                                                },
-                                                                beforeselect : function (combo, record, index)
-                                                                {
-                                                                
-                                                                    Roo.log('save it');
-                                                                    var sel = _this.grid.ds.selectedBar();
-                                                                 
-                                                                    if (!sel) {
-                                                                        Roo.log("nothing selected?");
-                                                                        return;
-                                                                    }
-                                                                     
-                                                                    // active record should be the same thing.
-                                                                    sel.set('project_id', record.data.id);
-                                                                    sel.set('project_id_code',     record.data.code);
-                                                                    sel.set('project_id_name',   record.data.name);
-                                                                    
-                                                                    
-                                                                    _this.grid.ds.updateBar(sel);
-                                                                    
-                                                                      
-                                                                     
-                                                                }
-                                                            },
-                                                            allowBlank : 'false',
-                                                            displayField : 'name',
-                                                            editable : 'false',
-                                                            emptyText : "Select Project",
-                                                            fieldLabel : 'Project',
-                                                            forceSelection : true,
-                                                            hiddenName : 'project_id',
-                                                            listWidth : 400,
-                                                            loadingText : "Searching...",
-                                                            minChars : 2,
-                                                            name : 'project_id_name',
-                                                            pageSize : 20,
-                                                            qtip : "Select Projects",
-                                                            queryParam : 'query[name]',
-                                                            selectOnFocus : true,
-                                                            tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> - {name}</div>',
-                                                            triggerAction : 'all',
-                                                            typeAhead : true,
-                                                            valueField : 'id',
-                                                            width : 200,
-                                                            store : {
-                                                                xtype: 'Store',
-                                                                xns: Roo.data,
-                                                                listeners : {
-                                                                    beforeload : function (_self, o){
-                                                                        o.params = o.params || {};
-                                                                        o.params['query[project_filter]'] = 'P,N,U'; // actually this is the default.
-                                                                        
-                                                                        // set more here
-                                                                    }
-                                                                },
-                                                                remoteSort : true,
-                                                                sortInfo : { field: 'code', direction: 'ASC' },
-                                                                proxy : {
-                                                                    xtype: 'HttpProxy',
-                                                                    xns: Roo.data,
-                                                                    method : 'GET',
-                                                                    url : baseURL + '/Roo/Projects.php'
-                                                                },
-                                                                reader : {
-                                                                    xtype: 'JsonReader',
-                                                                    xns: Roo.data,
-                                                                    id : 'id',
-                                                                    root : 'data',
-                                                                    totalProperty : 'total',
-                                                                    fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
-                                                                }
-                                                            }
-                                                        },
-                                                        {
-                                                            xtype: 'Column',
-                                                            xns: Roo.form,
-                                                            labelAlign : 'top',
-                                                            width : 300,
-                                                            items : [
-                                                                {
-                                                                    xtype: 'TextArea',
-                                                                    xns: Roo.form,
-                                                                    listeners : {
-                                                                        keyup : function (_self, e)
-                                                                        {
-                                                                            _this.selectedRec.set('description',   this.getValue());
-                                                                            _this.grid.dataSource.updateBar(_this.selectedRec);
-                                                                         
-                                                                        }
-                                                                    },
-                                                                    fieldLabel : 'Description',
-                                                                    height : 120,
-                                                                    name : 'description',
-                                                                    width : 300
-                                                                }
-                                                            ]
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'action'
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'staff_id'
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'qtyvalue'
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'qtyvalue2'
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'entry_dt'
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'action_dt'
-                                                        },
-                                                        {
-                                                            xtype: 'Hidden',
-                                                            xns: Roo.form,
-                                                            name : 'id'
-                                                        }
-                                                    ]
-                                                }
-                                            ]
-                                        }
-                                    ],
-                                    north : {
-                                        xtype: 'LayoutRegion',
-                                        xns: Roo,
-                                        height : 200,
-                                        title : "Details"
-                                    },
-                                    center : {
-                                        xtype: 'LayoutRegion',
-                                        xns: Roo,
-                                        title : "Task Queue"
-                                    }
-                                }
-                            }
-                        ],
-                        center : {
-                            xtype: 'LayoutRegion',
-                            xns: Roo,
-                            title : "Active / Logged Time"
-                        },
-                        east : {
-                            xtype: 'LayoutRegion',
-                            xns: Roo,
-                            width : 350
+ },
+
+ create : function()
+ {
+   var _this = this;
+   this.dialog = Roo.factory({
+    xtype : 'LayoutDialog',
+    height : 700,
+    title : _this._strings['645fcdd1616f8c7dbb207f6802786431'] /* Time Manager */,
+    width : 1000,
+    xns : Roo,
+    '|xns' : 'Roo',
+    center : {
+     xtype : 'LayoutRegion',
+     tabPosition : 'top',
+     xns : Roo,
+     '|xns' : 'Roo'
+    },
+    items  : [
+     {
+      xtype : 'NestedLayoutPanel',
+      region : 'center',
+      title : _this._strings['9deec6a3dfda06500b808d70875f0a8f'] /* Log Time */,
+      xns : Roo,
+      '|xns' : 'Roo',
+      layout : {
+       xtype : 'BorderLayout',
+       xns : Roo,
+       '|xns' : 'Roo',
+       center : {
+        xtype : 'LayoutRegion',
+        title : _this._strings['9e51cf61fbb08a10c12619611dc818ad'] /* Active / Logged Time */,
+        xns : Roo,
+        '|xns' : 'Roo'
+       },
+       east : {
+        xtype : 'LayoutRegion',
+        collapsed : true,
+        collapsedTitle : 'Ticket Details',
+        collapsible : true,
+        split : true,
+        title : _this._strings['ed7b9312345d291c1ccf68096e65ca54'] /* Ticket Details */,
+        width : 350,
+        xns : Roo,
+        '|xns' : 'Roo'
+       },
+       west : {
+        xtype : 'LayoutRegion',
+        split : true,
+        width : 600,
+        xns : Roo,
+        '|xns' : 'Roo'
+       },
+       items  : [
+        {
+         xtype : 'GridPanel',
+         background : true,
+         fitContainer : true,
+         fitToframe : true,
+         region : 'west',
+         tableName : 'cash_invoice_entry',
+         title : _this._strings['329a87b3fae81c1c17a185c78d2e0e63'] /* cash_invoice_entry */,
+         listeners : {
+          activate : function() {
+               _this.timepanel = this;
+               if (_this.timegrid) {
+                  // _this.grid.footer.onClick('first');
+               }
+           }
+         },
+         xns : Roo,
+         '|xns' : 'Roo',
+         grid : {
+          xtype : 'Grid',
+          autoExpandColumn : 'activity_ref',
+          loadMask : true,
+          listeners : {
+           render : function() 
+            {
+                _this.timegrid = this; 
+                //_this.dialog = Pman.Dialog.FILL_IN
+                if (_this.timepanel.active) {
+                  // this.footer.onClick('first');
+                }
+            },
+           rowdblclick : function (_self, rowIndex, e)
+            {
+                if (!_this.dialog) { return; }
+                _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
+                    _this.grid.footer.onClick('first');
+                }); 
+            }
+          },
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
+          toolbar : {
+           xtype : 'Toolbar',
+           xns : Roo,
+           '|xns' : 'Roo',
+           items  : [
+            {
+             xtype : 'ComboBox',
+             allowBlank : false,
+             displayField : 'name',
+             editable : false,
+             emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
+             fieldLabel : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
+             forceSelection : true,
+             hiddenName : '',
+             listWidth : 400,
+             loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+             minChars : 2,
+             name : '',
+             pageSize : 20,
+             qtip : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
+             queryParam : '',
+             selectOnFocus : true,
+             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> {email} </div>',
+             triggerAction : 'all',
+             typeAhead : true,
+             valueField : 'id',
+             width : 300,
+             listeners : {
+              render : function (_self)
+               {
+                       _this.personSelect = _self;
+               }
+             },
+             xns : Roo.form,
+             '|xns' : 'Roo.form',
+             store : {
+              xtype : 'Store',
+              remoteSort : true,
+              sortInfo : { direction : 'ASC', field: 'id' },
+              listeners : {
+               beforeload : function (_self, o){
+                    o.params = o.params || {};
+                    // set more here
+                    o.params.company_id_comptype = 'OWNER';
+                }
+              },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
+              proxy : {
+               xtype : 'HttpProxy',
+               method : 'GET',
+               url : baseURL + '/Roo/Person.php',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              },
+              reader : {
+               xtype : 'JsonReader',
+               fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
+               id : 'id',
+               root : 'data',
+               totalProperty : 'total',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              }
+             }
+            }
+           ]
+          },
+          dataSource : {
+           xtype : 'Store',
+           remoteSort : true,
+           sortInfo : { field : 'action_dt', direction: 'DESC' },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
+           proxy : {
+            xtype : 'HttpProxy',
+            method : 'GET',
+            url : baseURL + '/Roo/cash_invoice_entry.php',
+            listeners : {
+             beforeload : function (This, params)
+              {
+                 if (_this.personSelect.getValue()) {
+                      params.person_id = _this.personSelect.getValue();
+                  } else {
+                      params.person_id = Pman.Login.authUser.id;
+                  }
+                  
+                  
+              }
+            },
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           },
+           reader : {
+            xtype : 'JsonReader',
+            fields : [
+                {
+                    'name': 'id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'entry_dt',
+                    'type': 'date',
+                    'dateFormat': 'Y-m-d'
+                },
+                {
+                    'name': 'entered_dt',
+                    'type': 'date',
+                    'dateFormat': 'Y-m-d'
+                },
+                {
+                    'name': 'description',
+                    'type': 'string'
+                },
+                {
+                    'name': 'action',
+                    'type': 'string'
+                },
+                {
+                    'name': 'qty',
+                    'type': 'string'
+                },
+                {
+                    'name': 'invoice_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'pricevalue',
+                    'type': 'float'
+                },
+                {
+                    'name': 'qtyvalue',
+                    'type': 'float'
+                },
+                {
+                    'name': 'to_account_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'discount',
+                    'type': 'float'
+                },
+                {
+                    'name': 'action_dt',
+                    'type': 'date',
+                    'dateFormat': 'Y-m-d'
+                },
+                {
+                    'name': 'staff_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'invoice_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'invoice_id_idtxt',
+                    'type': 'string'
+                },
+                {
+                    'name': 'invoice_id_project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'invoice_id_opened_dt',
+                    'type': 'date'
+                },
+                {
+                    'name': 'invoice_id_posted',
+                    'type': 'date'
+                },
+                {
+                    'name': 'invoice_id_post_transaction_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'invoice_id_post_account_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'invoice_id_paid',
+                    'type': 'float'
+                },
+                {
+                    'name': 'invoice_id_total',
+                    'type': 'float'
+                },
+                {
+                    'name': 'invoice_id_duedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'to_account_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'to_account_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'to_account_id_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'to_account_id_commodity',
+                    'type': 'string'
+                },
+                {
+                    'name': 'to_account_id_scu',
+                    'type': 'string'
+                },
+                {
+                    'name': 'to_account_id_description',
+                    'type': 'string'
+                },
+                {
+                    'name': 'to_account_id_parent',
+                    'type': 'int'
+                },
+                {
+                    'name': 'to_account_id_fullname',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_office_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_phone',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_fax',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_email',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_company_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_role',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_passwd',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_lang',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_no_reset_sent',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_action_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'staff_id_project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_deleted_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'staff_id_deleted_dt',
+                    'type': 'date'
+                }
+            ],
+            id : 'id',
+            root : 'data',
+            totalProperty : 'total',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           }
+          },
+          colModel : [
+           {
+            xtype : 'ColumnModel',
+            dataIndex : 'action_dt',
+            header : _this._strings['a76d4ef5f3f6a672bbfab2865563e530'] /* Time */,
+            renderer : function(v,x,r) { 
+                var s = r.data.qtyvalue;
+                var end = v.add(Date.HOUR, s);
+                return String.format('{0} {1}-{2}',
+                     v.format('D'), v.format('H:i'), end.format('H:i') );
+            },
+            width : 100,
+            xns : Roo.grid,
+            '|xns' : 'Roo.grid'
+           },
+           {
+            xtype : 'ColumnModel',
+            dataIndex : 'ticket_id_summary',
+            header : _this._strings['c751439d0db3883ac1c8e816327adcab'] /* Ticket */,
+            renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
+            width : 200,
+            xns : Roo.grid,
+            '|xns' : 'Roo.grid'
+           },
+           {
+            xtype : 'ColumnModel',
+            dataIndex : 'notes',
+            header : _this._strings['f4c6f851b00d5518bf888815de279aba'] /* Notes */,
+            renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
+            width : 300,
+            xns : Roo.grid,
+            '|xns' : 'Roo.grid'
+           }
+          ]
+         }
+        },
+        {
+         xtype : 'NestedLayoutPanel',
+         region : 'center',
+         xns : Roo,
+         '|xns' : 'Roo',
+         layout : {
+          xtype : 'BorderLayout',
+          xns : Roo,
+          '|xns' : 'Roo',
+          center : {
+           xtype : 'LayoutRegion',
+           title : _this._strings['6cca3734b44a6ae61b40c9a915d122f4'] /* Task Queue */,
+           xns : Roo,
+           '|xns' : 'Roo'
+          },
+          north : {
+           xtype : 'LayoutRegion',
+           height : 200,
+           xns : Roo,
+           '|xns' : 'Roo'
+          },
+          items  : [
+           {
+            xtype : 'GridPanel',
+            background : true,
+            fitContainer : true,
+            fitToframe : true,
+            region : 'center',
+            tableName : 'mtrack_ticket',
+            title : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
+            listeners : {
+             activate : function() {
+                  _this.queuepanel = this;
+                  if (_this.queuegrid) {
+                      //_this.queuegrid.footer.onClick('first');
+                  }
+              }
+            },
+            xns : Roo,
+            '|xns' : 'Roo',
+            grid : {
+             xtype : 'Grid',
+             autoExpandColumn : 'summary',
+             loadMask : true,
+             listeners : {
+              render : function() 
+               {
+                   _this.queuegrid = this; 
+                   //_this.dialog = Pman.Dialog.FILL_IN
+                   if (_this.queuepanel.active) {
+                      //this.footer.onClick('first');
+                   }
+               },
+              rowdblclick : function (_self, rowIndex, e)
+               {
+                   if (!_this.dialog) { return; }
+                   _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
+                       _this.grid.footer.onClick('first');
+                   }); 
+               }
+             },
+             xns : Roo.grid,
+             '|xns' : 'Roo.grid',
+             toolbar : {
+              xtype : 'Toolbar',
+              xns : Roo,
+              '|xns' : 'Roo',
+              items  : [
+               {
+                xtype : 'ComboBox',
+                allowBlank : false,
+                displayField : 'name',
+                editable : false,
+                emptyText : _this._strings['6a58f977f2b623b695a340766f2a6843'] /* Select Project */,
+                fieldLabel : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
+                forceSelection : true,
+                hiddenName : 'project_id',
+                listWidth : 400,
+                loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+                minChars : 2,
+                name : 'project_id_name',
+                pageSize : 20,
+                qtip : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
+                queryParam : 'query[name]',
+                selectOnFocus : true,
+                tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> - {name}</div>',
+                triggerAction : 'all',
+                typeAhead : true,
+                valueField : 'id',
+                width : 200,
+                listeners : {
+                 beforeselect : function (combo, record, index)
+                  {
+                  
+                       
+                      _this.queuegrid.ds.load({});
+                      
+                        
+                       
+                  },
+                 render : function (_self)
+                  {
+                      _this.projectSel = _self;
+                  }
+                },
+                xns : Roo.form,
+                '|xns' : 'Roo.form',
+                store : {
+                 xtype : 'Store',
+                 remoteSort : true,
+                 sortInfo : { field: 'code', direction: 'ASC' },
+                 listeners : {
+                  beforeload : function (_self, o){
+                       o.params = o.params || {};
+                       o.params['query[project_filter]'] = 'P,N,U'; // actually this is the default.
+                       
+                       // set more here
+                   }
+                 },
+                 xns : Roo.data,
+                 '|xns' : 'Roo.data',
+                 proxy : {
+                  xtype : 'HttpProxy',
+                  method : 'GET',
+                  url : baseURL + '/Roo/Projects.php',
+                  xns : Roo.data,
+                  '|xns' : 'Roo.data'
+                 },
+                 reader : {
+                  xtype : 'JsonReader',
+                  fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
+                  id : 'id',
+                  root : 'data',
+                  totalProperty : 'total',
+                  xns : Roo.data,
+                  '|xns' : 'Roo.data'
+                 }
+                }
+               }
+              ]
+             },
+             dataSource : {
+              xtype : 'Store',
+              remoteSort : true,
+              sortInfo : { field : 'summary', direction: 'ASC' },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
+              proxy : {
+               xtype : 'HttpProxy',
+               method : 'GET',
+               url : baseURL + '/Roo/mtrack_ticket.php',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              },
+              reader : {
+               xtype : 'JsonReader',
+               fields : [
+                   {
+                       'name': 'id',
+                       'type': 'int'
+                   } /*,
+                   {
+                       'name': 'project_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'summary',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'description',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'changelog',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'created',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'updated',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'priority_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'severity_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'classification_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'resolution_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'cc',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'status',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'estimated',
+                       'type': 'float'
+                   },
+                   {
+                       'name': 'spent',
+                       'type': 'float'
+                   },
+                   {
+                       'name': 'x_fieldname',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'milestone_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'updated_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'updated_person_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'updated_ontable',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'updated_onid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'updated_changedate',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'updated_reason',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'created_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'created_person_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'created_ontable',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'created_onid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'created_changedate',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'created_reason',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_office_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_phone',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_fax',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_email',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_company_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_role',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_remarks',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_passwd',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_owner_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_lang',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_no_reset_sent',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_action_type',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'owner_id_project_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_deleted_by',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'owner_id_deleted_dt',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'developer_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_office_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_phone',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_fax',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_email',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_company_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_role',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_remarks',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_passwd',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_owner_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_lang',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_no_reset_sent',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_action_type',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'developer_id_project_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_deleted_by',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'developer_id_deleted_dt',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'priority_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'priority_id_etype',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'priority_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'priority_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'priority_id_seqid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'severity_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'severity_id_etype',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'severity_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'severity_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'severity_id_seqid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'classification_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'classification_id_etype',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'classification_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'classification_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'classification_id_seqid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'resolution_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'resolution_id_etype',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'resolution_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'resolution_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'resolution_id_seqid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'status_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'status_etype',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'status_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'status_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'status_seqid',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_remarks',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_owner_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_code',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_active',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_type',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_client_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_team_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_file_location',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_open_date',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'project_id_open_by',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'project_id_close_date',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'project_id_countries',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_languages',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'project_id_agency_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'milestone_id_id',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'milestone_id_name',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'milestone_id_description',
+                       'type': 'string'
+                   },
+                   {
+                       'name': 'milestone_id_startdate',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'milestone_id_duedate',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'milestone_id_completed',
+                       'type': 'date'
+                   },
+                   {
+                       'name': 'milestone_id_deleted',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'milestone_id_created',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'milestone_id_updated',
+                       'type': 'int'
+                   },
+                   {
+                       'name': 'milestone_id_project_id',
+                       'type': 'int'
+                   } */
+               ],
+               id : 'id',
+               root : 'data',
+               totalProperty : 'total',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              }
+             },
+             colModel : [
+              {
+               xtype : 'ColumnModel',
+               dataIndex : 'summary',
+               header : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
+               renderer : function(v) { return String.format('{0}', v); },
+               width : 200,
+               xns : Roo.grid,
+               '|xns' : 'Roo.grid'
+              }
+             ]
+            }
+           },
+           {
+            xtype : 'ContentPanel',
+            region : 'north',
+            xns : Roo,
+            '|xns' : 'Roo',
+            toolbar : {
+             xtype : 'Toolbar',
+             xns : Roo,
+             '|xns' : 'Roo',
+             items  : [
+              {
+               xtype : 'Button',
+               text : _this._strings['b2439dea1dd89e6f694df484214e57cf'] /* Working on this */,
+               xns : Roo.Toolbar,
+               '|xns' : 'Roo.Toolbar'
+              },
+              {
+               xtype : 'Button',
+               text : _this._strings['07ca5050e697392c9ed47e6453f1453f'] /* Completed */,
+               xns : Roo.Toolbar,
+               '|xns' : 'Roo.Toolbar'
+              },
+              {
+               xtype : 'Button',
+               text : _this._strings['1fa1f1ccb57b2486b4c05122d64868d4'] /* Not on Project work */,
+               xns : Roo.Toolbar,
+               '|xns' : 'Roo.Toolbar'
+              }
+             ]
+            },
+            items  : [
+             {
+              xtype : 'Form',
+              activeData : false,
+              method : 'POST',
+              saveActive : function(rec, effort) {
+                  
+                   effort = effort || 0;
+                  
+              
+                  if (!rec) {
+                      Roo.log("ERROR: saveActive: record not set ");
+                      return;
+                  }
+              
+                   var d = Roo.apply({}, rec.data); // copy it so changes do not affect crap...
+                   
+                   var upd = (new Date()).format('Y-m-d H:i:s');
+                   
+               
+                   
+                   
+                   //Roo.log("SAVE IT: " + Roo.encode(d) );
+                   
+                   //     return;
+                   var at = typeof(d.action_dt) == 'string' ? Date.parseDate(d.action_dt, 'Y-m-d H:i:s') : d.action_dt;
+                   
+                   new Pman.Request({
+                      url : baseURL + '/Roo/Cash_invoice_entry.php',
+                      method : 'POST',
+                      params : {
+                          id : d.id,
+                          entry_dt: at.format('Y-m-d'),  // this should not change for posted entries really...
+                          entered_dt: upd,            
+                          action_dt : at.format('Y-m-d H:i:s'),
+                          qtyvalue : d.qtyvalue,
+                          action: 'Hours',
+                          description: d.description,
+                          pricevalue: d.pricevalue,  
+                          project_id : d.project_id,
+                          staff_id : d.staff_id * 1 ? d.staff_id : Pman.Login.authUser.id,
+                          ticket_id : d.ticket_id ? d.ticket_id : 0
+                          
+                      },
+                      success : function(res)
+                      {
+                          // everythings fine..
+                          
+                          // we have to update the view object... now...
+                          // we can not reload as that may blank out data..
+                          if (!rec.data.id) {
+                              Roo.log("Setting data id to " + res.data.id);
+                              rec.set('id', res.data.id);
+              
+                          }
+              
+                          
+                      },
+                      failure : function()
+                      {
+                          effort++;
+                          if (effort > 3) {
+                              Roo.MessageBox.alert("Error", "Saving timesheet failed");
+                              return;
+                          }
+                          _this.form.saveActive(rec, effort);
+                      }
+                      
+                   });
+              },
+              style : 'margin-left:10px;',
+              url : baseURL + '/Roo/cash_invoice_entry.php',
+              listeners : {
+               actioncomplete : function(_self,action)
+                {
+                    
+                 
+                    Roo.log('action complete');
+                    Roo.log(action);
+                    if (action.type == 'setdata') {
+                
+                        _this.isClose = false; // force flag..
+                        
+                        if (this.activeRecord) {
+                             this.saveActive( this.activeRecord);
+                        }
+                        
+                        
+                         
+                        // show form..
+                        if (!action.data || !action.data.action) {
+                            _this.form.el.mask('select something'); 
+                            this.activeRecord  = false;
+                            _this.form.reset(); 
+                            return;
                         }
+                        _this.form.el.unmask();   
+                        
+                        this.activeRecord = action.rec;
+                         
+                        
+                
+                            
+                        
+                        // should save here if we are 'dirty!';
+                        _this.form.reset();
+                        _this.form.setValues(action.data);
+                        // set the dates so they are correct..
+                         _this.form.setValues( { 
+                 
+                                action_dt : action.data.action_dt.format('Y-m-d H:i:s'),
+                                entry_dt: action.data.action_dt.format('Y-m-d'),
+                                qtyvalue2 : action.data.qtyvalue
+                            });
+                        // set the default values..
+                        // for dirty test...
+                        _this.form.items.each(function(f) {
+                            f.originalValue = f.getValue();
+                        });
+                        
+                        
+                        
+                        
+                        // form is set to an event.
+                        
+                                
+                        
+                       return;
+                    }
+                    
+                    
+                    if (action.type == 'load') {
+                 
+                        return;
+                    }
+                    if (action.type =='submit') {
+                        // set this on the close button..
+                         if (_this.isClose) {
+                            _this.dialog.hide();
+                         }
+                        
+                         if (_this.callback) {
+                            _this.callback.call(_this, _this.form.getValues());
+                         }
+                
+                         return;
                     }
                 },
+               rendered : function (form)
                 {
-                    xtype: 'NestedLayoutPanel',
-                    xns: Roo,
-                    region : 'center',
-                    title : "Plan Time",
-                    layout : {
-                        xtype: 'BorderLayout',
-                        xns: Roo,
-                        items : [
-                            {
-                                xtype: 'GridPanel',
-                                xns: Roo,
-                                listeners : {
-                                    activate : function() {
-                                        _this.openpanel = this;
-                                        if (_this.opengrid) {
-                                       //    _this.opengrid.footer.onClick('first');
-                                        }
-                                    }
-                                },
-                                background : false,
-                                fitContainer : true,
-                                fitToframe : true,
-                                region : 'west',
-                                tableName : 'mtrack_ticket',
-                                title : "mtrack_ticket",
-                                grid : {
-                                    xtype: 'Grid',
-                                    xns: Roo.grid,
-                                    listeners : {
-                                        render : function() 
-                                        {
-                                            _this.opengrid = this; 
-                                            //_this.dialog = Pman.Dialog.FILL_IN
-                                            if (_this.openpanel.active) {
-                                               //this.footer.onClick('first');
-                                            }
-                                        },
-                                        rowdblclick : function (_self, rowIndex, e)
-                                        {
-                                            if (!_this.dialog) return;
-                                            _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
-                                                _this.grid.footer.onClick('first');
-                                            }); 
-                                        }
-                                    },
-                                    autoExpandColumn : 'summary',
-                                    loadMask : true,
-                                    toolbar : {
-                                        xtype: 'Toolbar',
-                                        xns: Roo,
-                                        items : [
-                                            {
-                                                xtype: 'ComboBox',
-                                                xns: Roo.form,
-                                                displayField : '',
-                                                editable : 'false',
-                                                emptyText : "Select Project",
-                                                fieldLabel : 'mtrack_ticket',
-                                                forceSelection : true,
-                                                hiddenName : '',
-                                                listWidth : 400,
-                                                loadingText : "Searching...",
-                                                minChars : 2,
-                                                name : '',
-                                                pageSize : 20,
-                                                qtip : "Select mtrack_ticket",
-                                                queryParam : '',
-                                                selectOnFocus : true,
-                                                tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
-                                                triggerAction : 'all',
-                                                typeAhead : true,
-                                                valueField : 'id',
-                                                width : 300,
-                                                store : {
-                                                    xtype: 'Store',
-                                                    xns: Roo.data,
-                                                    remoteSort : true,
-                                                    sortInfo : { direction : 'ASC', field: 'id' },
-                                                    listeners : {
-                                                        beforeload : function (_self, o){
-                                                            o.params = o.params || {};
-                                                            // set more here
-                                                        }
-                                                    },
-                                                    proxy : {
-                                                        xtype: 'HttpProxy',
-                                                        xns: Roo.data,
-                                                        method : 'GET',
-                                                        url : baseURL + '/Roo/mtrack_ticket.php'
-                                                    },
-                                                    reader : {
-                                                        xtype: 'JsonReader',
-                                                        xns: Roo.data,
-                                                        id : 'id',
-                                                        root : 'data',
-                                                        totalProperty : 'total',
-                                                        fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}]
-                                                    }
-                                                }
-                                            }
-                                        ]
-                                    },
-                                    dataSource : {
-                                        xtype: 'Store',
-                                        xns: Roo.data,
-                                        remoteSort : true,
-                                        sortInfo : { field : 'summary', direction: 'ASC' },
-                                        proxy : {
-                                            xtype: 'HttpProxy',
-                                            xns: Roo.data,
-                                            method : 'GET',
-                                            url : baseURL + '/Roo/mtrack_ticket.php'
-                                        },
-                                        reader : {
-                                            xtype: 'JsonReader',
-                                            xns: Roo.data,
-                                            totalProperty : 'total',
-                                            root : 'data',
-                                            id : 'id',
-                                            fields : [
-                                                {
-                                                    'name': 'id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'summary',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'description',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'changelog',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'created',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'priority_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'cc',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'status',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'estimated',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'spent',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'x_fieldname',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_person_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_ontable',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'updated_onid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_changedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'updated_reason',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'created_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'created_person_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'created_ontable',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'created_onid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'created_changedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'created_reason',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_office_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_phone',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_fax',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_email',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_company_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_role',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_passwd',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_lang',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_no_reset_sent',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_action_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_deleted_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_deleted_dt',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'developer_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_office_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_phone',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_fax',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_email',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_company_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_role',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_passwd',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_lang',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_no_reset_sent',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_action_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_deleted_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_deleted_dt',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'priority_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'priority_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'priority_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'priority_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'priority_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'severity_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'severity_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'classification_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'classification_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'status_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'status_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'status_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'status_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'status_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_code',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_client_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_team_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_file_location',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_open_date',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'project_id_open_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_close_date',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'project_id_countries',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_languages',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_agency_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_description',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_startdate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_duedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_completed',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_deleted',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_created',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_updated',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_project_id',
-                                                    'type': 'int'
-                                                }
-                                            ]
-                                        }
-                                    },
-                                    colModel : [
-                                        {
-                                            xtype: 'ColumnModel',
-                                            xns: Roo.grid,
-                                            header : 'Summary',
-                                            width : 200,
-                                            dataIndex : 'summary',
-                                            renderer : function(v) { return String.format('{0}', v); }
-                                        }
-                                    ]
-                                }
-                            },
-                            {
-                                xtype: 'GridPanel',
-                                xns: Roo,
-                                listeners : {
-                                    activate : function() {
-                                        _this.openpanel = this;
-                                        if (_this.opengrid) {
-                                       //    _this.opengrid.footer.onClick('first');
-                                        }
-                                    }
-                                },
-                                background : false,
-                                fitContainer : true,
-                                fitToframe : true,
-                                region : 'center',
-                                tableName : 'mtrack_ticket',
-                                title : "mtrack_ticket",
-                                grid : {
-                                    xtype: 'Grid',
-                                    xns: Roo.grid,
-                                    listeners : {
-                                        render : function() 
-                                        {
-                                            _this.opengrid = this; 
-                                            //_this.dialog = Pman.Dialog.FILL_IN
-                                            if (_this.openpanel.active) {
-                                               //this.footer.onClick('first');
-                                            }
-                                        },
-                                        rowdblclick : function (_self, rowIndex, e)
-                                        {
-                                            if (!_this.dialog) return;
-                                            _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
-                                                _this.grid.footer.onClick('first');
-                                            }); 
-                                        }
-                                    },
-                                    autoExpandColumn : 'summary',
-                                    loadMask : true,
-                                    toolbar : {
-                                        xtype: 'Toolbar',
-                                        xns: Roo,
-                                        items : [
-                                            {
-                                                xtype: 'ComboBox',
-                                                xns: Roo.form,
-                                                displayField : '',
-                                                editable : 'false',
-                                                emptyText : "Select Person",
-                                                fieldLabel : 'mtrack_ticket',
-                                                forceSelection : true,
-                                                hiddenName : '',
-                                                listWidth : 400,
-                                                loadingText : "Searching...",
-                                                minChars : 2,
-                                                name : '',
-                                                pageSize : 20,
-                                                qtip : "Select mtrack_ticket",
-                                                queryParam : '',
-                                                selectOnFocus : true,
-                                                tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
-                                                triggerAction : 'all',
-                                                typeAhead : true,
-                                                valueField : 'id',
-                                                width : 300,
-                                                store : {
-                                                    xtype: 'Store',
-                                                    xns: Roo.data,
-                                                    remoteSort : true,
-                                                    sortInfo : { direction : 'ASC', field: 'id' },
-                                                    listeners : {
-                                                        beforeload : function (_self, o){
-                                                            o.params = o.params || {};
-                                                            // set more here
-                                                        }
-                                                    },
-                                                    proxy : {
-                                                        xtype: 'HttpProxy',
-                                                        xns: Roo.data,
-                                                        method : 'GET',
-                                                        url : baseURL + '/Roo/mtrack_ticket.php'
-                                                    },
-                                                    reader : {
-                                                        xtype: 'JsonReader',
-                                                        xns: Roo.data,
-                                                        id : 'id',
-                                                        root : 'data',
-                                                        totalProperty : 'total',
-                                                        fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}]
-                                                    }
-                                                }
-                                            }
-                                        ]
-                                    },
-                                    dataSource : {
-                                        xtype: 'Store',
-                                        xns: Roo.data,
-                                        remoteSort : true,
-                                        sortInfo : { field : 'summary', direction: 'ASC' },
-                                        proxy : {
-                                            xtype: 'HttpProxy',
-                                            xns: Roo.data,
-                                            method : 'GET',
-                                            url : baseURL + '/Roo/mtrack_ticket.php'
-                                        },
-                                        reader : {
-                                            xtype: 'JsonReader',
-                                            xns: Roo.data,
-                                            totalProperty : 'total',
-                                            root : 'data',
-                                            id : 'id',
-                                            fields : [
-                                                {
-                                                    'name': 'id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'summary',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'description',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'changelog',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'created',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'priority_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'cc',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'status',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'estimated',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'spent',
-                                                    'type': 'float'
-                                                },
-                                                {
-                                                    'name': 'x_fieldname',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_person_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_ontable',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'updated_onid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'updated_changedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'updated_reason',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'created_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'created_person_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'created_ontable',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'created_onid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'created_changedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'created_reason',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_office_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_phone',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_fax',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_email',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_company_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_role',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_passwd',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_lang',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_no_reset_sent',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_action_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'owner_id_project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_deleted_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'owner_id_deleted_dt',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'developer_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_office_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_phone',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_fax',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_email',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_company_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_role',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_passwd',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_lang',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_no_reset_sent',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_action_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'developer_id_project_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_deleted_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'developer_id_deleted_dt',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'priority_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'priority_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'priority_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'priority_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'priority_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'severity_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'severity_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'severity_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'classification_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'classification_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'classification_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'resolution_id_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'status_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'status_etype',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'status_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'status_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'status_seqid',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_remarks',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_owner_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_code',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_active',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_type',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_client_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_team_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_file_location',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_open_date',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'project_id_open_by',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'project_id_close_date',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'project_id_countries',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_languages',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'project_id_agency_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_id',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_name',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_description',
-                                                    'type': 'string'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_startdate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_duedate',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_completed',
-                                                    'type': 'date'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_deleted',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_created',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_updated',
-                                                    'type': 'int'
-                                                },
-                                                {
-                                                    'name': 'milestone_id_project_id',
-                                                    'type': 'int'
-                                                }
-                                            ]
-                                        }
-                                    },
-                                    colModel : [
-                                        {
-                                            xtype: 'ColumnModel',
-                                            xns: Roo.grid,
-                                            header : 'Summary',
-                                            width : 200,
-                                            dataIndex : 'summary',
-                                            renderer : function(v) { return String.format('{0}', v); }
-                                        }
-                                    ]
-                                }
-                            }
-                        ],
-                        west : {
-                            xtype: 'LayoutRegion',
-                            xns: Roo,
-                            title : "Open Tasks (Unassigned) / Select Project",
-                            width : 450
-                        },
-                        center : {
-                            xtype: 'LayoutRegion',
-                            xns: Roo,
-                            title : "Assigned to  / Prioritized (all projects)"
-                        }
+                    _this.form= form;
+                }
+              },
+              xns : Roo.form,
+              '|xns' : 'Roo.form',
+              items  : [
+               {
+                xtype : 'ComboBox',
+                allowBlank : false,
+                displayField : 'name',
+                editable : false,
+                emptyText : _this._strings['6a58f977f2b623b695a340766f2a6843'] /* Select Project */,
+                fieldLabel : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
+                forceSelection : true,
+                hiddenName : 'project_id',
+                listWidth : 400,
+                loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+                minChars : 2,
+                name : 'project_id_name',
+                pageSize : 20,
+                qtip : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
+                queryParam : 'query[name]',
+                selectOnFocus : true,
+                tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> - {name}</div>',
+                triggerAction : 'all',
+                typeAhead : true,
+                valueField : 'id',
+                width : 200,
+                listeners : {
+                 beforeselect : function (combo, record, index)
+                  {
+                  
+                      Roo.log('save it');
+                      var sel = _this.grid.ds.selectedBar();
+                   
+                      if (!sel) {
+                          Roo.log("nothing selected?");
+                          return;
+                      }
+                       
+                      // active record should be the same thing.
+                      sel.set('project_id', record.data.id);
+                      sel.set('project_id_code',     record.data.code);
+                      sel.set('project_id_name',   record.data.name);
+                      
+                      
+                      _this.grid.ds.updateBar(sel);
+                      
+                        
+                       
+                  },
+                 render : function (_self)
+                  {
+                      _this.projectSel = _self;
+                  }
+                },
+                xns : Roo.form,
+                '|xns' : 'Roo.form',
+                store : {
+                 xtype : 'Store',
+                 remoteSort : true,
+                 sortInfo : { field: 'code', direction: 'ASC' },
+                 listeners : {
+                  beforeload : function (_self, o){
+                       o.params = o.params || {};
+                       o.params['query[project_filter]'] = 'P,N,U'; // actually this is the default.
+                       
+                       // set more here
+                   }
+                 },
+                 xns : Roo.data,
+                 '|xns' : 'Roo.data',
+                 proxy : {
+                  xtype : 'HttpProxy',
+                  method : 'GET',
+                  url : baseURL + '/Roo/Projects.php',
+                  xns : Roo.data,
+                  '|xns' : 'Roo.data'
+                 },
+                 reader : {
+                  xtype : 'JsonReader',
+                  fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
+                  id : 'id',
+                  root : 'data',
+                  totalProperty : 'total',
+                  xns : Roo.data,
+                  '|xns' : 'Roo.data'
+                 }
+                }
+               },
+               {
+                xtype : 'Column',
+                labelAlign : 'top',
+                width : 300,
+                xns : Roo.form,
+                '|xns' : 'Roo.form',
+                items  : [
+                 {
+                  xtype : 'TextArea',
+                  fieldLabel : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
+                  height : 120,
+                  name : 'description',
+                  width : 300,
+                  listeners : {
+                   keyup : function (_self, e)
+                    {
+                        _this.selectedRec.set('description',   this.getValue());
+                        _this.grid.dataSource.updateBar(_this.selectedRec);
+                     
                     }
+                  },
+                  xns : Roo.form,
+                  '|xns' : 'Roo.form'
+                 }
+                ]
+               },
+               {
+                xtype : 'Hidden',
+                name : 'action',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               },
+               {
+                xtype : 'Hidden',
+                name : 'staff_id',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               },
+               {
+                xtype : 'Hidden',
+                name : 'qtyvalue',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               },
+               {
+                xtype : 'Hidden',
+                name : 'qtyvalue2',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               },
+               {
+                xtype : 'Hidden',
+                name : 'entry_dt',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               },
+               {
+                xtype : 'Hidden',
+                name : 'action_dt',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               },
+               {
+                xtype : 'Hidden',
+                name : 'id',
+                xns : Roo.form,
+                '|xns' : 'Roo.form'
+               }
+              ]
+             }
+            ]
+           }
+          ]
+         }
+        }
+       ]
+      }
+     },
+     {
+      xtype : 'NestedLayoutPanel',
+      region : 'center',
+      title : _this._strings['642f8356fcf65868f037f92e0e10c3cd'] /* Plan Time */,
+      xns : Roo,
+      '|xns' : 'Roo',
+      layout : {
+       xtype : 'BorderLayout',
+       xns : Roo,
+       '|xns' : 'Roo',
+       center : {
+        xtype : 'LayoutRegion',
+        title : _this._strings['f49f927095bb01b44c96d29c8c09f3a3'] /* Assigned to  / Prioritized (all projects) */,
+        xns : Roo,
+        '|xns' : 'Roo'
+       },
+       west : {
+        xtype : 'LayoutRegion',
+        title : _this._strings['9a221c25cceeb0d108ff6cb635dc8b8b'] /* Open Tasks (Unassigned) / Select Project */,
+        width : 450,
+        xns : Roo,
+        '|xns' : 'Roo'
+       },
+       items  : [
+        {
+         xtype : 'GridPanel',
+         background : false,
+         fitContainer : true,
+         fitToframe : true,
+         region : 'west',
+         tableName : 'mtrack_ticket',
+         title : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
+         listeners : {
+          activate : function() {
+               _this.openpanel = this;
+               if (_this.opengrid) {
+              //    _this.opengrid.footer.onClick('first');
+               }
+           }
+         },
+         xns : Roo,
+         '|xns' : 'Roo',
+         grid : {
+          xtype : 'Grid',
+          autoExpandColumn : 'summary',
+          loadMask : true,
+          listeners : {
+           render : function() 
+            {
+                _this.opengrid = this; 
+                //_this.dialog = Pman.Dialog.FILL_IN
+                if (_this.openpanel.active) {
+                   //this.footer.onClick('first');
                 }
-            ],
-            center : {
-                xtype: 'LayoutRegion',
-                xns: Roo,
-                tabPosition : 'top'
+            },
+           rowdblclick : function (_self, rowIndex, e)
+            {
+                if (!_this.dialog) { return; }
+                _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
+                    _this.grid.footer.onClick('first');
+                }); 
+            }
+          },
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
+          toolbar : {
+           xtype : 'Toolbar',
+           xns : Roo,
+           '|xns' : 'Roo',
+           items  : [
+            {
+             xtype : 'ComboBox',
+             displayField : '',
+             editable : false,
+             emptyText : _this._strings['6a58f977f2b623b695a340766f2a6843'] /* Select Project */,
+             fieldLabel : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
+             forceSelection : true,
+             hiddenName : '',
+             listWidth : 400,
+             loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+             minChars : 2,
+             name : '',
+             pageSize : 20,
+             qtip : _this._strings['74cf22d20dea80f7bd8800a6da89a722'] /* Select mtrack_ticket */,
+             queryParam : '',
+             selectOnFocus : true,
+             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
+             triggerAction : 'all',
+             typeAhead : true,
+             valueField : 'id',
+             width : 300,
+             xns : Roo.form,
+             '|xns' : 'Roo.form',
+             store : {
+              xtype : 'Store',
+              remoteSort : true,
+              sortInfo : { direction : 'ASC', field: 'id' },
+              listeners : {
+               beforeload : function (_self, o){
+                    o.params = o.params || {};
+                    // set more here
+                }
+              },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
+              proxy : {
+               xtype : 'HttpProxy',
+               method : 'GET',
+               url : baseURL + '/Roo/mtrack_ticket.php',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              },
+              reader : {
+               xtype : 'JsonReader',
+               fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}],
+               id : 'id',
+               root : 'data',
+               totalProperty : 'total',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              }
+             }
             }
-        });
-    }
+           ]
+          },
+          dataSource : {
+           xtype : 'Store',
+           remoteSort : true,
+           sortInfo : { field : 'summary', direction: 'ASC' },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
+           proxy : {
+            xtype : 'HttpProxy',
+            method : 'GET',
+            url : baseURL + '/Roo/mtrack_ticket.php',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           },
+           reader : {
+            xtype : 'JsonReader',
+            fields : [
+                {
+                    'name': 'id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'summary',
+                    'type': 'string'
+                },
+                {
+                    'name': 'description',
+                    'type': 'string'
+                },
+                {
+                    'name': 'changelog',
+                    'type': 'string'
+                },
+                {
+                    'name': 'created',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'priority_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'cc',
+                    'type': 'string'
+                },
+                {
+                    'name': 'status',
+                    'type': 'int'
+                },
+                {
+                    'name': 'estimated',
+                    'type': 'float'
+                },
+                {
+                    'name': 'spent',
+                    'type': 'float'
+                },
+                {
+                    'name': 'x_fieldname',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_person_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_ontable',
+                    'type': 'string'
+                },
+                {
+                    'name': 'updated_onid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_changedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'updated_reason',
+                    'type': 'string'
+                },
+                {
+                    'name': 'created_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'created_person_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'created_ontable',
+                    'type': 'string'
+                },
+                {
+                    'name': 'created_onid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'created_changedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'created_reason',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_office_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_phone',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_fax',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_email',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_company_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_role',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_passwd',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_lang',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_no_reset_sent',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_action_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_deleted_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_deleted_dt',
+                    'type': 'date'
+                },
+                {
+                    'name': 'developer_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_office_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_phone',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_fax',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_email',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_company_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_role',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_passwd',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_lang',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_no_reset_sent',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_action_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_deleted_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_deleted_dt',
+                    'type': 'date'
+                },
+                {
+                    'name': 'priority_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'priority_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'priority_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'priority_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'priority_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'severity_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'severity_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'classification_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'classification_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'resolution_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'resolution_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'status_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'status_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'status_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'status_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'status_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_code',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_client_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_team_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_file_location',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_open_date',
+                    'type': 'date'
+                },
+                {
+                    'name': 'project_id_open_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_close_date',
+                    'type': 'date'
+                },
+                {
+                    'name': 'project_id_countries',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_languages',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_agency_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'milestone_id_description',
+                    'type': 'string'
+                },
+                {
+                    'name': 'milestone_id_startdate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'milestone_id_duedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'milestone_id_completed',
+                    'type': 'date'
+                },
+                {
+                    'name': 'milestone_id_deleted',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_created',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_updated',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_project_id',
+                    'type': 'int'
+                }
+            ],
+            id : 'id',
+            root : 'data',
+            totalProperty : 'total',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           }
+          },
+          colModel : [
+           {
+            xtype : 'ColumnModel',
+            dataIndex : 'summary',
+            header : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
+            renderer : function(v) { return String.format('{0}', v); },
+            width : 200,
+            xns : Roo.grid,
+            '|xns' : 'Roo.grid'
+           }
+          ]
+         }
+        },
+        {
+         xtype : 'GridPanel',
+         background : false,
+         fitContainer : true,
+         fitToframe : true,
+         region : 'center',
+         tableName : 'mtrack_ticket',
+         title : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
+         listeners : {
+          activate : function() {
+               _this.openpanel = this;
+               if (_this.opengrid) {
+              //    _this.opengrid.footer.onClick('first');
+               }
+           }
+         },
+         xns : Roo,
+         '|xns' : 'Roo',
+         grid : {
+          xtype : 'Grid',
+          autoExpandColumn : 'summary',
+          loadMask : true,
+          listeners : {
+           render : function() 
+            {
+                _this.opengrid = this; 
+                //_this.dialog = Pman.Dialog.FILL_IN
+                if (_this.openpanel.active) {
+                   //this.footer.onClick('first');
+                }
+            },
+           rowdblclick : function (_self, rowIndex, e)
+            {
+                if (!_this.dialog) { return; }
+                _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
+                    _this.grid.footer.onClick('first');
+                }); 
+            }
+          },
+          xns : Roo.grid,
+          '|xns' : 'Roo.grid',
+          toolbar : {
+           xtype : 'Toolbar',
+           xns : Roo,
+           '|xns' : 'Roo',
+           items  : [
+            {
+             xtype : 'ComboBox',
+             displayField : '',
+             editable : false,
+             emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
+             fieldLabel : _this._strings['3efbc55730fd4af147b96183d8afbd3b'] /* mtrack_ticket */,
+             forceSelection : true,
+             hiddenName : '',
+             listWidth : 400,
+             loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
+             minChars : 2,
+             name : '',
+             pageSize : 20,
+             qtip : _this._strings['74cf22d20dea80f7bd8800a6da89a722'] /* Select mtrack_ticket */,
+             queryParam : '',
+             selectOnFocus : true,
+             tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
+             triggerAction : 'all',
+             typeAhead : true,
+             valueField : 'id',
+             width : 300,
+             xns : Roo.form,
+             '|xns' : 'Roo.form',
+             store : {
+              xtype : 'Store',
+              remoteSort : true,
+              sortInfo : { direction : 'ASC', field: 'id' },
+              listeners : {
+               beforeload : function (_self, o){
+                    o.params = o.params || {};
+                    // set more here
+                }
+              },
+              xns : Roo.data,
+              '|xns' : 'Roo.data',
+              proxy : {
+               xtype : 'HttpProxy',
+               method : 'GET',
+               url : baseURL + '/Roo/mtrack_ticket.php',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              },
+              reader : {
+               xtype : 'JsonReader',
+               fields : [{"name":"id","type":"int"},{"name":"summary","type":"string"}],
+               id : 'id',
+               root : 'data',
+               totalProperty : 'total',
+               xns : Roo.data,
+               '|xns' : 'Roo.data'
+              }
+             }
+            }
+           ]
+          },
+          dataSource : {
+           xtype : 'Store',
+           remoteSort : true,
+           sortInfo : { field : 'summary', direction: 'ASC' },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
+           proxy : {
+            xtype : 'HttpProxy',
+            method : 'GET',
+            url : baseURL + '/Roo/mtrack_ticket.php',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           },
+           reader : {
+            xtype : 'JsonReader',
+            fields : [
+                {
+                    'name': 'id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'summary',
+                    'type': 'string'
+                },
+                {
+                    'name': 'description',
+                    'type': 'string'
+                },
+                {
+                    'name': 'changelog',
+                    'type': 'string'
+                },
+                {
+                    'name': 'created',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'priority_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'cc',
+                    'type': 'string'
+                },
+                {
+                    'name': 'status',
+                    'type': 'int'
+                },
+                {
+                    'name': 'estimated',
+                    'type': 'float'
+                },
+                {
+                    'name': 'spent',
+                    'type': 'float'
+                },
+                {
+                    'name': 'x_fieldname',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_person_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_ontable',
+                    'type': 'string'
+                },
+                {
+                    'name': 'updated_onid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'updated_changedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'updated_reason',
+                    'type': 'string'
+                },
+                {
+                    'name': 'created_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'created_person_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'created_ontable',
+                    'type': 'string'
+                },
+                {
+                    'name': 'created_onid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'created_changedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'created_reason',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_office_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_phone',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_fax',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_email',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_company_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_role',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_passwd',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_lang',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_no_reset_sent',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_action_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'owner_id_project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_deleted_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'owner_id_deleted_dt',
+                    'type': 'date'
+                },
+                {
+                    'name': 'developer_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_office_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_phone',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_fax',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_email',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_company_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_role',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_passwd',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_lang',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_no_reset_sent',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_action_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'developer_id_project_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_deleted_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'developer_id_deleted_dt',
+                    'type': 'date'
+                },
+                {
+                    'name': 'priority_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'priority_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'priority_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'priority_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'priority_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'severity_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'severity_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'severity_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'classification_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'classification_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'classification_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'resolution_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'resolution_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'resolution_id_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'status_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'status_etype',
+                    'type': 'string'
+                },
+                {
+                    'name': 'status_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'status_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'status_seqid',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_remarks',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_owner_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_code',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_active',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_type',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_client_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_team_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_file_location',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_open_date',
+                    'type': 'date'
+                },
+                {
+                    'name': 'project_id_open_by',
+                    'type': 'int'
+                },
+                {
+                    'name': 'project_id_close_date',
+                    'type': 'date'
+                },
+                {
+                    'name': 'project_id_countries',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_languages',
+                    'type': 'string'
+                },
+                {
+                    'name': 'project_id_agency_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_id',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_name',
+                    'type': 'string'
+                },
+                {
+                    'name': 'milestone_id_description',
+                    'type': 'string'
+                },
+                {
+                    'name': 'milestone_id_startdate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'milestone_id_duedate',
+                    'type': 'date'
+                },
+                {
+                    'name': 'milestone_id_completed',
+                    'type': 'date'
+                },
+                {
+                    'name': 'milestone_id_deleted',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_created',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_updated',
+                    'type': 'int'
+                },
+                {
+                    'name': 'milestone_id_project_id',
+                    'type': 'int'
+                }
+            ],
+            id : 'id',
+            root : 'data',
+            totalProperty : 'total',
+            xns : Roo.data,
+            '|xns' : 'Roo.data'
+           }
+          },
+          colModel : [
+           {
+            xtype : 'ColumnModel',
+            dataIndex : 'summary',
+            header : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
+            renderer : function(v) { return String.format('{0}', v); },
+            width : 200,
+            xns : Roo.grid,
+            '|xns' : 'Roo.grid'
+           }
+          ]
+         }
+        }
+       ]
+      }
+     }
+    ]
+   });
+ }
 };