3 "name": "Pman.Dialog.MTrackTicket",
6 "path": "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackTicket.bjs",
10 "resize": "function (_self, width, height)\n{\n var bw = width - 320;\n _this.form.findField('description').el.setWidth(bw);\n _this.summaryBox.el.setWidth(bw+30);\n _this.summaryCol.el.setWidth(bw+45);\n _this.descCol.el.setWidth(bw+35);\n \n}"
17 "title": "Edit or Create Ticket",
19 "xtype": "LayoutDialog",
24 "xtype": "LayoutRegion",
29 "xtype": "ContentPanel",
34 "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n \n this.load({ method: 'GET', params: { '_id' : _this.data.id || 0}});\n \n return;\n }\n if (action.type == 'load') {\n if (!_this.data.id) {\n this.setValues(_this.data);\n }\n return;\n }\n \n \n if (action.type =='submit') {\n \n if (!_this.data.id * 1) {\n Roo.MessageBox.confirm(\"Close?\", \n \"The new ticket id is #\" + action.result.data.id + \", Press yes to close, or no to keep editing\",\n function (res) {\n if (res == 'yes') {\n \n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset(); \n return;\n }\n _this.data.id = action.result.data.id;\n _this.form.fireEvent('actioncomplete', _this.form, { type : 'setdata', data : {}});\n return;\n }\n );\n \n \n \n \n return;\n }\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset(); \n\n return;\n }\n}\n",
35 "|rendered": "function (form)\n{\n _this.form= form;\n}\n"
38 "style": "margin:10px;width:1000px;margin-top:0px;",
40 "|url": "baseURL + '/Roo/mtrack_ticket.php'",
50 "legend": "Properties",
51 "style": "width:190px;",
56 "allowBlank": "false",
57 "displayField": "name",
59 "emptyText": "Select Project",
60 "fieldLabel": "Project",
61 "forceSelection": true,
62 "hiddenName": "project_id",
64 "loadingText": "Searching...",
66 "name": "project_id_name",
68 "qtip": "Select Projects",
69 "queryParam": "query[name]",
70 "selectOnFocus": true,
71 "tpl": "<div class=\"x-grid-cell-text x-btn button \"><b>{name}</b> </div>",
72 "triggerAction": "all",
81 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
86 "|sortInfo": "{ direction : 'ASC', field: 'name' }",
94 "|url": "baseURL + '/Roo/Projects.php'"
98 "xtype": "JsonReader",
102 "totalProperty": "total",
103 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
111 "displayField": "name",
113 "emptyText": "Select milestone",
114 "fieldLabel": "Milestone",
115 "forceSelection": true,
116 "hiddenName": "milestone_id",
118 "loadingText": "Searching...",
120 "name": "milestone_id_name",
122 "qtip": "Select mtrack_milestone",
123 "queryParam": "query[name]",
124 "selectOnFocus": true,
125 "tpl": "<div class=\"x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>",
126 "triggerAction": "all",
135 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'milestone';\n o.params.project_id = _this.form.findField('project_id').getValue();\n if (!o.params.project_id) {\n Roo.MessageBox.alert(\"Error\", \"Select Project\");\n return false;\n }\n}\n"
140 "|sortInfo": "{ direction : 'ASC', field: 'startdate' }",
145 "xtype": "HttpProxy",
148 "|url": "baseURL + '/Roo/mtrack_milestone.php'"
152 "xtype": "JsonReader",
156 "totalProperty": "total",
157 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
166 "displayField": "name",
168 "emptyText": "Select Priority",
169 "fieldLabel": "Priority",
170 "forceSelection": true,
171 "hiddenName": "priority_id",
173 "loadingText": "Searching...",
175 "name": "priority_id_name",
177 "qtip": "Select core_enum",
178 "queryParam": "query[etype]",
179 "selectOnFocus": true,
180 "tpl": "<div class=\"x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>",
181 "triggerAction": "all",
190 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'priority';\n}\n"
195 "|sortInfo": "{ direction : 'ASC', field: 'seqid' }",
200 "xtype": "HttpProxy",
203 "|url": "baseURL + '/Roo/core_enum.php'"
207 "xtype": "JsonReader",
211 "totalProperty": "total",
212 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
221 "displayField": "name",
223 "emptyText": "Select Severity",
224 "fieldLabel": "Severity",
225 "forceSelection": true,
226 "hiddenName": "severity_id",
228 "loadingText": "Searching...",
230 "name": "severity_id_name",
232 "qtip": "Select core_enum",
233 "queryParam": "query[etype]",
234 "selectOnFocus": true,
235 "tpl": "<div class=\"x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>",
236 "triggerAction": "all",
245 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'severity';\n}\n"
250 "|sortInfo": "{ direction : 'ASC', field: 'seqid' }",
255 "xtype": "HttpProxy",
258 "|url": "baseURL + '/Roo/core_enum.php'"
262 "xtype": "JsonReader",
266 "totalProperty": "total",
267 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
276 "displayField": "name",
278 "emptyText": "Select Classification",
279 "fieldLabel": "Classification",
280 "forceSelection": true,
281 "hiddenName": "classification_id",
283 "loadingText": "Searching...",
285 "name": "classification_id_name",
287 "qtip": "Select core_enum",
288 "queryParam": "query[etype]",
289 "selectOnFocus": true,
290 "tpl": "<div class=\"x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>",
291 "triggerAction": "all",
300 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'classification';\n}\n"
305 "|sortInfo": "{ direction : 'ASC', field: 'seqid' }",
310 "xtype": "HttpProxy",
313 "|url": "baseURL + '/Roo/core_enum.php'"
317 "xtype": "JsonReader",
321 "totalProperty": "total",
322 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
331 "legend": "Resources",
332 "style": "width: 190px",
343 "allowBlank": "false",
345 "displayField": "name",
347 "emptyText": "Select Person",
348 "fieldLabel": "Developer",
349 "forceSelection": true,
350 "hiddenName": "developer_id",
352 "loadingText": "Searching...",
354 "name": "developer_id_name",
356 "qtip": "Select Person",
357 "queryParam": "query[name]",
358 "selectOnFocus": true,
359 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> <{email}> </div>",
360 "triggerAction": "all",
369 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n \n // set more here\n o.params['query[project_id]'] = _this.form.findField('project_id').getValue();\n if (!o.params['query[project_id]']) {\n Roo.MessageBox.alert(\"Error\", \"Select Project\");\n return false;\n }\n o.params['query[role]'] = 'DEVELOPER';\n}\n"
374 "|sortInfo": "{ direction : 'ASC', field: 'name' }",
379 "xtype": "HttpProxy",
382 "|url": "baseURL + '/Roo/Person.php'"
386 "xtype": "JsonReader",
390 "totalProperty": "total",
391 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
398 "allowBlank": "false",
400 "displayField": "name",
402 "emptyText": "Select Person",
403 "fieldLabel": "Owner",
404 "forceSelection": true,
405 "hiddenName": "owner_id",
407 "loadingText": "Searching...",
409 "name": "owner_id_name",
411 "qtip": "Select Person",
412 "queryParam": "query[name]",
413 "selectOnFocus": true,
414 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
415 "triggerAction": "all",
424 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params['query[project_id]']= _this.form.findField('project_id').getValue();\n if (!o.params['query[project_id]']) {\n Roo.MessageBox.alert(\"Error\", \"Select Project\");\n return false;\n }\n}\n"
429 "|sortInfo": "{ direction : 'ASC', field: 'name' }",
434 "xtype": "HttpProxy",
437 "|url": "baseURL + '/Roo/Person.php'"
441 "xtype": "JsonReader",
445 "totalProperty": "total",
446 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
455 "labelAlign": "right",
462 "style": "align:right;",
463 "fieldLabel": "Estimated",
466 "xtype": "NumberField",
477 "show": "function (_self)\n{\n\n}",
478 "render": "function (_self)\n{\n _this.summaryCol = _self;\n}"
480 "style": "margin-left:10px",
487 "show": "function (_self)\n{\n\n}",
488 "render": "function (_self)\n{\n _this.summaryBox = _self;\n}"
490 "legend": "Summary / Details",
491 "style": "width:410px",
502 "fieldLabel": "Summary",
505 "xtype": "TextField",
512 "style": "float:left; width:400px",
519 "check": "function (_self, checked)\n{\n\n if (!_this.form) {\n return;\n }\n if (checked) {\n \n _this.form.findField('view_as').setValue('text');\n }\n \n \n \n if (this.radio) {\n return;\n }\n var md = _this.form.findField('view_as_markdown');\n\n md.radio = true;\n md.setValue(checked ? 0 : 1);\n \n md.radio = false;\n}"
522 "fieldLabel": "View as",
523 "name": "view_as_text",
531 "style": "float: left",
538 "check": "function (_self, checked)\n{\n if (!_this.form) {\n return;\n }\n \n if (checked) {\n \n _this.form.findField('view_as').setValue('markdown');\n }\n \n if (this.radio) {\n return;\n }\n var md = _this.form.findField('view_as_text');\n\n md.radio = true;\n md.setValue(checked ? 0 : 1);\n md.radio = false;\n}"
540 "boxLabel": "markdown",
541 "name": "view_as_markdown",
552 "show": "function (_self)\n{\n\n}",
553 "render": "function (_self)\n{\n _this.descCol = _self;\n}"
561 "fieldLabel": "Description",
563 "name": "description",
590 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
592 "*prop": "buttons[]",
599 "click": "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}"
601 "*prop": "buttons[]",