php warnings
[Pman.MTrack] / Pman.Dialog.MTrackBulkChange.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.MTrackBulkChange = {
8
9  _strings : {
10   '672caf27f5363dc833bda5099775e891' :"Developer",
11   '9e727fdd3aec8274f46685441900280d' :"Project",
12   '6c768695a8efb18436d5b7b4374cdb45' :"Select core_enum",
13   'ec53a8c4f07baed5d8825072c89799be' :"Status",
14   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
15   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
16   'b18d852fa0d2465fe38b05b96dd5b736' :"Bulk Update",
17   '502996d9790340c5fd7b86a5b93b1c9f' :"Priority",
18   '3cc5fe396ec583c6d9f38f80a06674a4' :"Select prioirty",
19   '24f27bda5dd2c488aa9bc7700ba98c34' :"Select Projects",
20   '340c2ee497b85d5954b01c64de7f44f6' :"Select Person",
21   '9aadb017cc5b335be77ba090d5029259' :"Select status",
22   '06933067aafd48425d67bcb01bba5cb6' :"Update"
23  },
24  _named_strings : {
25   'status_display_name_emptyText' : 'ec53a8c4f07baed5d8825072c89799be' /* Status */ ,
26   'developer_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
27   'project_id_name_emptyText' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
28   'priority_id_display_name_qtip' : '6c768695a8efb18436d5b7b4374cdb45' /* Select core_enum */ ,
29   'status_display_name_qtip' : '9aadb017cc5b335be77ba090d5029259' /* Select status */ ,
30   'priority_id_display_name_emptyText' : '3cc5fe396ec583c6d9f38f80a06674a4' /* Select prioirty */ ,
31   'developer_id_name_emptyText' : '340c2ee497b85d5954b01c64de7f44f6' /* Select Person */ ,
32   'project_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
33   'priority_id_display_name_fieldLabel' : '502996d9790340c5fd7b86a5b93b1c9f' /* Priority */ ,
34   'project_id_name_qtip' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
35   'status_display_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
36   'developer_id_name_qtip' : '340c2ee497b85d5954b01c64de7f44f6' /* Select Person */ ,
37   'project_id_name_fieldLabel' : '9e727fdd3aec8274f46685441900280d' /* Project */ ,
38   'status_display_name_fieldLabel' : 'ec53a8c4f07baed5d8825072c89799be' /* Status */ ,
39   'priority_id_display_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
40   'developer_id_name_fieldLabel' : '672caf27f5363dc833bda5099775e891' /* Developer */ 
41  },
42
43  dialog : false,
44  callback:  false,
45
46  show : function(data, cb)
47  {
48   if (!this.dialog) {
49    this.create();
50   }
51
52   this.callback = cb;
53   this.data = data;
54   this.dialog.show(this.data._el);
55   if (this.form) {
56    this.form.reset();
57    this.form.setValues(data);
58    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
59   }
60
61  },
62
63  create : function()
64  {
65    var _this = this;
66    this.dialog = Roo.factory({
67     xtype : 'LayoutDialog',
68     closable : false,
69     collapsible : false,
70     height : 300,
71     modal : true,
72     resizable : false,
73     title : _this._strings['b18d852fa0d2465fe38b05b96dd5b736'] /* Bulk Update */,
74     width : 500,
75     xns : Roo,
76     '|xns' : 'Roo',
77     center : {
78      xtype : 'LayoutRegion',
79      xns : Roo,
80      '|xns' : 'Roo'
81     },
82     buttons : [
83      {
84       xtype : 'Button',
85       text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
86       listeners : {
87        click : function (_self, e)
88         {
89             _this.dialog.hide();
90         }
91       },
92       xns : Roo,
93       '|xns' : 'Roo'
94      },
95      {
96       xtype : 'Button',
97       text : _this._strings['06933067aafd48425d67bcb01bba5cb6'] /* Update */,
98       listeners : {
99        click : function (_self, e)
100         {
101             // do some checks?
102             var params = _this.form.getValues();
103             params._bulk_update = _this.data.ids;
104           
105             Pman.Request({
106                 url : baseURL + '/Roo/mtrack_ticket',
107                 method : 'POST',
108                 params : params,
109                 mask: 'updating',
110                 success : function(res) {
111                     _this.dialog.hide();
112                     _this.callback(res);
113                 }
114              });
115         
116              
117             //_this.form.doAction("submit");
118         
119         }
120       },
121       xns : Roo,
122       '|xns' : 'Roo'
123      }
124     ],
125     items  : [
126      {
127       xtype : 'ContentPanel',
128       region : 'center',
129       xns : Roo,
130       '|xns' : 'Roo',
131       items  : [
132        {
133         xtype : 'Form',
134         method : 'POST',
135         style : 'margin:10px;',
136         url : baseURL + '/Roo/mtrack_ticket.php',
137         listeners : {
138          actioncomplete : function(_self,action)
139           {
140               if (action.type == 'setdata') {
141               
142                   _this.form.setValues(_this.data);
143                   
144                  //_this.dialog.el.mask("Loading");
145                  //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
146                  return;
147               }
148               if (action.type == 'load') {
149            
150                   return;
151               }
152               if (action.type =='submit') {
153                   return;
154                   // not used here..
155            
156                   _this.dialog.hide();
157               
158                    if (_this.callback) {
159                       _this.callback.call(_this, _this.form.getValues());
160                    }
161                    _this.form.reset();
162                    return;
163               }
164           },
165          rendered : function (form)
166           {
167               _this.form= form;
168           }
169         },
170         xns : Roo.form,
171         '|xns' : 'Roo.form',
172         items  : [
173          {
174           xtype : 'ComboBox',
175           allowBlank : false,
176           displayField : 'name',
177           editable : false,
178           emptyText : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
179           fieldLabel : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
180           forceSelection : true,
181           hiddenName : 'project_id',
182           listWidth : 400,
183           loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
184           minChars : 2,
185           name : 'project_id_name',
186           pageSize : 20,
187           qtip : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
188           queryParam : 'query[name]',
189           selectOnFocus : true,
190           tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
191           triggerAction : 'all',
192           typeAhead : true,
193           valueField : 'id',
194           width : 300,
195           xns : Roo.form,
196           '|xns' : 'Roo.form',
197           store : {
198            xtype : 'Store',
199            remoteSort : true,
200            sortInfo : { direction : 'ASC', field: 'name' },
201            listeners : {
202             beforeload : function (_self, o){
203                  o.params = o.params || {};
204                  // set more here
205              }
206            },
207            xns : Roo.data,
208            '|xns' : 'Roo.data',
209            proxy : {
210             xtype : 'HttpProxy',
211             method : 'GET',
212             url : baseURL + '/Roo/core_project',
213             xns : Roo.data,
214             '|xns' : 'Roo.data'
215            },
216            reader : {
217             xtype : 'JsonReader',
218             fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
219             id : 'id',
220             root : 'data',
221             totalProperty : 'total',
222             xns : Roo.data,
223             '|xns' : 'Roo.data'
224            }
225           }
226          },
227          {
228           xtype : 'ComboBox',
229           allowBlank : false,
230           displayField : 'display_name',
231           editable : false,
232           emptyText : _this._strings['3cc5fe396ec583c6d9f38f80a06674a4'] /* Select prioirty */,
233           fieldLabel : _this._strings['502996d9790340c5fd7b86a5b93b1c9f'] /* Priority */,
234           forceSelection : true,
235           hiddenName : 'priority_id',
236           listWidth : 400,
237           loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
238           minChars : 2,
239           name : 'priority_id_display_name',
240           pageSize : 20,
241           qtip : _this._strings['6c768695a8efb18436d5b7b4374cdb45'] /* Select core_enum */,
242           queryParam : 'query[etype]',
243           selectOnFocus : true,
244           tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>',
245           triggerAction : 'all',
246           typeAhead : true,
247           valueField : 'id',
248           width : 300,
249           xns : Roo.form,
250           '|xns' : 'Roo.form',
251           store : {
252            xtype : 'Store',
253            remoteSort : true,
254            sortInfo : { direction : 'ASC', field: 'seqid' },
255            listeners : {
256             beforeload : function (_self, o){
257                  o.params = o.params || {};
258                  // set more here
259                  o.params.etype = 'priority';
260              }
261            },
262            xns : Roo.data,
263            '|xns' : 'Roo.data',
264            proxy : {
265             xtype : 'HttpProxy',
266             method : 'GET',
267             url : baseURL + '/Roo/core_enum.php',
268             xns : Roo.data,
269             '|xns' : 'Roo.data'
270            },
271            reader : {
272             xtype : 'JsonReader',
273             fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}],
274             id : 'id',
275             root : 'data',
276             totalProperty : 'total',
277             xns : Roo.data,
278             '|xns' : 'Roo.data'
279            }
280           }
281          },
282          {
283           xtype : 'ComboBox',
284           allowBlank : false,
285           alwaysQuery : true,
286           displayField : 'display_name',
287           editable : false,
288           emptyText : _this._strings['ec53a8c4f07baed5d8825072c89799be'] /* Status */,
289           fieldLabel : _this._strings['ec53a8c4f07baed5d8825072c89799be'] /* Status */,
290           forceSelection : true,
291           hiddenName : 'status',
292           listWidth : 400,
293           loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
294           minChars : 2,
295           name : 'status_display_name',
296           pageSize : 20,
297           qtip : _this._strings['9aadb017cc5b335be77ba090d5029259'] /* Select status */,
298           queryParam : 'query[etype]',
299           selectOnFocus : true,
300           tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>',
301           triggerAction : 'all',
302           typeAhead : true,
303           valueField : 'id',
304           width : 300,
305           xns : Roo.form,
306           '|xns' : 'Roo.form',
307           store : {
308            xtype : 'Store',
309            remoteSort : true,
310            sortInfo : { direction : 'ASC', field: 'seqid' },
311            listeners : {
312             beforeload : function (_self, o){
313                  o.params = o.params || {};
314                  // set more here
315                  
316                 // o.params['query[ticket_change]'] = _this.data.ids;
317                  o.params['etype[0]'] = 'ticketstate';
318                  o.params['etype[0]'] = 'resolution';    
319                  
320              }
321            },
322            xns : Roo.data,
323            '|xns' : 'Roo.data',
324            proxy : {
325             xtype : 'HttpProxy',
326             method : 'GET',
327             url : baseURL + '/Roo/core_enum.php',
328             xns : Roo.data,
329             '|xns' : 'Roo.data'
330            },
331            reader : {
332             xtype : 'JsonReader',
333             fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}],
334             id : 'id',
335             root : 'data',
336             totalProperty : 'total',
337             xns : Roo.data,
338             '|xns' : 'Roo.data'
339            }
340           }
341          },
342          {
343           xtype : 'ComboBox',
344           allowBlank : false,
345           displayField : 'name',
346           editable : false,
347           emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */,
348           fieldLabel : _this._strings['672caf27f5363dc833bda5099775e891'] /* Developer */,
349           forceSelection : true,
350           hiddenName : 'developer_id',
351           listWidth : 400,
352           loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
353           minChars : 2,
354           name : 'developer_id_name',
355           pageSize : 20,
356           qtip : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* 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',
361           typeAhead : true,
362           valueField : 'id',
363           width : 300,
364           xns : Roo.form,
365           '|xns' : 'Roo.form',
366           store : {
367            xtype : 'Store',
368            remoteSort : true,
369            sortInfo : { direction : 'ASC', field: 'name' },
370            listeners : {
371             beforeload : function (_self, o){
372                  o.params = o.params || {};
373                  // set more here
374                  o.params['query[project_id]'] = _this.data.project_id;
375                  o.params['query[role]'] = 'DEVELOPER';
376              }
377            },
378            xns : Roo.data,
379            '|xns' : 'Roo.data',
380            proxy : {
381             xtype : 'HttpProxy',
382             method : 'GET',
383             url : baseURL + '/Roo/Person.php',
384             xns : Roo.data,
385             '|xns' : 'Roo.data'
386            },
387            reader : {
388             xtype : 'JsonReader',
389             fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
390             id : 'id',
391             root : 'data',
392             totalProperty : 'total',
393             xns : Roo.data,
394             '|xns' : 'Roo.data'
395            }
396           }
397          }
398         ]
399        }
400       ]
401      }
402     ]
403    });
404  }
405 };