Pman.Dialog.MTrackTime.bjs
[Pman.MTrack] / Pman.Dialog.MTrackTime.bjs
1 {
2     "id": "roo-file-194",
3     "name": "Pman.Dialog.MTrackTime",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackTime.bjs",
7     "items": [
8         {
9             "height": 700,
10             "title": "Time Manager",
11             "width": 1000,
12             "xtype": "LayoutDialog",
13             "|xns": "Roo",
14             "items": [
15                 {
16                     "*prop": "center",
17                     "tabPosition": "top",
18                     "xtype": "LayoutRegion",
19                     "|xns": "Roo"
20                 },
21                 {
22                     "region": "center",
23                     "title": "Log Time",
24                     "xtype": "NestedLayoutPanel",
25                     "|xns": "Roo",
26                     "items": [
27                         {
28                             "|xns": "Roo",
29                             "xtype": "BorderLayout",
30                             "*prop": "layout",
31                             "items": [
32                                 {
33                                     "*prop": "west",
34                                     "width": 350,
35                                     "xtype": "LayoutRegion",
36                                     "|xns": "Roo"
37                                 },
38                                 {
39                                     "*prop": "center",
40                                     "title": "Active / Logged Time",
41                                     "xtype": "LayoutRegion",
42                                     "|xns": "Roo"
43                                 },
44                                 {
45                                     "*prop": "true",
46                                     "collapsed": true,
47                                     "width": 350,
48                                     "xtype": "LayoutRegion",
49                                     "|xns": "Roo"
50                                 },
51                                 {
52                                     "listeners": {
53                                         "|activate": "function() {\n    _this.timepanel = this;\n    if (_this.timegrid) {\n       // _this.grid.footer.onClick('first');\n    }\n}"
54                                     },
55                                     "background": true,
56                                     "fitContainer": true,
57                                     "fitToframe": true,
58                                     "region": "west",
59                                     "tableName": "cash_invoice_entry",
60                                     "title": "cash_invoice_entry",
61                                     "xtype": "GridPanel",
62                                     "|xns": "Roo",
63                                     "items": [
64                                         {
65                                             "listeners": {
66                                                 "|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}",
67                                                 "|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"
68                                             },
69                                             "*prop": "grid",
70                                             "autoExpandColumn": "activity_ref",
71                                             "loadMask": true,
72                                             "xtype": "Grid",
73                                             "|xns": "Roo.grid",
74                                             "items": [
75                                                 {
76                                                     "|xns": "Roo",
77                                                     "xtype": "Toolbar",
78                                                     "*prop": "toolbar",
79                                                     "items": [
80                                                         {
81                                                             "|xns": "Roo.form",
82                                                             "xtype": "ComboBox",
83                                                             "allowBlank": "false",
84                                                             "editable": "false",
85                                                             "emptyText": "Select Person",
86                                                             "forceSelection": true,
87                                                             "listWidth": 400,
88                                                             "loadingText": "Searching...",
89                                                             "minChars": 2,
90                                                             "pageSize": 20,
91                                                             "qtip": "Select Person",
92                                                             "selectOnFocus": true,
93                                                             "triggerAction": "all",
94                                                             "typeAhead": true,
95                                                             "width": 300,
96                                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
97                                                             "queryParam": "",
98                                                             "fieldLabel": "Person",
99                                                             "valueField": "id",
100                                                             "displayField": "",
101                                                             "hiddenName": "",
102                                                             "name": "",
103                                                             "items": [
104                                                                 {
105                                                                     "*prop": "store",
106                                                                     "xtype": "Store",
107                                                                     "|xns": "Roo.data",
108                                                                     "remoteSort": true,
109                                                                     "|sortInfo": "{ direction : 'ASC', field: 'id' }",
110                                                                     "listeners": {
111                                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
112                                                                     },
113                                                                     "items": [
114                                                                         {
115                                                                             "*prop": "proxy",
116                                                                             "xtype": "HttpProxy",
117                                                                             "method": "GET",
118                                                                             "|xns": "Roo.data",
119                                                                             "|url": "baseURL + '/Roo/Person.php'"
120                                                                         },
121                                                                         {
122                                                                             "*prop": "reader",
123                                                                             "xtype": "JsonReader",
124                                                                             "|xns": "Roo.data",
125                                                                             "id": "id",
126                                                                             "root": "data",
127                                                                             "totalProperty": "total",
128                                                                             "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
129                                                                         }
130                                                                     ]
131                                                                 }
132                                                             ]
133                                                         }
134                                                     ]
135                                                 },
136                                                 {
137                                                     "*prop": "dataSource",
138                                                     "xtype": "Store",
139                                                     "remoteSort": true,
140                                                     "|sortInfo": "{ field : 'description', direction: 'ASC' }",
141                                                     "|xns": "Roo.data",
142                                                     "items": [
143                                                         {
144                                                             "*prop": "proxy",
145                                                             "xtype": "HttpProxy",
146                                                             "method": "GET",
147                                                             "|url": "baseURL + '/Roo/cash_invoice_entry.php'",
148                                                             "|xns": "Roo.data"
149                                                         },
150                                                         {
151                                                             "|xns": "Roo.data",
152                                                             "xtype": "JsonReader",
153                                                             "totalProperty": "total",
154                                                             "root": "data",
155                                                             "*prop": "reader",
156                                                             "id": "id",
157                                                             "|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]"
158                                                         }
159                                                     ]
160                                                 },
161                                                 {
162                                                     "*prop": "colModel[]",
163                                                     "dataIndex": "hour",
164                                                     "header": "Hour",
165                                                     "width": 50,
166                                                     "xtype": "ColumnModel",
167                                                     "|renderer": "function(v) { return String.format('{0}', v); }",
168                                                     "|xns": "Roo.grid"
169                                                 },
170                                                 {
171                                                     "*prop": "colModel[]",
172                                                     "dataIndex": "activity_ref",
173                                                     "header": "Activity",
174                                                     "width": 300,
175                                                     "xtype": "ColumnModel",
176                                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
177                                                     "|xns": "Roo.grid"
178                                                 },
179                                                 {
180                                                     "*prop": "colModel[]",
181                                                     "dataIndex": "entered_dt",
182                                                     "header": "Timesheet",
183                                                     "width": 300,
184                                                     "xtype": "ColumnModel",
185                                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
186                                                     "|xns": "Roo.grid"
187                                                 }
188                                             ]
189                                         }
190                                     ]
191                                 },
192                                 {
193                                     "region": "center",
194                                     "xtype": "NestedLayoutPanel",
195                                     "|xns": "Roo",
196                                     "items": [
197                                         {
198                                             "|xns": "Roo",
199                                             "xtype": "BorderLayout",
200                                             "*prop": "layout",
201                                             "items": [
202                                                 {
203                                                     "*prop": "north",
204                                                     "height": 200,
205                                                     "title": "Details",
206                                                     "xtype": "LayoutRegion",
207                                                     "|xns": "Roo"
208                                                 },
209                                                 {
210                                                     "*prop": "center",
211                                                     "title": "Task Queue",
212                                                     "xtype": "LayoutRegion",
213                                                     "|xns": "Roo"
214                                                 },
215                                                 {
216                                                     "listeners": {
217                                                         "|activate": "function() {\n    _this.queuepanel = this;\n    if (_this.queuegrid) {\n        //_this.queuegrid.footer.onClick('first');\n    }\n}"
218                                                     },
219                                                     "background": true,
220                                                     "fitContainer": true,
221                                                     "fitToframe": true,
222                                                     "region": "center",
223                                                     "tableName": "mtrack_ticket",
224                                                     "title": "mtrack_ticket",
225                                                     "xtype": "GridPanel",
226                                                     "|xns": "Roo",
227                                                     "items": [
228                                                         {
229                                                             "listeners": {
230                                                                 "|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}",
231                                                                 "|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"
232                                                             },
233                                                             "*prop": "grid",
234                                                             "autoExpandColumn": "summary",
235                                                             "loadMask": true,
236                                                             "xtype": "Grid",
237                                                             "|xns": "Roo.grid",
238                                                             "items": [
239                                                                 {
240                                                                     "*prop": "dataSource",
241                                                                     "xtype": "Store",
242                                                                     "remoteSort": true,
243                                                                     "|sortInfo": "{ field : 'summary', direction: 'ASC' }",
244                                                                     "|xns": "Roo.data",
245                                                                     "items": [
246                                                                         {
247                                                                             "*prop": "proxy",
248                                                                             "xtype": "HttpProxy",
249                                                                             "method": "GET",
250                                                                             "|url": "baseURL + '/Roo/mtrack_ticket.php'",
251                                                                             "|xns": "Roo.data"
252                                                                         },
253                                                                         {
254                                                                             "|xns": "Roo.data",
255                                                                             "xtype": "JsonReader",
256                                                                             "totalProperty": "total",
257                                                                             "root": "data",
258                                                                             "*prop": "reader",
259                                                                             "id": "id",
260                                                                             "|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]"
261                                                                         }
262                                                                     ]
263                                                                 },
264                                                                 {
265                                                                     "xtype": "ColumnModel",
266                                                                     "header": "Summary",
267                                                                     "width": 200,
268                                                                     "dataIndex": "summary",
269                                                                     "|renderer": "function(v) { return String.format('{0}', v); }",
270                                                                     "|xns": "Roo.grid",
271                                                                     "*prop": "colModel[]"
272                                                                 }
273                                                             ]
274                                                         }
275                                                     ]
276                                                 },
277                                                 {
278                                                     "region": "north",
279                                                     "xtype": "ContentPanel",
280                                                     "|xns": "Roo",
281                                                     "items": [
282                                                         {
283                                                             "listeners": {
284                                                                 "|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",
285                                                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
286                                                             },
287                                                             "activeData": false,
288                                                             "method": "POST",
289                                                             "style": "margin-left:10px;",
290                                                             "xtype": "Form",
291                                                             "|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",
292                                                             "|url": "baseURL + '/Roo/cash_invoice_entry.php'",
293                                                             "|xns": "Roo.form",
294                                                             "items": [
295                                                                 {
296                                                                     "listeners": {
297                                                                         "render": "function (_self)\n{\n    _this.projectSel = _self;\n}",
298                                                                         "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}"
299                                                                     },
300                                                                     "allowBlank": "false",
301                                                                     "displayField": "name",
302                                                                     "editable": "false",
303                                                                     "emptyText": "Select Project",
304                                                                     "fieldLabel": "Project",
305                                                                     "forceSelection": true,
306                                                                     "hiddenName": "project_id",
307                                                                     "listWidth": 400,
308                                                                     "loadingText": "Searching...",
309                                                                     "minChars": 2,
310                                                                     "name": "project_id_name",
311                                                                     "pageSize": 20,
312                                                                     "qtip": "Select Projects",
313                                                                     "queryParam": "query[name]",
314                                                                     "selectOnFocus": true,
315                                                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> - {name}</div>",
316                                                                     "triggerAction": "all",
317                                                                     "typeAhead": true,
318                                                                     "valueField": "id",
319                                                                     "width": 200,
320                                                                     "xtype": "ComboBox",
321                                                                     "|xns": "Roo.form",
322                                                                     "items": [
323                                                                         {
324                                                                             "listeners": {
325                                                                                 "|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"
326                                                                             },
327                                                                             "*prop": "store",
328                                                                             "remoteSort": true,
329                                                                             "xtype": "Store",
330                                                                             "|sortInfo": "{ field: 'code', direction: 'ASC' }",
331                                                                             "|xns": "Roo.data",
332                                                                             "items": [
333                                                                                 {
334                                                                                     "*prop": "proxy",
335                                                                                     "xtype": "HttpProxy",
336                                                                                     "method": "GET",
337                                                                                     "|xns": "Roo.data",
338                                                                                     "|url": "baseURL + '/Roo/Projects.php'"
339                                                                                 },
340                                                                                 {
341                                                                                     "*prop": "reader",
342                                                                                     "xtype": "JsonReader",
343                                                                                     "|xns": "Roo.data",
344                                                                                     "id": "id",
345                                                                                     "root": "data",
346                                                                                     "totalProperty": "total",
347                                                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
348                                                                                 }
349                                                                             ]
350                                                                         }
351                                                                     ]
352                                                                 },
353                                                                 {
354                                                                     "labelAlign": "top",
355                                                                     "width": 300,
356                                                                     "xtype": "Column",
357                                                                     "|xns": "Roo.form",
358                                                                     "items": [
359                                                                         {
360                                                                             "listeners": {
361                                                                                 "keyup": "function (_self, e)\n{\n    _this.selectedRec.set('description',   this.getValue());\n    _this.grid.dataSource.updateBar(_this.selectedRec);\n \n}"
362                                                                             },
363                                                                             "fieldLabel": "Description",
364                                                                             "height": 120,
365                                                                             "name": "description",
366                                                                             "width": 300,
367                                                                             "xtype": "TextArea",
368                                                                             "|xns": "Roo.form"
369                                                                         }
370                                                                     ]
371                                                                 },
372                                                                 {
373                                                                     "name": "action",
374                                                                     "xtype": "Hidden",
375                                                                     "|xns": "Roo.form"
376                                                                 },
377                                                                 {
378                                                                     "name": "staff_id",
379                                                                     "xtype": "Hidden",
380                                                                     "|xns": "Roo.form"
381                                                                 },
382                                                                 {
383                                                                     "name": "qtyvalue",
384                                                                     "xtype": "Hidden",
385                                                                     "|xns": "Roo.form"
386                                                                 },
387                                                                 {
388                                                                     "name": "qtyvalue2",
389                                                                     "xtype": "Hidden",
390                                                                     "|xns": "Roo.form"
391                                                                 },
392                                                                 {
393                                                                     "name": "entry_dt",
394                                                                     "xtype": "Hidden",
395                                                                     "|xns": "Roo.form"
396                                                                 },
397                                                                 {
398                                                                     "name": "action_dt",
399                                                                     "xtype": "Hidden",
400                                                                     "|xns": "Roo.form"
401                                                                 },
402                                                                 {
403                                                                     "name": "id",
404                                                                     "|xns": "Roo.form",
405                                                                     "xtype": "Hidden"
406                                                                 }
407                                                             ]
408                                                         }
409                                                     ]
410                                                 }
411                                             ]
412                                         }
413                                     ]
414                                 }
415                             ]
416                         }
417                     ]
418                 },
419                 {
420                     "region": "center",
421                     "title": "Plan Time",
422                     "xtype": "NestedLayoutPanel",
423                     "|xns": "Roo",
424                     "items": [
425                         {
426                             "|xns": "Roo",
427                             "xtype": "BorderLayout",
428                             "*prop": "layout",
429                             "items": [
430                                 {
431                                     "*prop": "west",
432                                     "title": "Open Tasks (Unassigned) / Select Project",
433                                     "width": 450,
434                                     "xtype": "LayoutRegion",
435                                     "|xns": "Roo"
436                                 },
437                                 {
438                                     "*prop": "center",
439                                     "title": "Assigned to  / Prioritized (all projects)",
440                                     "xtype": "LayoutRegion",
441                                     "|xns": "Roo"
442                                 },
443                                 {
444                                     "listeners": {
445                                         "|activate": "function() {\n    _this.openpanel = this;\n    if (_this.opengrid) {\n   //    _this.opengrid.footer.onClick('first');\n    }\n}"
446                                     },
447                                     "background": false,
448                                     "fitContainer": true,
449                                     "fitToframe": true,
450                                     "region": "west",
451                                     "tableName": "mtrack_ticket",
452                                     "title": "mtrack_ticket",
453                                     "xtype": "GridPanel",
454                                     "|xns": "Roo",
455                                     "items": [
456                                         {
457                                             "listeners": {
458                                                 "|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}",
459                                                 "|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"
460                                             },
461                                             "*prop": "grid",
462                                             "autoExpandColumn": "summary",
463                                             "loadMask": true,
464                                             "xtype": "Grid",
465                                             "|xns": "Roo.grid",
466                                             "items": [
467                                                 {
468                                                     "|xns": "Roo",
469                                                     "xtype": "Toolbar",
470                                                     "*prop": "toolbar",
471                                                     "items": [
472                                                         {
473                                                             "displayField": "",
474                                                             "editable": "false",
475                                                             "emptyText": "Select Project",
476                                                             "fieldLabel": "mtrack_ticket",
477                                                             "forceSelection": true,
478                                                             "hiddenName": "",
479                                                             "listWidth": 400,
480                                                             "loadingText": "Searching...",
481                                                             "minChars": 2,
482                                                             "name": "",
483                                                             "pageSize": 20,
484                                                             "qtip": "Select mtrack_ticket",
485                                                             "queryParam": "",
486                                                             "selectOnFocus": true,
487                                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
488                                                             "triggerAction": "all",
489                                                             "typeAhead": true,
490                                                             "valueField": "id",
491                                                             "width": 300,
492                                                             "xtype": "ComboBox",
493                                                             "|xns": "Roo.form",
494                                                             "items": [
495                                                                 {
496                                                                     "*prop": "store",
497                                                                     "xtype": "Store",
498                                                                     "|xns": "Roo.data",
499                                                                     "remoteSort": true,
500                                                                     "|sortInfo": "{ direction : 'ASC', field: 'id' }",
501                                                                     "listeners": {
502                                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
503                                                                     },
504                                                                     "items": [
505                                                                         {
506                                                                             "*prop": "proxy",
507                                                                             "xtype": "HttpProxy",
508                                                                             "method": "GET",
509                                                                             "|xns": "Roo.data",
510                                                                             "|url": "baseURL + '/Roo/mtrack_ticket.php'"
511                                                                         },
512                                                                         {
513                                                                             "*prop": "reader",
514                                                                             "xtype": "JsonReader",
515                                                                             "|xns": "Roo.data",
516                                                                             "id": "id",
517                                                                             "root": "data",
518                                                                             "totalProperty": "total",
519                                                                             "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"summary\",\"type\":\"string\"}]"
520                                                                         }
521                                                                     ]
522                                                                 }
523                                                             ]
524                                                         }
525                                                     ]
526                                                 },
527                                                 {
528                                                     "*prop": "dataSource",
529                                                     "xtype": "Store",
530                                                     "remoteSort": true,
531                                                     "|sortInfo": "{ field : 'summary', direction: 'ASC' }",
532                                                     "|xns": "Roo.data",
533                                                     "items": [
534                                                         {
535                                                             "*prop": "proxy",
536                                                             "xtype": "HttpProxy",
537                                                             "method": "GET",
538                                                             "|url": "baseURL + '/Roo/mtrack_ticket.php'",
539                                                             "|xns": "Roo.data"
540                                                         },
541                                                         {
542                                                             "|xns": "Roo.data",
543                                                             "xtype": "JsonReader",
544                                                             "totalProperty": "total",
545                                                             "root": "data",
546                                                             "*prop": "reader",
547                                                             "id": "id",
548                                                             "|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]"
549                                                         }
550                                                     ]
551                                                 },
552                                                 {
553                                                     "xtype": "ColumnModel",
554                                                     "header": "Summary",
555                                                     "width": 200,
556                                                     "dataIndex": "summary",
557                                                     "|renderer": "function(v) { return String.format('{0}', v); }",
558                                                     "|xns": "Roo.grid",
559                                                     "*prop": "colModel[]"
560                                                 }
561                                             ]
562                                         }
563                                     ]
564                                 },
565                                 {
566                                     "listeners": {
567                                         "|activate": "function() {\n    _this.openpanel = this;\n    if (_this.opengrid) {\n   //    _this.opengrid.footer.onClick('first');\n    }\n}"
568                                     },
569                                     "background": false,
570                                     "fitContainer": true,
571                                     "fitToframe": true,
572                                     "region": "center",
573                                     "tableName": "mtrack_ticket",
574                                     "title": "mtrack_ticket",
575                                     "xtype": "GridPanel",
576                                     "|xns": "Roo",
577                                     "items": [
578                                         {
579                                             "listeners": {
580                                                 "|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}",
581                                                 "|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"
582                                             },
583                                             "*prop": "grid",
584                                             "autoExpandColumn": "summary",
585                                             "loadMask": true,
586                                             "xtype": "Grid",
587                                             "|xns": "Roo.grid",
588                                             "items": [
589                                                 {
590                                                     "|xns": "Roo",
591                                                     "xtype": "Toolbar",
592                                                     "*prop": "toolbar",
593                                                     "items": [
594                                                         {
595                                                             "displayField": "",
596                                                             "editable": "false",
597                                                             "emptyText": "Select Person",
598                                                             "fieldLabel": "mtrack_ticket",
599                                                             "forceSelection": true,
600                                                             "hiddenName": "",
601                                                             "listWidth": 400,
602                                                             "loadingText": "Searching...",
603                                                             "minChars": 2,
604                                                             "name": "",
605                                                             "pageSize": 20,
606                                                             "qtip": "Select mtrack_ticket",
607                                                             "queryParam": "",
608                                                             "selectOnFocus": true,
609                                                             "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
610                                                             "triggerAction": "all",
611                                                             "typeAhead": true,
612                                                             "valueField": "id",
613                                                             "width": 300,
614                                                             "xtype": "ComboBox",
615                                                             "|xns": "Roo.form",
616                                                             "items": [
617                                                                 {
618                                                                     "*prop": "store",
619                                                                     "xtype": "Store",
620                                                                     "|xns": "Roo.data",
621                                                                     "remoteSort": true,
622                                                                     "|sortInfo": "{ direction : 'ASC', field: 'id' }",
623                                                                     "listeners": {
624                                                                         "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
625                                                                     },
626                                                                     "items": [
627                                                                         {
628                                                                             "*prop": "proxy",
629                                                                             "xtype": "HttpProxy",
630                                                                             "method": "GET",
631                                                                             "|xns": "Roo.data",
632                                                                             "|url": "baseURL + '/Roo/mtrack_ticket.php'"
633                                                                         },
634                                                                         {
635                                                                             "*prop": "reader",
636                                                                             "xtype": "JsonReader",
637                                                                             "|xns": "Roo.data",
638                                                                             "id": "id",
639                                                                             "root": "data",
640                                                                             "totalProperty": "total",
641                                                                             "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"summary\",\"type\":\"string\"}]"
642                                                                         }
643                                                                     ]
644                                                                 }
645                                                             ]
646                                                         }
647                                                     ]
648                                                 },
649                                                 {
650                                                     "*prop": "dataSource",
651                                                     "xtype": "Store",
652                                                     "remoteSort": true,
653                                                     "|sortInfo": "{ field : 'summary', direction: 'ASC' }",
654                                                     "|xns": "Roo.data",
655                                                     "items": [
656                                                         {
657                                                             "*prop": "proxy",
658                                                             "xtype": "HttpProxy",
659                                                             "method": "GET",
660                                                             "|url": "baseURL + '/Roo/mtrack_ticket.php'",
661                                                             "|xns": "Roo.data"
662                                                         },
663                                                         {
664                                                             "|xns": "Roo.data",
665                                                             "xtype": "JsonReader",
666                                                             "totalProperty": "total",
667                                                             "root": "data",
668                                                             "*prop": "reader",
669                                                             "id": "id",
670                                                             "|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]"
671                                                         }
672                                                     ]
673                                                 },
674                                                 {
675                                                     "xtype": "ColumnModel",
676                                                     "header": "Summary",
677                                                     "width": 200,
678                                                     "dataIndex": "summary",
679                                                     "|renderer": "function(v) { return String.format('{0}', v); }",
680                                                     "|xns": "Roo.grid",
681                                                     "*prop": "colModel[]"
682                                                 }
683                                             ]
684                                         }
685                                     ]
686                                 }
687                             ]
688                         }
689                     ]
690                 }
691             ]
692         }
693     ],
694     "permname": "",
695     "modOrder": "001"
696 }