php warnings
[Pman.MTrack] / Pman.Dialog.MTrackTicket.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Dialog');
6
7 Pman.Dialog.MTrackTicket = {
8
9  _strings : {
10   'a02a8093b46b8e647c29727fb50d67e4' :"Select milestone",
11   '672caf27f5363dc833bda5099775e891' :"Developer",
12   '9e727fdd3aec8274f46685441900280d' :"Project",
13   '6a58f977f2b623b695a340766f2a6843' :"Select Project",
14   'a5ffb2a210f259195a75e5abca8db4a2' :"Select mtrack_milestone",
15   '6c768695a8efb18436d5b7b4374cdb45' :"Select core_enum",
16   '007cc9547ae8884ad597cd92ba505422' :"Severity",
17   '86e9400686e8e080ef3c8995afb5eb86' :"Select Priority",
18   'ddcf50c29294d4414f3f7c1bbc892cb5' :"Resources",
19   '290612199861c31d1036b185b4e69b75' :"Summary",
20   '1cb251ec0d568de6a929b520c4aed8d1' :"text",
21   '5c9335b28e6277ddbe0137f04e5e58a7' :"Classification",
22   '3c311fbd0f9e51ce27b984f55164cf83' :"Estimated",
23   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
24   'c4ca4238a0b923820dcc509a6f75849b' :"1",
25   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
26   '502996d9790340c5fd7b86a5b93b1c9f' :"Priority",
27   'b6f4a2ec6356bbd56d49f2096bf9d3d3' :"Owner",
28   'ff18c41b7689060c39934dbb74de1e9c' :"Edit or Create Ticket",
29   '24f27bda5dd2c488aa9bc7700ba98c34' :"Select Projects",
30   '340c2ee497b85d5954b01c64de7f44f6' :"Select Person",
31   '23e6bcd09b259e6de4cd972516cb4214' :"View as",
32   '590fc197fe73db0aa2ec03687a372eea' :"markdown",
33   'e9c626b8a8b62de7562dfbf51a576ae5' :"Milestone",
34   '43371ce8259ba854b1ae3543fd477874' :"Select Severity",
35   'a8dbd02aaca3948002718aeb2babeefe' :"Summary / Details",
36   '9fc2d28c05ed9eb1d75ba4465abf15a9' :"Properties",
37   'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
38   'c9cc8cce247e49bae79f15173ce97354' :"Save",
39   'fcb17935fd52e65b8f223778c9e70313' :"Select Classification"
40  },
41  _named_strings : {
42   'view_as_markdown_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */ ,
43   'estimated_fieldLabel' : '3c311fbd0f9e51ce27b984f55164cf83' /* Estimated */ ,
44   'severity_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
45   'developer_id_name_qtip' : '340c2ee497b85d5954b01c64de7f44f6' /* Select Person */ ,
46   'milestone_id_name_fieldLabel' : 'e9c626b8a8b62de7562dfbf51a576ae5' /* Milestone */ ,
47   'priority_id_name_qtip' : '6c768695a8efb18436d5b7b4374cdb45' /* Select core_enum */ ,
48   'view_as_text_boxLabel' : '1cb251ec0d568de6a929b520c4aed8d1' /* text */ ,
49   'developer_id_name_fieldLabel' : '672caf27f5363dc833bda5099775e891' /* Developer */ ,
50   'severity_id_name_fieldLabel' : '007cc9547ae8884ad597cd92ba505422' /* Severity */ ,
51   'developer_id_name_emptyText' : '340c2ee497b85d5954b01c64de7f44f6' /* Select Person */ ,
52   'summary_fieldLabel' : '290612199861c31d1036b185b4e69b75' /* Summary */ ,
53   'classification_id_name_emptyText' : 'fcb17935fd52e65b8f223778c9e70313' /* Select Classification */ ,
54   'severity_id_name_qtip' : '6c768695a8efb18436d5b7b4374cdb45' /* Select core_enum */ ,
55   'description_fieldLabel' : 'b5a7adde1af5c87d7fd797b6245c2a39' /* Description */ ,
56   'owner_id_name_emptyText' : '340c2ee497b85d5954b01c64de7f44f6' /* Select Person */ ,
57   'project_id_name_qtip' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
58   'severity_id_name_emptyText' : '43371ce8259ba854b1ae3543fd477874' /* Select Severity */ ,
59   'milestone_id_name_qtip' : 'a5ffb2a210f259195a75e5abca8db4a2' /* Select mtrack_milestone */ ,
60   'priority_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
61   'classification_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
62   'milestone_id_name_emptyText' : 'a02a8093b46b8e647c29727fb50d67e4' /* Select milestone */ ,
63   'priority_id_name_emptyText' : '86e9400686e8e080ef3c8995afb5eb86' /* Select Priority */ ,
64   'developer_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
65   'milestone_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
66   'project_id_name_emptyText' : '6a58f977f2b623b695a340766f2a6843' /* Select Project */ ,
67   'owner_id_name_qtip' : '340c2ee497b85d5954b01c64de7f44f6' /* Select Person */ ,
68   'view_as_text_fieldLabel' : '23e6bcd09b259e6de4cd972516cb4214' /* View as */ ,
69   'priority_id_name_fieldLabel' : '502996d9790340c5fd7b86a5b93b1c9f' /* Priority */ ,
70   'project_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
71   'owner_id_name_fieldLabel' : 'b6f4a2ec6356bbd56d49f2096bf9d3d3' /* Owner */ ,
72   'view_as_text_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */ ,
73   'owner_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
74   'view_as_markdown_boxLabel' : '590fc197fe73db0aa2ec03687a372eea' /* markdown */ ,
75   'project_id_name_fieldLabel' : '9e727fdd3aec8274f46685441900280d' /* Project */ ,
76   'classification_id_name_fieldLabel' : '5c9335b28e6277ddbe0137f04e5e58a7' /* Classification */ ,
77   'classification_id_name_qtip' : '6c768695a8efb18436d5b7b4374cdb45' /* Select core_enum */ 
78  },
79
80  dialog : false,
81  callback:  false,
82
83  show : function(data, cb)
84  {
85   if (!this.dialog) {
86    this.create();
87   }
88
89   this.callback = cb;
90   this.data = data;
91   this.dialog.show(this.data._el);
92   if (this.form) {
93    this.form.reset();
94    this.form.setValues(data);
95    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
96   }
97
98  },
99
100  create : function()
101  {
102    var _this = this;
103    this.dialog = Roo.factory({
104     xtype : 'LayoutDialog',
105     closable : false,
106     collapsible : false,
107     height : 450,
108     modal : true,
109     resizable : true,
110     title : _this._strings['ff18c41b7689060c39934dbb74de1e9c'] /* Edit or Create Ticket */,
111     width : 700,
112     listeners : {
113      resize : function (_self, width, height)
114       {
115           var bw = width - 320;
116           _this.form.findField('description').el.setWidth(bw);
117           _this.summaryBox.el.setWidth(bw+30);
118               _this.summaryCol.el.setWidth(bw+45);
119                 _this.descCol.el.setWidth(bw+35);
120                 
121       }
122     },
123     xns : Roo,
124     '|xns' : 'Roo',
125     center : {
126      xtype : 'LayoutRegion',
127      xns : Roo,
128      '|xns' : 'Roo'
129     },
130     buttons : [
131      {
132       xtype : 'Button',
133       text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
134       listeners : {
135        click : function (_self, e)
136         {
137             _this.dialog.hide();
138         }
139       },
140       xns : Roo,
141       '|xns' : 'Roo'
142      },
143      {
144       xtype : 'Button',
145       text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
146       listeners : {
147        click : function (_self, e)
148         {
149             // do some checks?
150              
151             
152          
153             _this.form.doAction("submit");
154         
155         }
156       },
157       xns : Roo,
158       '|xns' : 'Roo'
159      }
160     ],
161     items  : [
162      {
163       xtype : 'ContentPanel',
164       region : 'center',
165       xns : Roo,
166       '|xns' : 'Roo',
167       items  : [
168        {
169         xtype : 'Form',
170         method : 'POST',
171         style : 'margin:10px;width:1000px;margin-top:0px;',
172         url : baseURL + '/Roo/mtrack_ticket.php',
173         listeners : {
174          actioncomplete : function(_self,action)
175           {
176               if (action.type == 'setdata') {
177             
178                  this.load({ method: 'GET', params: { '_id' : _this.data.id  || 0}});
179                     
180                  return;
181               }
182               if (action.type == 'load') {
183                  if (!_this.data.id) {
184                       this.setValues(_this.data);
185                   }
186                   return;
187               }
188               
189               
190               if (action.type =='submit') {
191               
192                   if (!_this.data.id * 1) {
193                       Roo.MessageBox.confirm("Close?", 
194                           "The new ticket id is #" + action.result.data.id + ", Press yes to close, or no to keep editing",
195                           function (res) {
196                               if (res == 'yes') {
197                               
198                               
199                                   _this.dialog.hide();
200                               
201                                    if (_this.callback) {
202                                       _this.callback.call(_this, _this.form.getValues());
203                                    }
204                                    _this.form.reset();            
205                                    return;
206                                }
207                                _this.data.id = action.result.data.id;
208                                _this.form.fireEvent('actioncomplete', _this.form, { type : 'setdata', data : {}});
209                                return;
210                            }
211                        );
212                   
213                   
214                   
215                   
216                       return;
217                   }
218                   
219                   _this.dialog.hide();
220               
221                    if (_this.callback) {
222                       _this.callback.call(_this, _this.form.getValues());
223                    }
224                    _this.form.reset();        
225           
226                    return;
227               }
228           },
229          rendered : function (form)
230           {
231               _this.form= form;
232           }
233         },
234         xns : Roo.form,
235         '|xns' : 'Roo.form',
236         items  : [
237          {
238           xtype : 'Column',
239           width : 210,
240           xns : Roo.form,
241           '|xns' : 'Roo.form',
242           items  : [
243            {
244             xtype : 'FieldSet',
245             labelAlign : 'top',
246             legend : _this._strings['9fc2d28c05ed9eb1d75ba4465abf15a9'] /* Properties */,
247             style : 'width:190px;',
248             xns : Roo.form,
249             '|xns' : 'Roo.form',
250             items  : [
251              {
252               xtype : 'ComboBox',
253               allowBlank : false,
254               displayField : 'name',
255               editable : false,
256               emptyText : _this._strings['6a58f977f2b623b695a340766f2a6843'] /* Select Project */,
257               fieldLabel : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
258               forceSelection : true,
259               hiddenName : 'project_id',
260               listWidth : 400,
261               loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
262               minChars : 2,
263               name : 'project_id_name',
264               pageSize : 20,
265               qtip : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
266               queryParam : 'query[name]',
267               selectOnFocus : true,
268               tpl : '<div class=\"x-grid-cell-text x-btn button \"><b>{name}</b> </div>',
269               triggerAction : 'all',
270               typeAhead : true,
271               valueField : 'id',
272               width : 180,
273               xns : Roo.form,
274               '|xns' : 'Roo.form',
275               store : {
276                xtype : 'Store',
277                remoteSort : true,
278                sortInfo : { direction : 'ASC', field: 'name' },
279                listeners : {
280                 beforeload : function (_self, o){
281                      o.params = o.params || {};
282                      // set more here
283                  }
284                },
285                xns : Roo.data,
286                '|xns' : 'Roo.data',
287                proxy : {
288                 xtype : 'HttpProxy',
289                 method : 'GET',
290                 url : baseURL + '/Roo/core_project',
291                 xns : Roo.data,
292                 '|xns' : 'Roo.data'
293                },
294                reader : {
295                 xtype : 'JsonReader',
296                 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
297                 id : 'id',
298                 root : 'data',
299                 totalProperty : 'total',
300                 xns : Roo.data,
301                 '|xns' : 'Roo.data'
302                }
303               }
304              },
305              {
306               xtype : 'ComboBox',
307               alwaysQuery : true,
308               displayField : 'name',
309               editable : false,
310               emptyText : _this._strings['a02a8093b46b8e647c29727fb50d67e4'] /* Select milestone */,
311               fieldLabel : _this._strings['e9c626b8a8b62de7562dfbf51a576ae5'] /* Milestone */,
312               forceSelection : true,
313               hiddenName : 'milestone_id',
314               listWidth : 400,
315               loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
316               minChars : 2,
317               name : 'milestone_id_name',
318               pageSize : 20,
319               qtip : _this._strings['a5ffb2a210f259195a75e5abca8db4a2'] /* Select mtrack_milestone */,
320               queryParam : 'query[name]',
321               selectOnFocus : true,
322               tpl : '<div class=\"x-grid-cell-text x-btn button  RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>',
323               triggerAction : 'all',
324               typeAhead : true,
325               valueField : 'id',
326               width : 180,
327               xns : Roo.form,
328               '|xns' : 'Roo.form',
329               store : {
330                xtype : 'Store',
331                remoteSort : true,
332                sortInfo : { direction : 'ASC', field: 'startdate' },
333                listeners : {
334                 beforeload : function (_self, o){
335                      o.params = o.params || {};
336                      // set more here
337                      o.params.etype = 'milestone';
338                      o.params.project_id = _this.form.findField('project_id').getValue();
339                      if (!o.params.project_id) {
340                          Roo.MessageBox.alert("Error", "Select Project");
341                          return false;
342                      }
343                  }
344                },
345                xns : Roo.data,
346                '|xns' : 'Roo.data',
347                proxy : {
348                 xtype : 'HttpProxy',
349                 method : 'GET',
350                 url : baseURL + '/Roo/mtrack_milestone.php',
351                 xns : Roo.data,
352                 '|xns' : 'Roo.data'
353                },
354                reader : {
355                 xtype : 'JsonReader',
356                 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
357                 id : 'id',
358                 root : 'data',
359                 totalProperty : 'total',
360                 xns : Roo.data,
361                 '|xns' : 'Roo.data'
362                }
363               }
364              },
365              {
366               xtype : 'ComboBox',
367               allowBlank : false,
368               alwaysQuery : true,
369               displayField : 'name',
370               editable : false,
371               emptyText : _this._strings['86e9400686e8e080ef3c8995afb5eb86'] /* Select Priority */,
372               fieldLabel : _this._strings['502996d9790340c5fd7b86a5b93b1c9f'] /* Priority */,
373               forceSelection : true,
374               hiddenName : 'priority_id',
375               listWidth : 400,
376               loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
377               minChars : 2,
378               name : 'priority_id_name',
379               pageSize : 20,
380               qtip : _this._strings['6c768695a8efb18436d5b7b4374cdb45'] /* Select core_enum */,
381               queryParam : 'query[etype]',
382               selectOnFocus : true,
383               tpl : '<div class=\"x-grid-cell-text x-btn button  RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>',
384               triggerAction : 'all',
385               typeAhead : true,
386               valueField : 'id',
387               width : 180,
388               xns : Roo.form,
389               '|xns' : 'Roo.form',
390               store : {
391                xtype : 'Store',
392                remoteSort : true,
393                sortInfo : { direction : 'ASC', field: 'seqid' },
394                listeners : {
395                 beforeload : function (_self, o){
396                      o.params = o.params || {};
397                      // set more here
398                          o.params.etype = 'priority';
399                  }
400                },
401                xns : Roo.data,
402                '|xns' : 'Roo.data',
403                proxy : {
404                 xtype : 'HttpProxy',
405                 method : 'GET',
406                 url : baseURL + '/Roo/core_enum.php',
407                 xns : Roo.data,
408                 '|xns' : 'Roo.data'
409                },
410                reader : {
411                 xtype : 'JsonReader',
412                 fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}],
413                 id : 'id',
414                 root : 'data',
415                 totalProperty : 'total',
416                 xns : Roo.data,
417                 '|xns' : 'Roo.data'
418                }
419               }
420              },
421              {
422               xtype : 'ComboBox',
423               allowBlank : false,
424               alwaysQuery : true,
425               displayField : 'name',
426               editable : false,
427               emptyText : _this._strings['43371ce8259ba854b1ae3543fd477874'] /* Select Severity */,
428               fieldLabel : _this._strings['007cc9547ae8884ad597cd92ba505422'] /* Severity */,
429               forceSelection : true,
430               hiddenName : 'severity_id',
431               listWidth : 400,
432               loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
433               minChars : 2,
434               name : 'severity_id_name',
435               pageSize : 20,
436               qtip : _this._strings['6c768695a8efb18436d5b7b4374cdb45'] /* Select core_enum */,
437               queryParam : 'query[etype]',
438               selectOnFocus : true,
439               tpl : '<div class=\"x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>',
440               triggerAction : 'all',
441               typeAhead : true,
442               valueField : 'id',
443               width : 180,
444               xns : Roo.form,
445               '|xns' : 'Roo.form',
446               store : {
447                xtype : 'Store',
448                remoteSort : true,
449                sortInfo : { direction : 'ASC', field: 'seqid' },
450                listeners : {
451                 beforeload : function (_self, o){
452                      o.params = o.params || {};
453                      // set more here
454                          o.params.etype = 'severity';
455                  }
456                },
457                xns : Roo.data,
458                '|xns' : 'Roo.data',
459                proxy : {
460                 xtype : 'HttpProxy',
461                 method : 'GET',
462                 url : baseURL + '/Roo/core_enum.php',
463                 xns : Roo.data,
464                 '|xns' : 'Roo.data'
465                },
466                reader : {
467                 xtype : 'JsonReader',
468                 fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}],
469                 id : 'id',
470                 root : 'data',
471                 totalProperty : 'total',
472                 xns : Roo.data,
473                 '|xns' : 'Roo.data'
474                }
475               }
476              },
477              {
478               xtype : 'ComboBox',
479               allowBlank : false,
480               alwaysQuery : true,
481               displayField : 'name',
482               editable : false,
483               emptyText : _this._strings['fcb17935fd52e65b8f223778c9e70313'] /* Select Classification */,
484               fieldLabel : _this._strings['5c9335b28e6277ddbe0137f04e5e58a7'] /* Classification */,
485               forceSelection : true,
486               hiddenName : 'classification_id',
487               listWidth : 400,
488               loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
489               minChars : 2,
490               name : 'classification_id_name',
491               pageSize : 20,
492               qtip : _this._strings['6c768695a8efb18436d5b7b4374cdb45'] /* Select core_enum */,
493               queryParam : 'query[etype]',
494               selectOnFocus : true,
495               tpl : '<div class=\"x-grid-cell-text x-btn button RdYlGn-q{seqid}-{seqmax}\"><b>{name}</b> </div>',
496               triggerAction : 'all',
497               typeAhead : true,
498               valueField : 'id',
499               width : 180,
500               xns : Roo.form,
501               '|xns' : 'Roo.form',
502               store : {
503                xtype : 'Store',
504                remoteSort : true,
505                sortInfo : { direction : 'ASC', field: 'seqid' },
506                listeners : {
507                 beforeload : function (_self, o){
508                      o.params = o.params || {};
509                      // set more here
510                          o.params.etype = 'classification';
511                  }
512                },
513                xns : Roo.data,
514                '|xns' : 'Roo.data',
515                proxy : {
516                 xtype : 'HttpProxy',
517                 method : 'GET',
518                 url : baseURL + '/Roo/core_enum.php',
519                 xns : Roo.data,
520                 '|xns' : 'Roo.data'
521                },
522                reader : {
523                 xtype : 'JsonReader',
524                 fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}],
525                 id : 'id',
526                 root : 'data',
527                 totalProperty : 'total',
528                 xns : Roo.data,
529                 '|xns' : 'Roo.data'
530                }
531               }
532              }
533             ]
534            },
535            {
536             xtype : 'FieldSet',
537             legend : _this._strings['ddcf50c29294d4414f3f7c1bbc892cb5'] /* Resources */,
538             style : 'width: 190px',
539             xns : Roo.form,
540             '|xns' : 'Roo.form',
541             items  : [
542              {
543               xtype : 'Column',
544               labelAlign : 'top',
545               width : 190,
546               xns : Roo.form,
547               '|xns' : 'Roo.form',
548               items  : [
549                {
550                 xtype : 'ComboBox',
551                 allowBlank : false,
552                 alwaysQuery : true,
553                 displayField : 'name',
554                 editable : true,
555                 emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
556                 fieldLabel : _this._strings['672caf27f5363dc833bda5099775e891'] /* Developer */,
557                 forceSelection : true,
558                 hiddenName : 'developer_id',
559                 listWidth : 400,
560                 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
561                 minChars : 2,
562                 name : 'developer_id_name',
563                 pageSize : 20,
564                 qtip : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
565                 queryParam : 'query[name]',
566                 selectOnFocus : true,
567                 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> &lt;{email}&gt; </div>',
568                 triggerAction : 'all',
569                 typeAhead : true,
570                 valueField : 'id',
571                 width : 180,
572                 xns : Roo.form,
573                 '|xns' : 'Roo.form',
574                 store : {
575                  xtype : 'Store',
576                  remoteSort : true,
577                  sortInfo : { direction : 'ASC', field: 'name' },
578                  listeners : {
579                   beforeload : function (_self, o){
580                        o.params = o.params || {};
581                        
582                        // set more here
583                        o.params['query[project_id]'] = _this.form.findField('project_id').getValue();
584                        if (!o.params['query[project_id]']) {
585                            Roo.MessageBox.alert("Error", "Select Project");
586                            return false;
587                        }
588                        o.params['query[role]'] = 'DEVELOPER';
589                    }
590                  },
591                  xns : Roo.data,
592                  '|xns' : 'Roo.data',
593                  proxy : {
594                   xtype : 'HttpProxy',
595                   method : 'GET',
596                   url : baseURL + '/Roo/core_person',
597                   xns : Roo.data,
598                   '|xns' : 'Roo.data'
599                  },
600                  reader : {
601                   xtype : 'JsonReader',
602                   fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
603                   id : 'id',
604                   root : 'data',
605                   totalProperty : 'total',
606                   xns : Roo.data,
607                   '|xns' : 'Roo.data'
608                  }
609                 }
610                },
611                {
612                 xtype : 'ComboBox',
613                 allowBlank : false,
614                 alwaysQuery : true,
615                 displayField : 'name',
616                 editable : false,
617                 emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
618                 fieldLabel : _this._strings['b6f4a2ec6356bbd56d49f2096bf9d3d3'] /* Owner */,
619                 forceSelection : true,
620                 hiddenName : 'owner_id',
621                 listWidth : 400,
622                 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
623                 minChars : 2,
624                 name : 'owner_id_name',
625                 pageSize : 20,
626                 qtip : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
627                 queryParam : 'query[name]',
628                 selectOnFocus : true,
629                 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
630                 triggerAction : 'all',
631                 typeAhead : true,
632                 valueField : 'id',
633                 width : 180,
634                 xns : Roo.form,
635                 '|xns' : 'Roo.form',
636                 store : {
637                  xtype : 'Store',
638                  remoteSort : true,
639                  sortInfo : { direction : 'ASC', field: 'name' },
640                  listeners : {
641                   beforeload : function (_self, o){
642                        o.params = o.params || {};
643                        // set more here
644                        o.params['query[project_id]']= _this.form.findField('project_id').getValue();
645                        if (!o.params['query[project_id]'])  {
646                            Roo.MessageBox.alert("Error", "Select Project");
647                            return false;
648                        }
649                    }
650                  },
651                  xns : Roo.data,
652                  '|xns' : 'Roo.data',
653                  proxy : {
654                   xtype : 'HttpProxy',
655                   method : 'GET',
656                   url : baseURL + '/Roo/core_person',
657                   xns : Roo.data,
658                   '|xns' : 'Roo.data'
659                  },
660                  reader : {
661                   xtype : 'JsonReader',
662                   fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
663                   id : 'id',
664                   root : 'data',
665                   totalProperty : 'total',
666                   xns : Roo.data,
667                   '|xns' : 'Roo.data'
668                  }
669                 }
670                }
671               ]
672              },
673              {
674               xtype : 'Column',
675               labelAlign : 'right',
676               labelWidth : 100,
677               width : 190,
678               xns : Roo.form,
679               '|xns' : 'Roo.form',
680               items  : [
681                {
682                 xtype : 'NumberField',
683                 fieldLabel : _this._strings['3c311fbd0f9e51ce27b984f55164cf83'] /* Estimated */,
684                 name : 'estimated',
685                 style : 'align:right;',
686                 width : 75,
687                 xns : Roo.form,
688                 '|xns' : 'Roo.form'
689                }
690               ]
691              }
692             ]
693            }
694           ]
695          },
696          {
697           xtype : 'Column',
698           style : 'margin-left:10px',
699           width : 430,
700           listeners : {
701            render : function (_self)
702             {
703               _this.summaryCol = _self;
704             },
705            show : function (_self)
706             {
707             
708             }
709           },
710           xns : Roo.form,
711           '|xns' : 'Roo.form',
712           items  : [
713            {
714             xtype : 'FieldSet',
715             legend : _this._strings['a8dbd02aaca3948002718aeb2babeefe'] /* Summary / Details */,
716             style : 'width:410px',
717             listeners : {
718              render : function (_self)
719               {
720                 _this.summaryBox = _self;
721               },
722              show : function (_self)
723               {
724               
725               }
726             },
727             xns : Roo.form,
728             '|xns' : 'Roo.form',
729             items  : [
730              {
731               xtype : 'Column',
732               labelAlign : 'top',
733               width : 400,
734               xns : Roo.form,
735               '|xns' : 'Roo.form',
736               items  : [
737                {
738                 xtype : 'TextField',
739                 fieldLabel : _this._strings['290612199861c31d1036b185b4e69b75'] /* Summary */,
740                 name : 'summary',
741                 width : 400,
742                 xns : Roo.form,
743                 '|xns' : 'Roo.form'
744                }
745               ]
746              },
747              {
748               xtype : 'Row',
749               labelWidth : 70,
750               style : 'float:left; width:400px',
751               width : 400,
752               xns : Roo.form,
753               '|xns' : 'Roo.form',
754               items  : [
755                {
756                 xtype : 'Checkbox',
757                 boxLabel : _this._strings['1cb251ec0d568de6a929b520c4aed8d1'] /* text */,
758                 fieldLabel : _this._strings['23e6bcd09b259e6de4cd972516cb4214'] /* View as */,
759                 name : 'view_as_text',
760                 value : 1,
761                 width : 100,
762                 listeners : {
763                  check : function (_self, checked)
764                   {
765                   
766                       if (!_this.form) {
767                           return;
768                       }
769                       if (checked) {
770                       
771                            _this.form.findField('view_as').setValue('text');
772                        }
773                            
774                       
775                       
776                        if (this.radio) {
777                           return;
778                       }
779                        var md = _this.form.findField('view_as_markdown');
780                   
781                       md.radio = true;
782                       md.setValue(checked ? 0 : 1);
783                       
784                       md.radio = false;
785                   }
786                 },
787                 xns : Roo.form,
788                 '|xns' : 'Roo.form'
789                },
790                {
791                 xtype : 'Row',
792                 hideLabels : true,
793                 style : 'float: left',
794                 width : 100,
795                 xns : Roo.form,
796                 '|xns' : 'Roo.form',
797                 items  : [
798                  {
799                   xtype : 'Checkbox',
800                   boxLabel : _this._strings['590fc197fe73db0aa2ec03687a372eea'] /* markdown */,
801                   name : 'view_as_markdown',
802                   value : 1,
803                   listeners : {
804                    check : function (_self, checked)
805                     {
806                            if (!_this.form) {
807                             return;
808                         }
809                         
810                             if (checked) {
811                         
812                              _this.form.findField('view_as').setValue('markdown');
813                          }
814                         
815                          if (this.radio) {
816                             return;
817                         }
818                          var md = _this.form.findField('view_as_text');
819                     
820                         md.radio = true;
821                         md.setValue(checked ? 0 : 1);
822                         md.radio = false;
823                     }
824                   },
825                   xns : Roo.form,
826                   '|xns' : 'Roo.form'
827                  }
828                 ]
829                }
830               ]
831              },
832              {
833               xtype : 'Column',
834               labelAlign : 'top',
835               width : 400,
836               listeners : {
837                render : function (_self)
838                 {
839                   _this.descCol = _self;
840                 },
841                show : function (_self)
842                 {
843                 
844                 }
845               },
846               xns : Roo.form,
847               '|xns' : 'Roo.form',
848               items  : [
849                {
850                 xtype : 'TextArea',
851                 fieldLabel : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
852                 height : 250,
853                 name : 'description',
854                 width : 400,
855                 xns : Roo.form,
856                 '|xns' : 'Roo.form'
857                }
858               ]
859              }
860             ]
861            }
862           ]
863          },
864          {
865           xtype : 'Hidden',
866           name : 'id',
867           xns : Roo.form,
868           '|xns' : 'Roo.form'
869          },
870          {
871           xtype : 'Hidden',
872           name : 'view_as',
873           xns : Roo.form,
874           '|xns' : 'Roo.form'
875          }
876         ]
877        }
878       ]
879      }
880     ]
881    });
882  }
883 };