1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.MTrackMilestone = new Roo.XComponent({
10 'fa444e1c75f40633fccded45b0870206' :"No mtrack_milestone found",
11 '54e1d44609e3abed11f6e1eb6ae54988' :"Projects",
12 'b8cb81ab43044c454c1e69dbba646b68' :"On-hold",
13 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
14 '9e727fdd3aec8274f46685441900280d' :"Project",
15 '7dce122004969d56ae2e0245cb754d35' :"Edit",
16 'd5e96f1a04f3dd132b193765eee39b9e' :"Duedate",
17 'c6030af9c753c4081d7ba01420cd0922' :"Displaying mtrack_milestone{0} - {1} of {2}",
18 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
19 'df25de42c84837baf5fa15049a8bc764' :"View:",
20 '5288ef9e03a2b0686856a301272e8e56' :"#Tickets",
21 '24f27bda5dd2c488aa9bc7700ba98c34' :"Select Projects",
22 '0460245609b5dc1fc4e3c72a84f95bb7' :"Startdate",
23 '780c165edced420f2207a4d5983e4bd0' :"Merge With another Milestone",
24 '07ca5050e697392c9ed47e6453f1453f' :"Completed",
25 '4ab658036f4f174205c384b863fed5c2' :"Milestones",
26 'e15e216fc1c639f787b1231ecdfa1bf8' :"HEAD",
27 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
28 '49ee3087348e8d44e1feda1917443987' :"Name",
29 'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
30 'db478325306f02298b2980f40223a413' :"#ref"
33 'project_id_name_emptyText' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
34 'project_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
35 'project_id_name_qtip' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
36 'project_id_name_fieldLabel' : '54e1d44609e3abed11f6e1eb6ae54988' /* Projects */
39 part : ["MTrack", "Milestone" ],
40 order : '200-Pman.Tab.MTrackMilestone',
42 parent : 'Pman.Tab.MTrack',
43 name : "Pman.Tab.MTrackMilestone",
46 _tree : function(_data)
56 tableName : 'mtrack_milestone',
57 title : _this._strings['4ab658036f4f174205c384b863fed5c2'] /* Milestones */,
59 activate : function() {
62 _this.grid.footer.onClick('first');
70 autoExpandColumn : 'description',
76 _this.dialog = Pman.Dialog.MTrackMilestone;
77 if (_this.panel.active) {
78 this.footer.onClick('first');
81 rowdblclick : function (_self, rowIndex, e)
83 if (!_this.dialog) return;
84 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
85 _this.grid.footer.onClick('first');
92 xtype : 'PagingToolbar',
94 displayMsg : _this._strings['c6030af9c753c4081d7ba01420cd0922'] /* Displaying mtrack_milestone{0} - {1} of {2} */,
95 emptyMsg : _this._strings['fa444e1c75f40633fccded45b0870206'] /* No mtrack_milestone found */,
107 text : _this._strings['df25de42c84837baf5fa15049a8bc764'] /* View: */,
109 '|xns' : 'Roo.Toolbar'
114 displayField : 'val',
116 forceSelection : true,
117 hiddenName : 'currency',
119 triggerAction : 'all',
120 value : _this._strings['e15e216fc1c639f787b1231ecdfa1bf8'] /* HEAD */,
124 beforeselect : function (combo, record, index)
126 (function() { _this.grid.footer.onClick('first'); }).defer(100);
128 render : function (_self)
130 _this.viewType = this;
136 xtype : 'SimpleStore',
138 [ 'HEAD', 'Head Milestones' ],
139 [ 'ACTIVE', 'Active Milestones' ],
140 [ 'ALL', 'All Milestones' ]
142 fields : [ 'key' , 'val' ],
150 displayField : 'name',
152 emptyText : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
153 fieldLabel : _this._strings['54e1d44609e3abed11f6e1eb6ae54988'] /* Projects */,
154 forceSelection : true,
155 hiddenName : 'project_id',
157 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
159 name : 'project_id_name',
161 qtip : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
163 selectOnFocus : true,
164 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> {name}</div>',
165 triggerAction : 'all',
170 beforeselect : function (combo, record, index)
172 (function() { _this.grid.footer.onClick('first')}).defer(100);
174 render : function (_self)
176 _this.projsel = _self;
184 sortInfo : { direction : 'ASC', field: 'code' },
186 beforeload : function (_self, o){
187 o.params = o.params || {};
196 url : baseURL + '/Roo/Projects.php',
201 xtype : 'JsonReader',
202 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
205 totalProperty : 'total',
214 '|xns' : 'Roo.Toolbar'
218 cls : 'x-btn-text-icon',
219 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
220 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
224 if (!_this.dialog) return;
225 _this.dialog.show( { id : 0 } , function() {
226 _this.grid.footer.onClick('first');
231 '|xns' : 'Roo.Toolbar'
235 cls : 'x-btn-text-icon',
236 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
237 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
241 var s = _this.grid.getSelectionModel().getSelections();
242 if (!s.length || (s.length > 1)) {
243 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
246 if (!_this.dialog) return;
247 _this.dialog.show(s[0].data, function() {
248 _this.grid.footer.onClick('first');
254 '|xns' : 'Roo.Toolbar'
258 cls : 'x-btn-text-icon',
259 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
260 text : _this._strings['780c165edced420f2207a4d5983e4bd0'] /* Merge With another Milestone */,
264 var s = _this.grid.getSelectionModel().getSelections();
265 if (!s.length || (s.length > 1)) {
266 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
270 Pman.Dialog.MTrackMilestoneMerge.show(s[0].data, function() {
271 Pman.genericDelete(_this, 'mtrack_milestone');
277 '|xns' : 'Roo.Toolbar'
281 cls : 'x-btn-text-icon',
282 icon : rootURL + '/Pman/templates/images/trash.gif',
283 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
287 Pman.genericDelete(_this, 'mtrack_milestone');
291 '|xns' : 'Roo.Toolbar'
298 sortInfo : { field : 'duedate', direction: 'ASC' },
300 beforeload : function (_self, options)
302 options.params._with_active_tickets = 1;
303 if (!_this.viewType) {
306 options.params._viewtype = _this.viewType.getValue();
308 if (_this.projsel.getValue()) {
309 options.params.project_id = _this.projsel.getValue();
320 url : baseURL + '/Roo/mtrack_milestone.php',
325 xtype : 'JsonReader',
336 'name': 'description',
342 'dateFormat': 'Y-m-d'
347 'dateFormat': 'Y-m-d'
352 'dateFormat': 'Y-m-d'
367 'name': 'project_id',
371 'name': 'deleted_id',
375 'name': 'deleted_person_id',
379 'name': 'deleted_ontable',
383 'name': 'deleted_onid',
387 'name': 'deleted_changedate',
391 'name': 'deleted_reason',
395 'name': 'updated_id',
399 'name': 'updated_person_id',
403 'name': 'updated_ontable',
407 'name': 'updated_onid',
411 'name': 'updated_changedate',
415 'name': 'updated_reason',
419 'name': 'created_id',
423 'name': 'created_person_id',
427 'name': 'created_ontable',
431 'name': 'created_onid',
435 'name': 'created_changedate',
439 'name': 'created_reason',
445 totalProperty : 'total',
452 xtype : 'ColumnModel',
454 header : _this._strings['db478325306f02298b2980f40223a413'] /* #ref */,
455 renderer : function(v) { return String.format('{0}', v); },
461 xtype : 'ColumnModel',
462 dataIndex : 'project_id_name',
463 header : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
464 renderer : function(v) { return String.format('{0}', v); },
471 xtype : 'ColumnModel',
472 dataIndex : 'active_tickets',
473 header : _this._strings['5288ef9e03a2b0686856a301272e8e56'] /* #Tickets */,
474 renderer : function(v) { return String.format('{0}', v); },
480 xtype : 'ColumnModel',
482 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
483 renderer : function(v) { return String.format('{0}', v); },
489 xtype : 'ColumnModel',
490 dataIndex : 'description',
491 header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
492 renderer : function(v) { return String.format('{0}', v); },
498 xtype : 'ColumnModel',
499 dataIndex : 'startdate',
500 header : _this._strings['0460245609b5dc1fc4e3c72a84f95bb7'] /* Startdate */,
501 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
508 xtype : 'ColumnModel',
509 dataIndex : 'duedate',
510 header : _this._strings['d5e96f1a04f3dd132b193765eee39b9e'] /* Duedate */,
511 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
517 xtype : 'ColumnModel',
518 dataIndex : 'on_hold',
519 header : _this._strings['b8cb81ab43044c454c1e69dbba646b68'] /* On-hold */,
520 renderer : function(v) { return String.format('{0}', v ? 'HOLD' : '' ); },
526 xtype : 'ColumnModel',
527 dataIndex : 'completed',
528 header : _this._strings['07ca5050e697392c9ed47e6453f1453f'] /* Completed */,
529 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },