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',
9 parent : 'Pman.Tab.DocumentsTab',
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) {
43 _this.iscroll = new Roo.ux.Iscroll(_this.tpanel.el.dom);
53 var chg_project = (_this.project != Pman.Tab.DocumentsTab.panel.getProjectId());
55 _this.project = Pman.Tab.DocumentsTab.panel.getProjectId();
57 if (typeof(MTrackWeb) == 'undefined') {
61 window.history.pushState( { url: '/Timeline' }, 'Timeline' , baseURL + '/Timeline' );
64 MTrack.currentURL = '/Timeline';
67 _this.grid.ds.load({});
68 //_this.tpanel.view.store.load({});
79 title : "Project Timeline",
81 xtype: 'BorderLayout',
85 xtype: 'ContentPanel',
88 activate : function (_self)
99 mload : function(url) {
101 // can you actually link to this page..
102 // perhaps a specific day..
105 // this._project = MTrack.projectCombo.getValue();
106 // MTrack.ajaxLoad(url, this);
107 _this.grid.ds.load({});
114 tpl : new Roo.XTemplate({ url : rootURL + '/Pman/MTrack/templates/timeline.html' })
124 text : "Select a date to refresh.."
130 xtype: 'NestedLayoutPanel',
134 xtype: 'BorderLayout',
141 activate : function() {
142 _this.gridpanel = this;
151 tableName : 'Events',
160 //_this.dialog = Pman.Dialog.FILL_IN
161 this.dataSource.load({});
165 autoExpandColumn : 'person_id_name',
168 xtype: 'RowSelectionModel',
171 afterselectionchange : function (_self)
175 var r= _this.grid.sm.getSelected();
178 _this.datePicker.setValue(r.data.changeday);
179 // _this.tpanel.view.store.load({});
188 beforeload : function (_self, o)
191 o.params = o.params || {};
193 if (!_this.datePicker || !_this.datePicker.getValue) {
196 o.params.from_date = _this.datePicker.activeDate.format("Y-m-01");
197 o.params.viewtype = 'summary';
198 o.params.timeline = 1;
200 o.params.project = Pman.Tab.DocumentsTab.panel.getProjectId();
204 sortInfo : { field : 'person_name', direction: 'ASC' },
209 url : baseURL + '/Roo/mtrack_change.php'
216 totalProperty : 'total',
223 'name': 'person_name',
229 'dateFormat': 'Y-m-d'
244 xtype: 'ColumnModel',
246 dataIndex : 'changeday',
249 renderer : function(v,x,r) {
251 return String.format('{0}', v ? v.format('d') : '' );
255 xtype: 'ColumnModel',
257 dataIndex : 'project_code',
260 renderer : function(v,x,r) {
263 return String.format( '{0}' ,v );
267 xtype: 'ColumnModel',
269 dataIndex : 'person_name',
272 renderer : function(v,x,r) {
274 return String.format( '{0}' , v);
278 xtype: 'ColumnModel',
281 dataIndex : 'nchanges',
284 renderer : function(v,x,r) {
292 xtype: 'ContentPanel',
300 render : function (_self)
302 _this.datePicker = _self;
304 select : function (_self, date)
306 if (_this.tpanel.view.store) {
309 _this.tpanel.view.store.load({});
311 monthchange : function (_self, date)
314 _this.grid.ds.load({ });
323 xtype: 'LayoutRegion',
327 xtype: 'LayoutRegion',
335 xtype: 'LayoutRegion',
340 xtype: 'LayoutRegion',