1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.MTrackTimeline = new Roo.XComponent({
6 part : ["MTrack","Timeline"],
7 order : '300-Pman.Tab.MTrackTimeline',
10 name : "unnamed module",
18 xtype: 'NestedLayoutPanel',
21 activate : function (_self)
24 // a) record the fact we go here.. (for history)
26 // when page loads, we have to go to this page..
28 // at other times, we just check
29 // a) project was the same as before... - do not change.
31 _this.project = _this.project || 0;
34 if (typeof(MTrackWeb) != 'undefined' && !MTrackWeb.Layout) {
38 if (typeof(Pman.Tab.DocumentsTab) == 'undefined') {
47 _this.iscroll = new Roo.ux.Iscroll(_this.tpanel.el.dom);
57 var chg_project = (_this.project != Pman.Tab.DocumentsTab.panel.getProjectId());
59 _this.project = Pman.Tab.DocumentsTab.panel.getProjectId();
61 if (typeof(MTrackWeb) == 'undefined') {
65 window.history.pushState( { url: '/Timeline' }, 'Timeline' , baseURL + '/Timeline' );
68 MTrack.currentURL = '/Timeline';
71 _this.grid.ds.load({});
72 //_this.tpanel.view.store.load({});
83 title : "Project Timeline",
85 xtype: 'BorderLayout',
89 xtype: 'ContentPanel',
92 activate : function (_self)
103 mload : function(url) {
105 // can you actually link to this page..
106 // perhaps a specific day..
109 // this._project = MTrack.projectCombo.getValue();
110 // MTrack.ajaxLoad(url, this);
111 _this.grid.ds.load({});
119 beforeselect : function (_self, node, selections)
122 //Roo.log(this.indexOf(node));
123 var rec = this.store.getAt(this.indexOf(node));
132 selectedClass : 'change-log-item-expanded',
133 singleSelect : false,
138 url : rootURL + '/Pman/MTrack/templates/timeline.html'
144 beforeload : function (_self, o)
147 o.params = o.params || {};
149 var sel = _this.grid.selModel.getSelected();
150 o.params.from_date = sel.data.changeday.format("Y-m-d");
151 o.params.person_id = sel.data.person_id;
152 // o.params.viewtype = 'summary';
153 o.params.timeline = 1;
155 o.params.project_id = sel.data.project_id;
156 o.params.limit = 9999;
160 sortInfo : { field : 'person_name', direction: 'ASC' },
165 url : baseURL + '/Roo/mtrack_change.php'
172 totalProperty : 'total',
179 'name': 'person_name',
185 'dateFormat': 'Y-m-d'
207 text : "Select a date to refresh.."
213 xtype: 'NestedLayoutPanel',
217 xtype: 'BorderLayout',
224 activate : function() {
225 _this.gridpanel = this;
234 tableName : 'Events',
243 //_this.dialog = Pman.Dialog.FILL_IN
244 this.dataSource.load({});
248 autoExpandColumn : 'person_id_name',
251 xtype: 'RowSelectionModel',
254 afterselectionchange : function (_self)
258 var r= _this.grid.sm.getSelected();
261 _this.datePicker.setValue(r.data.changeday);
262 _this.tpanel.view.store.load({});
272 beforeload : function (_self, o)
275 o.params = o.params || {};
277 if (!_this.datePicker || !_this.datePicker.getValue) {
280 o.params.from_date = _this.datePicker.activeDate.format("Y-m-01");
281 o.params.viewtype = 'summary';
282 o.params.timeline = 1;
284 o.params.project_id = Pman.Tab.DocumentsTab ? Pman.Tab.DocumentsTab.panel.getProjectId() : 0;
288 sortInfo : { field : 'person_name', direction: 'ASC' },
293 url : baseURL + '/Roo/mtrack_change.php'
300 totalProperty : 'total',
307 'name': 'person_name',
313 'dateFormat': 'Y-m-d'
328 xtype: 'ColumnModel',
330 dataIndex : 'changeday',
333 renderer : function(v,x,r) {
335 return String.format('{0}', v ? v.format('d') : '' );
339 xtype: 'ColumnModel',
341 dataIndex : 'project_code',
344 renderer : function(v,x,r) {
347 return String.format( '{0}' ,v );
351 xtype: 'ColumnModel',
353 dataIndex : 'person_name',
356 renderer : function(v,x,r) {
358 return String.format( '{0}' , v);
362 xtype: 'ColumnModel',
365 dataIndex : 'nchanges',
368 renderer : function(v,x,r) {
376 xtype: 'ContentPanel',
384 render : function (_self)
386 _this.datePicker = _self;
388 select : function (_self, date)
393 _this.tpanel.view.store.load({});
395 monthchange : function (_self, date)
398 _this.grid.ds.load({ });
407 xtype: 'LayoutRegion',
411 xtype: 'LayoutRegion',
419 xtype: 'LayoutRegion',
424 xtype: 'LayoutRegion',