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({});
117 url : rootURL + '/Pman/MTrack/templates/timeline.html'
126 url : baseURL + '/Roo/mtrack_change.php'
133 totalProperty : 'total',
140 'name': 'person_name',
146 'dateFormat': 'Y-m-d'
168 text : "Select a date to refresh.."
174 xtype: 'NestedLayoutPanel',
178 xtype: 'BorderLayout',
185 activate : function() {
186 _this.gridpanel = this;
195 tableName : 'Events',
204 //_this.dialog = Pman.Dialog.FILL_IN
205 this.dataSource.load({});
209 autoExpandColumn : 'person_id_name',
212 xtype: 'RowSelectionModel',
215 afterselectionchange : function (_self)
219 var r= _this.grid.sm.getSelected();
222 _this.datePicker.setValue(r.data.changeday);
223 // _this.tpanel.view.store.load({});
232 beforeload : function (_self, o)
235 o.params = o.params || {};
237 if (!_this.datePicker || !_this.datePicker.getValue) {
240 o.params.from_date = _this.datePicker.activeDate.format("Y-m-01");
241 o.params.viewtype = 'summary';
242 o.params.timeline = 1;
244 o.params.project = Pman.Tab.DocumentsTab.panel.getProjectId();
248 sortInfo : { field : 'person_name', direction: 'ASC' },
253 url : baseURL + '/Roo/mtrack_change.php'
260 totalProperty : 'total',
267 'name': 'person_name',
273 'dateFormat': 'Y-m-d'
288 xtype: 'ColumnModel',
290 dataIndex : 'changeday',
293 renderer : function(v,x,r) {
295 return String.format('{0}', v ? v.format('d') : '' );
299 xtype: 'ColumnModel',
301 dataIndex : 'project_code',
304 renderer : function(v,x,r) {
307 return String.format( '{0}' ,v );
311 xtype: 'ColumnModel',
313 dataIndex : 'person_name',
316 renderer : function(v,x,r) {
318 return String.format( '{0}' , v);
322 xtype: 'ColumnModel',
325 dataIndex : 'nchanges',
328 renderer : function(v,x,r) {
336 xtype: 'ContentPanel',
344 render : function (_self)
346 _this.datePicker = _self;
348 select : function (_self, date)
350 if (_this.tpanel.view.store) {
353 _this.tpanel.view.store.load({});
355 monthchange : function (_self, date)
358 _this.grid.ds.load({ });
367 xtype: 'LayoutRegion',
371 xtype: 'LayoutRegion',
379 xtype: 'LayoutRegion',
384 xtype: 'LayoutRegion',