DataObjects/Mtrack_ticket.php
[Pman.MTrack] / Pman.Dialog.MTrackTime.bjs
1 {
2  "name" : "Pman.Dialog.MTrackTime",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackTime.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "9a221c25cceeb0d108ff6cb635dc8b8b" : "Open Tasks (Unassigned) / Select Project",
10   "9e727fdd3aec8274f46685441900280d" : "Project",
11   "6a58f977f2b623b695a340766f2a6843" : "Select Project",
12   "74cf22d20dea80f7bd8800a6da89a722" : "Select mtrack_ticket",
13   "c751439d0db3883ac1c8e816327adcab" : "Ticket",
14   "290612199861c31d1036b185b4e69b75" : "Summary",
15   "1fa1f1ccb57b2486b4c05122d64868d4" : "Not on Project work",
16   "6cca3734b44a6ae61b40c9a915d122f4" : "Task Queue",
17   "ed7b9312345d291c1ccf68096e65ca54" : "Ticket Details",
18   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
19   "645fcdd1616f8c7dbb207f6802786431" : "Time Manager",
20   "329a87b3fae81c1c17a185c78d2e0e63" : "cash_invoice_entry",
21   "9deec6a3dfda06500b808d70875f0a8f" : "Log Time",
22   "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person",
23   "340c2ee497b85d5954b01c64de7f44f6" : "Select Person",
24   "f4c6f851b00d5518bf888815de279aba" : "Notes",
25   "24f27bda5dd2c488aa9bc7700ba98c34" : "Select Projects",
26   "07ca5050e697392c9ed47e6453f1453f" : "Completed",
27   "a76d4ef5f3f6a672bbfab2865563e530" : "Time",
28   "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
29   "642f8356fcf65868f037f92e0e10c3cd" : "Plan Time",
30   "9e51cf61fbb08a10c12619611dc818ad" : "Active / Logged Time",
31   "3efbc55730fd4af147b96183d8afbd3b" : "mtrack_ticket",
32   "b2439dea1dd89e6f694df484214e57cf" : "Working on this",
33   "f49f927095bb01b44c96d29c8c09f3a3" : "Assigned to  / Prioritized (all projects)"
34  },
35  "items" : [
36   {
37    "title" : "Time Manager",
38    "xtype" : "LayoutDialog",
39    "width" : 1000,
40    "$ xns" : "Roo",
41    "height" : 700,
42    "items" : [
43     {
44      "xtype" : "LayoutRegion",
45      "tabPosition" : "top",
46      "$ xns" : "Roo",
47      "* prop" : "center"
48     },
49     {
50      "region" : "center",
51      "xtype" : "NestedLayoutPanel",
52      "title" : "Log Time",
53      "$ xns" : "Roo",
54      "items" : [
55       {
56        "xtype" : "BorderLayout",
57        "$ xns" : "Roo",
58        "* prop" : "layout",
59        "items" : [
60         {
61          "xtype" : "LayoutRegion",
62          "width" : 600,
63          "$ xns" : "Roo",
64          "split" : true,
65          "* prop" : "west"
66         },
67         {
68          "xtype" : "LayoutRegion",
69          "title" : "Active / Logged Time",
70          "$ xns" : "Roo",
71          "* prop" : "center"
72         },
73         {
74          "collapsedTitle" : "Ticket Details",
75          "collapsible" : true,
76          "title" : "Ticket Details",
77          "xtype" : "LayoutRegion",
78          "collapsed" : true,
79          "width" : 350,
80          "$ xns" : "Roo",
81          "split" : true,
82          "* prop" : "east"
83         },
84         {
85          "listeners" : {
86           "|activate" : "function() {\n    _this.timepanel = this;\n    if (_this.timegrid) {\n       // _this.grid.footer.onClick('first');\n    }\n}"
87          },
88          "fitToframe" : true,
89          "background" : true,
90          "region" : "west",
91          "title" : "cash_invoice_entry",
92          "xtype" : "GridPanel",
93          "fitContainer" : true,
94          "$ xns" : "Roo",
95          "tableName" : "cash_invoice_entry",
96          "items" : [
97           {
98            "listeners" : {
99             "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
100             "|render" : "function() \n{\n    _this.timegrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.timepanel.active) {\n      // this.footer.onClick('first');\n    }\n}"
101            },
102            "autoExpandColumn" : "activity_ref",
103            "xtype" : "Grid",
104            "loadMask" : true,
105            "$ xns" : "Roo.grid",
106            "* prop" : "grid",
107            "items" : [
108             {
109              "xtype" : "Toolbar",
110              "$ xns" : "Roo",
111              "* prop" : "toolbar",
112              "items" : [
113               {
114                "listeners" : {
115                 "render" : "function (_self)\n{\n        _this.personSelect = _self;\n}"
116                },
117                "listWidth" : 400,
118                "triggerAction" : "all",
119                "fieldLabel" : "Person",
120                "forceSelection" : true,
121                "selectOnFocus" : true,
122                "pageSize" : 20,
123                "displayField" : "name",
124                "emptyText" : "Select Person",
125                "hiddenName" : "",
126                "minChars" : 2,
127                "valueField" : "id",
128                "xtype" : "ComboBox",
129                "allowBlank" : false,
130                "typeAhead" : true,
131                "editable" : false,
132                "width" : 300,
133                "$ xns" : "Roo.form",
134                "name" : "",
135                "qtip" : "Select Person",
136                "queryParam" : "",
137                "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> {email} </div>",
138                "loadingText" : "Searching...",
139                "items" : [
140                 {
141                  "listeners" : {
142                   "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params.company_id_comptype = 'OWNER';\n}\n"
143                  },
144                  "xtype" : "Store",
145                  "remoteSort" : true,
146                  "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
147                  "$ xns" : "Roo.data",
148                  "* prop" : "store",
149                  "items" : [
150                   {
151                    "$ url" : "baseURL + '/Roo/Person.php'",
152                    "method" : "GET",
153                    "xtype" : "HttpProxy",
154                    "$ xns" : "Roo.data",
155                    "* prop" : "proxy"
156                   },
157                   {
158                    "id" : "id",
159                    "root" : "data",
160                    "xtype" : "JsonReader",
161                    "$ xns" : "Roo.data",
162                    "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
163                    "* prop" : "reader",
164                    "totalProperty" : "total"
165                   }
166                  ]
167                 }
168                ]
169               }
170              ]
171             },
172             {
173              "xtype" : "Store",
174              "remoteSort" : true,
175              "$ sortInfo" : "{ field : 'action_dt', direction: 'DESC' }",
176              "$ xns" : "Roo.data",
177              "* prop" : "dataSource",
178              "items" : [
179               {
180                "listeners" : {
181                 "beforeload" : "function (This, params)\n{\n   if (_this.personSelect.getValue()) {\n        params.person_id = _this.personSelect.getValue();\n    } else {\n        params.person_id = Pman.Login.authUser.id;\n    }\n    \n    \n}"
182                },
183                "$ url" : "baseURL + '/Roo/cash_invoice_entry.php'",
184                "xtype" : "HttpProxy",
185                "method" : "GET",
186                "$ xns" : "Roo.data",
187                "* prop" : "proxy"
188               },
189               {
190                "id" : "id",
191                "root" : "data",
192                "xtype" : "JsonReader",
193                "$ xns" : "Roo.data",
194                "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'entry_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'entered_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'qty',\n        'type': 'string'\n    },\n    {\n        'name': 'invoice_id',\n        'type': 'int'\n    },\n    {\n        'name': 'pricevalue',\n        'type': 'float'\n    },\n    {\n        'name': 'qtyvalue',\n        'type': 'float'\n    },\n    {\n        'name': 'to_account_id',\n        'type': 'int'\n    },\n    {\n        'name': 'discount',\n        'type': 'float'\n    },\n    {\n        'name': 'action_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'staff_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invoice_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invoice_id_idtxt',\n        'type': 'string'\n    },\n    {\n        'name': 'invoice_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invoice_id_opened_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'invoice_id_posted',\n        'type': 'date'\n    },\n    {\n        'name': 'invoice_id_post_transaction_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invoice_id_post_account_id',\n        'type': 'int'\n    },\n    {\n        'name': 'invoice_id_paid',\n        'type': 'float'\n    },\n    {\n        'name': 'invoice_id_total',\n        'type': 'float'\n    },\n    {\n        'name': 'invoice_id_duedate',\n        'type': 'date'\n    },\n    {\n        'name': 'to_account_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'to_account_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'to_account_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'to_account_id_commodity',\n        'type': 'string'\n    },\n    {\n        'name': 'to_account_id_scu',\n        'type': 'string'\n    },\n    {\n        'name': 'to_account_id_description',\n        'type': 'string'\n    },\n    {\n        'name': 'to_account_id_parent',\n        'type': 'int'\n    },\n    {\n        'name': 'to_account_id_fullname',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'staff_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'staff_id_deleted_dt',\n        'type': 'date'\n    }\n]",
195                "* prop" : "reader",
196                "totalProperty" : "total"
197               }
198              ]
199             },
200             {
201              "xtype" : "ColumnModel",
202              "header" : "Time",
203              "width" : 100,
204              "$ renderer" : "function(v,x,r) { \n    var s = r.data.qtyvalue;\n    var end = v.add(Date.HOUR, s);\n    return String.format('{0} {1}-{2}',\n         v.format('D'), v.format('H:i'), end.format('H:i') );\n}",
205              "$ xns" : "Roo.grid",
206              "* prop" : "colModel[]",
207              "dataIndex" : "action_dt"
208             },
209             {
210              "xtype" : "ColumnModel",
211              "header" : "Ticket",
212              "width" : 200,
213              "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
214              "$ xns" : "Roo.grid",
215              "* prop" : "colModel[]",
216              "dataIndex" : "ticket_id_summary"
217             },
218             {
219              "xtype" : "ColumnModel",
220              "header" : "Notes",
221              "width" : 300,
222              "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
223              "$ xns" : "Roo.grid",
224              "* prop" : "colModel[]",
225              "dataIndex" : "notes"
226             }
227            ]
228           }
229          ]
230         },
231         {
232          "region" : "center",
233          "xtype" : "NestedLayoutPanel",
234          "$ xns" : "Roo",
235          "items" : [
236           {
237            "xtype" : "BorderLayout",
238            "$ xns" : "Roo",
239            "* prop" : "layout",
240            "items" : [
241             {
242              "xtype" : "LayoutRegion",
243              "$ xns" : "Roo",
244              "* prop" : "north",
245              "height" : 200
246             },
247             {
248              "xtype" : "LayoutRegion",
249              "title" : "Task Queue",
250              "$ xns" : "Roo",
251              "* prop" : "center"
252             },
253             {
254              "listeners" : {
255               "|activate" : "function() {\n    _this.queuepanel = this;\n    if (_this.queuegrid) {\n        //_this.queuegrid.footer.onClick('first');\n    }\n}"
256              },
257              "fitToframe" : true,
258              "background" : true,
259              "region" : "center",
260              "title" : "mtrack_ticket",
261              "xtype" : "GridPanel",
262              "fitContainer" : true,
263              "$ xns" : "Roo",
264              "tableName" : "mtrack_ticket",
265              "items" : [
266               {
267                "listeners" : {
268                 "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
269                 "|render" : "function() \n{\n    _this.queuegrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.queuepanel.active) {\n       //this.footer.onClick('first');\n    }\n}"
270                },
271                "autoExpandColumn" : "summary",
272                "xtype" : "Grid",
273                "loadMask" : true,
274                "$ xns" : "Roo.grid",
275                "* prop" : "grid",
276                "items" : [
277                 {
278                  "xtype" : "Toolbar",
279                  "$ xns" : "Roo",
280                  "* prop" : "toolbar",
281                  "items" : [
282                   {
283                    "listeners" : {
284                     "render" : "function (_self)\n{\n    _this.projectSel = _self;\n}",
285                     "beforeselect" : "function (combo, record, index)\n{\n\n     \n    _this.queuegrid.ds.load({});\n    \n      \n     \n}"
286                    },
287                    "listWidth" : 400,
288                    "triggerAction" : "all",
289                    "fieldLabel" : "Project",
290                    "forceSelection" : true,
291                    "selectOnFocus" : true,
292                    "pageSize" : 20,
293                    "displayField" : "name",
294                    "emptyText" : "Select Project",
295                    "hiddenName" : "project_id",
296                    "minChars" : 2,
297                    "valueField" : "id",
298                    "xtype" : "ComboBox",
299                    "allowBlank" : false,
300                    "typeAhead" : true,
301                    "editable" : false,
302                    "width" : 200,
303                    "$ xns" : "Roo.form",
304                    "name" : "project_id_name",
305                    "qtip" : "Select Projects",
306                    "queryParam" : "query[name]",
307                    "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> - {name}</div>",
308                    "loadingText" : "Searching...",
309                    "items" : [
310                     {
311                      "listeners" : {
312                       "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    o.params['query[project_filter]'] = 'P,N,U'; // actually this is the default.\n    \n    // set more here\n}\n"
313                      },
314                      "xtype" : "Store",
315                      "remoteSort" : true,
316                      "$ sortInfo" : "{ field: 'code', direction: 'ASC' }",
317                      "$ xns" : "Roo.data",
318                      "* prop" : "store",
319                      "items" : [
320                       {
321                        "$ url" : "baseURL + '/Roo/Projects.php'",
322                        "method" : "GET",
323                        "xtype" : "HttpProxy",
324                        "$ xns" : "Roo.data",
325                        "* prop" : "proxy"
326                       },
327                       {
328                        "id" : "id",
329                        "root" : "data",
330                        "xtype" : "JsonReader",
331                        "$ xns" : "Roo.data",
332                        "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
333                        "* prop" : "reader",
334                        "totalProperty" : "total"
335                       }
336                      ]
337                     }
338                    ]
339                   }
340                  ]
341                 },
342                 {
343                  "remoteSort" : true,
344                  "xtype" : "Store",
345                  "$ sortInfo" : "{ field : 'summary', direction: 'ASC' }",
346                  "$ xns" : "Roo.data",
347                  "* prop" : "dataSource",
348                  "items" : [
349                   {
350                    "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
351                    "method" : "GET",
352                    "xtype" : "HttpProxy",
353                    "$ xns" : "Roo.data",
354                    "* prop" : "proxy"
355                   },
356                   {
357                    "id" : "id",
358                    "root" : "data",
359                    "xtype" : "JsonReader",
360                    "$ xns" : "Roo.data",
361                    "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    } /*,\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'summary',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'changelog',\n        'type': 'string'\n    },\n    {\n        'name': 'created',\n        'type': 'int'\n    },\n    {\n        'name': 'updated',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id',\n        'type': 'int'\n    },\n    {\n        'name': 'cc',\n        'type': 'string'\n    },\n    {\n        'name': 'status',\n        'type': 'int'\n    },\n    {\n        'name': 'estimated',\n        'type': 'float'\n    },\n    {\n        'name': 'spent',\n        'type': 'float'\n    },\n    {\n        'name': 'x_fieldname',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'updated_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'created_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'created_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'created_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'created_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'developer_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'priority_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'priority_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'priority_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'severity_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'severity_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'classification_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'classification_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'resolution_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'resolution_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'status_id',\n        'type': 'int'\n    },\n    {\n        'name': 'status_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'status_name',\n        'type': 'string'\n    },\n    {\n        'name': 'status_active',\n        'type': 'int'\n    },\n    {\n        'name': 'status_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_client_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_team_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_file_location',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_open_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_open_by',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_close_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_countries',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_languages',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_agency_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'milestone_id_description',\n        'type': 'string'\n    },\n    {\n        'name': 'milestone_id_startdate',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_duedate',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_completed',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_deleted',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_created',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_updated',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_project_id',\n        'type': 'int'\n    } */\n]",
362                    "* prop" : "reader",
363                    "totalProperty" : "total"
364                   }
365                  ]
366                 },
367                 {
368                  "xtype" : "ColumnModel",
369                  "width" : 200,
370                  "header" : "Summary",
371                  "$ renderer" : "function(v) { return String.format('{0}', v); }",
372                  "$ xns" : "Roo.grid",
373                  "* prop" : "colModel[]",
374                  "dataIndex" : "summary"
375                 }
376                ]
377               }
378              ]
379             },
380             {
381              "region" : "north",
382              "xtype" : "ContentPanel",
383              "$ xns" : "Roo",
384              "items" : [
385               {
386                "xtype" : "Toolbar",
387                "$ xns" : "Roo",
388                "* prop" : "toolbar",
389                "items" : [
390                 {
391                  "text" : "Working on this",
392                  "xtype" : "Button",
393                  "$ xns" : "Roo.Toolbar"
394                 },
395                 {
396                  "text" : "Completed",
397                  "xtype" : "Button",
398                  "$ xns" : "Roo.Toolbar"
399                 },
400                 {
401                  "text" : "Not on Project work",
402                  "xtype" : "Button",
403                  "$ xns" : "Roo.Toolbar"
404                 }
405                ]
406               },
407               {
408                "listeners" : {
409                 "|actioncomplete" : "function(_self,action)\n{\n    \n \n    Roo.log('action complete');\n    Roo.log(action);\n    if (action.type == 'setdata') {\n\n        _this.isClose = false; // force flag..\n        \n        if (this.activeRecord) {\n             this.saveActive( this.activeRecord);\n        }\n        \n        \n         \n        // show form..\n        if (!action.data || !action.data.action) {\n            _this.form.el.mask('select something'); \n            this.activeRecord  = false;\n            _this.form.reset(); \n            return;\n        }\n        _this.form.el.unmask();   \n        \n        this.activeRecord = action.rec;\n         \n        \n\n            \n        \n        // should save here if we are 'dirty!';\n        _this.form.reset();\n        _this.form.setValues(action.data);\n        // set the dates so they are correct..\n         _this.form.setValues( { \n \n                action_dt : action.data.action_dt.format('Y-m-d H:i:s'),\n                entry_dt: action.data.action_dt.format('Y-m-d'),\n                qtyvalue2 : action.data.qtyvalue\n            });\n        // set the default values..\n        // for dirty test...\n        _this.form.items.each(function(f) {\n            f.originalValue = f.getValue();\n        });\n        \n        \n        \n        \n        // form is set to an event.\n        \n                \n        \n       return;\n    }\n    \n    \n    if (action.type == 'load') {\n \n        return;\n    }\n    if (action.type =='submit') {\n        // set this on the close button..\n         if (_this.isClose) {\n            _this.dialog.hide();\n         }\n        \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n\n         return;\n    }\n}\n",
410                 "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
411                },
412                "$ url" : "baseURL + '/Roo/cash_invoice_entry.php'",
413                "$ saveActive" : "function(rec, effort) {\n    \n     effort = effort || 0;\n    \n\n    if (!rec) {\n        Roo.log(\"ERROR: saveActive: record not set \");\n        return;\n    }\n\n     var d = Roo.apply({}, rec.data); // copy it so changes do not affect crap...\n     \n     var upd = (new Date()).format('Y-m-d H:i:s');\n     \n \n     \n     \n     //Roo.log(\"SAVE IT: \" + Roo.encode(d) );\n     \n     //     return;\n     var at = typeof(d.action_dt) == 'string' ? Date.parseDate(d.action_dt, 'Y-m-d H:i:s') : d.action_dt;\n     \n     new Pman.Request({\n        url : baseURL + '/Roo/Cash_invoice_entry.php',\n        method : 'POST',\n        params : {\n            id : d.id,\n            entry_dt: at.format('Y-m-d'),  // this should not change for posted entries really...\n            entered_dt: upd,            \n            action_dt : at.format('Y-m-d H:i:s'),\n            qtyvalue : d.qtyvalue,\n            action: 'Hours',\n            description: d.description,\n            pricevalue: d.pricevalue,  \n            project_id : d.project_id,\n            staff_id : d.staff_id * 1 ? d.staff_id : Pman.Login.authUser.id,\n            ticket_id : d.ticket_id ? d.ticket_id : 0\n            \n        },\n        success : function(res)\n        {\n            // everythings fine..\n            \n            // we have to update the view object... now...\n            // we can not reload as that may blank out data..\n            if (!rec.data.id) {\n                Roo.log(\"Setting data id to \" + res.data.id);\n                rec.set('id', res.data.id);\n\n            }\n\n            \n        },\n        failure : function()\n        {\n            effort++;\n            if (effort > 3) {\n                Roo.MessageBox.alert(\"Error\", \"Saving timesheet failed\");\n                return;\n            }\n            _this.form.saveActive(rec, effort);\n        }\n        \n     });\n}\n",
414                "activeData" : false,
415                "style" : "margin-left:10px;",
416                "method" : "POST",
417                "xtype" : "Form",
418                "$ xns" : "Roo.form",
419                "items" : [
420                 {
421                  "listeners" : {
422                   "render" : "function (_self)\n{\n    _this.projectSel = _self;\n}",
423                   "beforeselect" : "function (combo, record, index)\n{\n\n    Roo.log('save it');\n    var sel = _this.grid.ds.selectedBar();\n \n    if (!sel) {\n        Roo.log(\"nothing selected?\");\n        return;\n    }\n     \n    // active record should be the same thing.\n    sel.set('project_id', record.data.id);\n    sel.set('project_id_code',     record.data.code);\n    sel.set('project_id_name',   record.data.name);\n    \n    \n    _this.grid.ds.updateBar(sel);\n    \n      \n     \n}"
424                  },
425                  "listWidth" : 400,
426                  "triggerAction" : "all",
427                  "fieldLabel" : "Project",
428                  "forceSelection" : true,
429                  "selectOnFocus" : true,
430                  "pageSize" : 20,
431                  "displayField" : "name",
432                  "emptyText" : "Select Project",
433                  "hiddenName" : "project_id",
434                  "minChars" : 2,
435                  "valueField" : "id",
436                  "xtype" : "ComboBox",
437                  "allowBlank" : false,
438                  "typeAhead" : true,
439                  "editable" : false,
440                  "width" : 200,
441                  "$ xns" : "Roo.form",
442                  "name" : "project_id_name",
443                  "qtip" : "Select Projects",
444                  "queryParam" : "query[name]",
445                  "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> - {name}</div>",
446                  "loadingText" : "Searching...",
447                  "items" : [
448                   {
449                    "listeners" : {
450                     "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    o.params['query[project_filter]'] = 'P,N,U'; // actually this is the default.\n    \n    // set more here\n}\n"
451                    },
452                    "xtype" : "Store",
453                    "remoteSort" : true,
454                    "$ sortInfo" : "{ field: 'code', direction: 'ASC' }",
455                    "$ xns" : "Roo.data",
456                    "* prop" : "store",
457                    "items" : [
458                     {
459                      "$ url" : "baseURL + '/Roo/Projects.php'",
460                      "method" : "GET",
461                      "xtype" : "HttpProxy",
462                      "$ xns" : "Roo.data",
463                      "* prop" : "proxy"
464                     },
465                     {
466                      "id" : "id",
467                      "root" : "data",
468                      "xtype" : "JsonReader",
469                      "$ xns" : "Roo.data",
470                      "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
471                      "* prop" : "reader",
472                      "totalProperty" : "total"
473                     }
474                    ]
475                   }
476                  ]
477                 },
478                 {
479                  "labelAlign" : "top",
480                  "xtype" : "Column",
481                  "width" : 300,
482                  "$ xns" : "Roo.form",
483                  "items" : [
484                   {
485                    "listeners" : {
486                     "keyup" : "function (_self, e)\n{\n    _this.selectedRec.set('description',   this.getValue());\n    _this.grid.dataSource.updateBar(_this.selectedRec);\n \n}"
487                    },
488                    "fieldLabel" : "Description",
489                    "xtype" : "TextArea",
490                    "width" : 300,
491                    "$ xns" : "Roo.form",
492                    "name" : "description",
493                    "height" : 120
494                   }
495                  ]
496                 },
497                 {
498                  "xtype" : "Hidden",
499                  "$ xns" : "Roo.form",
500                  "name" : "action"
501                 },
502                 {
503                  "xtype" : "Hidden",
504                  "$ xns" : "Roo.form",
505                  "name" : "staff_id"
506                 },
507                 {
508                  "xtype" : "Hidden",
509                  "$ xns" : "Roo.form",
510                  "name" : "qtyvalue"
511                 },
512                 {
513                  "xtype" : "Hidden",
514                  "$ xns" : "Roo.form",
515                  "name" : "qtyvalue2"
516                 },
517                 {
518                  "xtype" : "Hidden",
519                  "$ xns" : "Roo.form",
520                  "name" : "entry_dt"
521                 },
522                 {
523                  "xtype" : "Hidden",
524                  "$ xns" : "Roo.form",
525                  "name" : "action_dt"
526                 },
527                 {
528                  "xtype" : "Hidden",
529                  "$ xns" : "Roo.form",
530                  "name" : "id"
531                 }
532                ]
533               }
534              ]
535             }
536            ]
537           }
538          ]
539         }
540        ]
541       }
542      ]
543     },
544     {
545      "region" : "center",
546      "xtype" : "NestedLayoutPanel",
547      "title" : "Plan Time",
548      "$ xns" : "Roo",
549      "items" : [
550       {
551        "xtype" : "BorderLayout",
552        "$ xns" : "Roo",
553        "* prop" : "layout",
554        "items" : [
555         {
556          "title" : "Open Tasks (Unassigned) / Select Project",
557          "xtype" : "LayoutRegion",
558          "width" : 450,
559          "$ xns" : "Roo",
560          "* prop" : "west"
561         },
562         {
563          "xtype" : "LayoutRegion",
564          "title" : "Assigned to  / Prioritized (all projects)",
565          "$ xns" : "Roo",
566          "* prop" : "center"
567         },
568         {
569          "listeners" : {
570           "|activate" : "function() {\n    _this.openpanel = this;\n    if (_this.opengrid) {\n   //    _this.opengrid.footer.onClick('first');\n    }\n}"
571          },
572          "fitToframe" : true,
573          "background" : false,
574          "region" : "west",
575          "title" : "mtrack_ticket",
576          "xtype" : "GridPanel",
577          "fitContainer" : true,
578          "$ xns" : "Roo",
579          "tableName" : "mtrack_ticket",
580          "items" : [
581           {
582            "listeners" : {
583             "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
584             "|render" : "function() \n{\n    _this.opengrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.openpanel.active) {\n       //this.footer.onClick('first');\n    }\n}"
585            },
586            "autoExpandColumn" : "summary",
587            "xtype" : "Grid",
588            "loadMask" : true,
589            "$ xns" : "Roo.grid",
590            "* prop" : "grid",
591            "items" : [
592             {
593              "xtype" : "Toolbar",
594              "$ xns" : "Roo",
595              "* prop" : "toolbar",
596              "items" : [
597               {
598                "listWidth" : 400,
599                "triggerAction" : "all",
600                "fieldLabel" : "mtrack_ticket",
601                "forceSelection" : true,
602                "selectOnFocus" : true,
603                "pageSize" : 20,
604                "emptyText" : "Select Project",
605                "displayField" : "",
606                "hiddenName" : "",
607                "minChars" : 2,
608                "valueField" : "id",
609                "xtype" : "ComboBox",
610                "typeAhead" : true,
611                "editable" : false,
612                "width" : 300,
613                "$ xns" : "Roo.form",
614                "name" : "",
615                "qtip" : "Select mtrack_ticket",
616                "queryParam" : "",
617                "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
618                "loadingText" : "Searching...",
619                "items" : [
620                 {
621                  "listeners" : {
622                   "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
623                  },
624                  "xtype" : "Store",
625                  "remoteSort" : true,
626                  "$ xns" : "Roo.data",
627                  "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
628                  "* prop" : "store",
629                  "items" : [
630                   {
631                    "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
632                    "method" : "GET",
633                    "xtype" : "HttpProxy",
634                    "$ xns" : "Roo.data",
635                    "* prop" : "proxy"
636                   },
637                   {
638                    "id" : "id",
639                    "root" : "data",
640                    "xtype" : "JsonReader",
641                    "$ xns" : "Roo.data",
642                    "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"summary\",\"type\":\"string\"}]",
643                    "* prop" : "reader",
644                    "totalProperty" : "total"
645                   }
646                  ]
647                 }
648                ]
649               }
650              ]
651             },
652             {
653              "remoteSort" : true,
654              "xtype" : "Store",
655              "$ sortInfo" : "{ field : 'summary', direction: 'ASC' }",
656              "$ xns" : "Roo.data",
657              "* prop" : "dataSource",
658              "items" : [
659               {
660                "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
661                "method" : "GET",
662                "xtype" : "HttpProxy",
663                "$ xns" : "Roo.data",
664                "* prop" : "proxy"
665               },
666               {
667                "id" : "id",
668                "root" : "data",
669                "xtype" : "JsonReader",
670                "$ xns" : "Roo.data",
671                "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'summary',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'changelog',\n        'type': 'string'\n    },\n    {\n        'name': 'created',\n        'type': 'int'\n    },\n    {\n        'name': 'updated',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id',\n        'type': 'int'\n    },\n    {\n        'name': 'cc',\n        'type': 'string'\n    },\n    {\n        'name': 'status',\n        'type': 'int'\n    },\n    {\n        'name': 'estimated',\n        'type': 'float'\n    },\n    {\n        'name': 'spent',\n        'type': 'float'\n    },\n    {\n        'name': 'x_fieldname',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'updated_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'created_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'created_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'created_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'created_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'developer_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'priority_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'priority_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'priority_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'severity_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'severity_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'classification_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'classification_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'resolution_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'resolution_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'status_id',\n        'type': 'int'\n    },\n    {\n        'name': 'status_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'status_name',\n        'type': 'string'\n    },\n    {\n        'name': 'status_active',\n        'type': 'int'\n    },\n    {\n        'name': 'status_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_client_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_team_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_file_location',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_open_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_open_by',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_close_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_countries',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_languages',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_agency_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'milestone_id_description',\n        'type': 'string'\n    },\n    {\n        'name': 'milestone_id_startdate',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_duedate',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_completed',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_deleted',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_created',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_updated',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_project_id',\n        'type': 'int'\n    }\n]",
672                "* prop" : "reader",
673                "totalProperty" : "total"
674               }
675              ]
676             },
677             {
678              "xtype" : "ColumnModel",
679              "width" : 200,
680              "header" : "Summary",
681              "$ renderer" : "function(v) { return String.format('{0}', v); }",
682              "$ xns" : "Roo.grid",
683              "* prop" : "colModel[]",
684              "dataIndex" : "summary"
685             }
686            ]
687           }
688          ]
689         },
690         {
691          "listeners" : {
692           "|activate" : "function() {\n    _this.openpanel = this;\n    if (_this.opengrid) {\n   //    _this.opengrid.footer.onClick('first');\n    }\n}"
693          },
694          "fitToframe" : true,
695          "background" : false,
696          "region" : "center",
697          "title" : "mtrack_ticket",
698          "xtype" : "GridPanel",
699          "fitContainer" : true,
700          "$ xns" : "Roo",
701          "tableName" : "mtrack_ticket",
702          "items" : [
703           {
704            "listeners" : {
705             "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
706             "|render" : "function() \n{\n    _this.opengrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.openpanel.active) {\n       //this.footer.onClick('first');\n    }\n}"
707            },
708            "autoExpandColumn" : "summary",
709            "xtype" : "Grid",
710            "loadMask" : true,
711            "$ xns" : "Roo.grid",
712            "* prop" : "grid",
713            "items" : [
714             {
715              "xtype" : "Toolbar",
716              "$ xns" : "Roo",
717              "* prop" : "toolbar",
718              "items" : [
719               {
720                "listWidth" : 400,
721                "triggerAction" : "all",
722                "fieldLabel" : "mtrack_ticket",
723                "forceSelection" : true,
724                "selectOnFocus" : true,
725                "pageSize" : 20,
726                "emptyText" : "Select Person",
727                "displayField" : "",
728                "hiddenName" : "",
729                "minChars" : 2,
730                "valueField" : "id",
731                "xtype" : "ComboBox",
732                "typeAhead" : true,
733                "editable" : false,
734                "width" : 300,
735                "$ xns" : "Roo.form",
736                "name" : "",
737                "qtip" : "Select mtrack_ticket",
738                "queryParam" : "",
739                "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
740                "loadingText" : "Searching...",
741                "items" : [
742                 {
743                  "listeners" : {
744                   "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
745                  },
746                  "xtype" : "Store",
747                  "remoteSort" : true,
748                  "$ xns" : "Roo.data",
749                  "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
750                  "* prop" : "store",
751                  "items" : [
752                   {
753                    "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
754                    "method" : "GET",
755                    "xtype" : "HttpProxy",
756                    "$ xns" : "Roo.data",
757                    "* prop" : "proxy"
758                   },
759                   {
760                    "id" : "id",
761                    "root" : "data",
762                    "xtype" : "JsonReader",
763                    "$ xns" : "Roo.data",
764                    "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"summary\",\"type\":\"string\"}]",
765                    "* prop" : "reader",
766                    "totalProperty" : "total"
767                   }
768                  ]
769                 }
770                ]
771               }
772              ]
773             },
774             {
775              "remoteSort" : true,
776              "xtype" : "Store",
777              "$ sortInfo" : "{ field : 'summary', direction: 'ASC' }",
778              "$ xns" : "Roo.data",
779              "* prop" : "dataSource",
780              "items" : [
781               {
782                "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
783                "method" : "GET",
784                "xtype" : "HttpProxy",
785                "$ xns" : "Roo.data",
786                "* prop" : "proxy"
787               },
788               {
789                "id" : "id",
790                "root" : "data",
791                "xtype" : "JsonReader",
792                "$ xns" : "Roo.data",
793                "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'summary',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'changelog',\n        'type': 'string'\n    },\n    {\n        'name': 'created',\n        'type': 'int'\n    },\n    {\n        'name': 'updated',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id',\n        'type': 'int'\n    },\n    {\n        'name': 'cc',\n        'type': 'string'\n    },\n    {\n        'name': 'status',\n        'type': 'int'\n    },\n    {\n        'name': 'estimated',\n        'type': 'float'\n    },\n    {\n        'name': 'spent',\n        'type': 'float'\n    },\n    {\n        'name': 'x_fieldname',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'updated_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'created_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'created_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'created_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'created_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'owner_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'owner_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'developer_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'developer_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'developer_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'priority_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'priority_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'priority_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'priority_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'severity_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'severity_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'severity_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'classification_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'classification_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'classification_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'resolution_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'resolution_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'resolution_id_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'status_id',\n        'type': 'int'\n    },\n    {\n        'name': 'status_etype',\n        'type': 'string'\n    },\n    {\n        'name': 'status_name',\n        'type': 'string'\n    },\n    {\n        'name': 'status_active',\n        'type': 'int'\n    },\n    {\n        'name': 'status_seqid',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_code',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_client_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_team_id',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_file_location',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_open_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_open_by',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id_close_date',\n        'type': 'date'\n    },\n    {\n        'name': 'project_id_countries',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_languages',\n        'type': 'string'\n    },\n    {\n        'name': 'project_id_agency_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'milestone_id_description',\n        'type': 'string'\n    },\n    {\n        'name': 'milestone_id_startdate',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_duedate',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_completed',\n        'type': 'date'\n    },\n    {\n        'name': 'milestone_id_deleted',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_created',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_updated',\n        'type': 'int'\n    },\n    {\n        'name': 'milestone_id_project_id',\n        'type': 'int'\n    }\n]",
794                "* prop" : "reader",
795                "totalProperty" : "total"
796               }
797              ]
798             },
799             {
800              "xtype" : "ColumnModel",
801              "width" : 200,
802              "header" : "Summary",
803              "$ renderer" : "function(v) { return String.format('{0}', v); }",
804              "$ xns" : "Roo.grid",
805              "* prop" : "colModel[]",
806              "dataIndex" : "summary"
807             }
808            ]
809           }
810          ]
811         }
812        ]
813       }
814      ]
815     }
816    ]
817   }
818  ]
819 }