1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.MTrackTicket = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
38 title : "Edit or Create Ticket",
42 xtype: 'ContentPanel',
50 actioncomplete : function(_self,action)
52 if (action.type == 'setdata') {
54 this.load({ method: 'GET', params: { '_id' : _this.data.id || 0}});
58 if (action.type == 'load') {
60 this.setValues(_this.data);
66 if (action.type =='submit') {
72 _this.callback.call(_this, _this.form.getValues());
78 rendered : function (form)
84 style : 'margin:10px;width:1000px;margin-top:0px;',
85 url : baseURL + '/Roo/mtrack_ticket.php',
96 legend : "Properties",
97 style : 'width:190px;',
102 allowBlank : 'false',
103 displayField : 'name',
105 emptyText : "Select Project",
106 fieldLabel : 'Project',
107 forceSelection : true,
108 hiddenName : 'project_id',
110 loadingText : "Searching...",
112 name : 'project_id_name',
114 qtip : "Select Projects",
115 queryParam : 'query[name]',
116 selectOnFocus : true,
117 tpl : '<div class="x-grid-cell-text x-btn button "><b>{name}</b> </div>',
118 triggerAction : 'all',
126 beforeload : function (_self, o){
127 o.params = o.params || {};
132 sortInfo : { direction : 'ASC', field: 'name' },
137 url : baseURL + '/Roo/Projects.php'
144 totalProperty : 'total',
145 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
153 displayField : 'name',
155 emptyText : "Select milestone",
156 fieldLabel : 'Milestone',
157 forceSelection : true,
158 hiddenName : 'milestone_id',
160 loadingText : "Searching...",
162 name : 'milestone_id_name',
164 qtip : "Select mtrack_milestone",
165 queryParam : 'query[name]',
166 selectOnFocus : true,
167 tpl : '<div class="x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}"><b>{name}</b> </div>',
168 triggerAction : 'all',
176 beforeload : function (_self, o){
177 o.params = o.params || {};
179 o.params.etype = 'milestone';
180 o.params.project_id = _this.form.findField('project_id').getValue();
181 if (!o.params.project_id) {
182 Roo.MessageBox.alert("Error", "Select Project");
188 sortInfo : { direction : 'ASC', field: 'startdate' },
193 url : baseURL + '/Roo/mtrack_milestone.php'
200 totalProperty : 'total',
201 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
210 displayField : 'name',
212 emptyText : "Select Priority",
213 fieldLabel : 'Priority',
214 forceSelection : true,
215 hiddenName : 'priority_id',
217 loadingText : "Searching...",
219 name : 'priority_id_name',
221 qtip : "Select core_enum",
222 queryParam : 'query[etype]',
223 selectOnFocus : true,
224 tpl : '<div class="x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}"><b>{name}</b> </div>',
225 triggerAction : 'all',
233 beforeload : function (_self, o){
234 o.params = o.params || {};
236 o.params.etype = 'priority';
240 sortInfo : { direction : 'ASC', field: 'seqid' },
245 url : baseURL + '/Roo/core_enum.php'
252 totalProperty : 'total',
253 fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}]
262 displayField : 'name',
264 emptyText : "Select Severity",
265 fieldLabel : 'Severity',
266 forceSelection : true,
267 hiddenName : 'severity_id',
269 loadingText : "Searching...",
271 name : 'severity_id_name',
273 qtip : "Select core_enum",
274 queryParam : 'query[etype]',
275 selectOnFocus : true,
276 tpl : '<div class="x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}"><b>{name}</b> </div>',
277 triggerAction : 'all',
285 beforeload : function (_self, o){
286 o.params = o.params || {};
288 o.params.etype = 'severity';
292 sortInfo : { direction : 'ASC', field: 'seqid' },
297 url : baseURL + '/Roo/core_enum.php'
304 totalProperty : 'total',
305 fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}]
314 displayField : 'name',
316 emptyText : "Select Classification",
317 fieldLabel : 'Classification',
318 forceSelection : true,
319 hiddenName : 'classification_id',
321 loadingText : "Searching...",
323 name : 'classification_id_name',
325 qtip : "Select core_enum",
326 queryParam : 'query[etype]',
327 selectOnFocus : true,
328 tpl : '<div class="x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}"><b>{name}</b> </div>',
329 triggerAction : 'all',
337 beforeload : function (_self, o){
338 o.params = o.params || {};
340 o.params.etype = 'classification';
344 sortInfo : { direction : 'ASC', field: 'seqid' },
349 url : baseURL + '/Roo/core_enum.php'
356 totalProperty : 'total',
357 fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}]
366 legend : "Resources",
367 style : 'width: 190px',
378 allowBlank : 'false',
380 displayField : 'name',
382 emptyText : "Select Person",
383 fieldLabel : 'Developer',
384 forceSelection : true,
385 hiddenName : 'developer_id',
387 loadingText : "Searching...",
389 name : 'developer_id_name',
391 qtip : "Select Person",
392 queryParam : 'query[name]',
393 selectOnFocus : true,
394 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> <{email}> </div>',
395 triggerAction : 'all',
403 beforeload : function (_self, o){
404 o.params = o.params || {};
407 o.params['query[project_id]'] = _this.form.findField('project_id').getValue();
408 if (!o.params['query[project_id]']) {
409 Roo.MessageBox.alert("Error", "Select Project");
412 o.params['query[role]'] = 'DEVELOPER';
416 sortInfo : { direction : 'ASC', field: 'name' },
421 url : baseURL + '/Roo/Person.php'
428 totalProperty : 'total',
429 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
436 allowBlank : 'false',
438 displayField : 'name',
440 emptyText : "Select Person",
441 fieldLabel : 'Owner',
442 forceSelection : true,
443 hiddenName : 'owner_id',
445 loadingText : "Searching...",
447 name : 'owner_id_name',
449 qtip : "Select Person",
450 queryParam : 'query[name]',
451 selectOnFocus : true,
452 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
453 triggerAction : 'all',
461 beforeload : function (_self, o){
462 o.params = o.params || {};
464 o.params['query[project_id]']= _this.form.findField('project_id').getValue();
465 if (!o.params['query[project_id]']) {
466 Roo.MessageBox.alert("Error", "Select Project");
472 sortInfo : { direction : 'ASC', field: 'name' },
477 url : baseURL + '/Roo/Person.php'
484 totalProperty : 'total',
485 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
494 labelAlign : 'right',
499 xtype: 'NumberField',
501 style : 'align:right;',
502 fieldLabel : 'Estimated',
515 style : 'margin-left:10px',
521 legend : "Summary / Details",
522 style : 'width:410px',
533 fieldLabel : 'Summary',
543 style : 'float:left; width:400px',
550 check : function (_self, checked)
558 _this.form.findField('view_as').setValue('text');
566 var md = _this.form.findField('view_as_markdown');
569 md.setValue(checked ? 0 : 1);
575 fieldLabel : 'View as',
576 name : 'view_as_text',
584 style : 'float: left',
591 check : function (_self, checked)
599 _this.form.findField('view_as').setValue('markdown');
605 var md = _this.form.findField('view_as_text');
608 md.setValue(checked ? 0 : 1);
612 boxLabel : 'markdown',
613 name : 'view_as_markdown',
629 fieldLabel : 'Description',
631 name : 'description',
656 xtype: 'LayoutRegion',
664 click : function (_self, e)
675 click : function (_self, e)
681 _this.form.doAction("submit");