3 "name": "Pman.Tab.MTrackTimeline",
4 "parent": "Pman.Tab.DocumentsTab",
6 "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackTimeline.bjs",
10 "activate": "function (_self)\n{\n // navigation..\n // a) record the fact we go here.. (for history)\n \n // when page loads, we have to go to this page..\n \n // at other times, we just check \n // a) project was the same as before... - do not change.\n // b) \n _this.project = _this.project || 0;\n \n \n if (typeof(MTrackWeb) != 'undefined' && !MTrackWeb.Layout) {\n return;\n }\n /*\n if (!_this.iscroll) { \n \n (function() {\n \n try {\n _this.iscroll = new Roo.ux.Iscroll(_this.tpanel.el.dom);\n } catch(e) { \n Roo.log(e);\n }\n }).defer(100); \n\n }\n _this.iscroll = true; \n \n */\n var chg_project = (_this.project != Pman.Tab.DocumentsTab.panel.getProjectId());\n \n _this.project = Pman.Tab.DocumentsTab.panel.getProjectId();\n \n if (typeof(MTrackWeb) == 'undefined') {\n return;\n }\n try { \n window.history.pushState( { url: '/Timeline' }, 'Timeline' , baseURL + '/Timeline' );\n } catch (e) {}\n \n MTrack.currentURL = '/Timeline';\n if (chg_project) {\n (function() {\n _this.grid.ds.load({});\n //_this.tpanel.view.store.load({});\n }).defer(100);\n }\n \n \n}"
16 "title": "Project Timeline",
17 "xtype": "NestedLayoutPanel",
22 "xtype": "BorderLayout",
28 "xtype": "LayoutRegion",
34 "xtype": "LayoutRegion",
39 "activate": "function (_self)\n{\n _this.tpanel = _self;\n}"
47 "xtype": "ContentPanel",
48 "|mload": "function(url) {\n\n // can you actually link to this page..\n // perhaps a specific day..\n\n this._url = url;\n // this._project = MTrack.projectCombo.getValue();\n // MTrack.ajaxLoad(url, this);\n _this.grid.ds.load({});\n \n}\n",
57 "text": "Select a date to refresh..",
70 "|url": "rootURL + '/Pman/MTrack/templates/timeline.html'",
82 "|url": "baseURL + '/Roo/mtrack_change.php'",
93 "xtype": "NestedLayoutPanel",
98 "xtype": "BorderLayout",
103 "xtype": "LayoutRegion",
109 "xtype": "LayoutRegion",
114 "|activate": "function() {\n _this.gridpanel = this;\n\n}"
118 "fitContainer": true,
121 "tableName": "Events",
123 "xtype": "GridPanel",
128 "|render": "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n this.dataSource.load({});\n\n}"
131 "autoExpandColumn": "person_id_name",
138 "afterselectionchange": "function (_self)\n{\n // select the data..\n \n var r= _this.grid.sm.getSelected();\n \n \n _this.datePicker.setValue(r.data.changeday);\n // _this.tpanel.view.store.load({});\n}"
141 "singleSelect": true,
142 "xtype": "RowSelectionModel",
147 "beforeload": "function (_self, o)\n{\n o = o || {};\n o.params = o.params || {};\n \n if (!_this.datePicker || !_this.datePicker.getValue) {\n return false;\n }\n o.params.from_date = _this.datePicker.activeDate.format(\"Y-m-01\");\n o.params.viewtype = 'summary'; \n o.params.timeline = 1;\n // project?\n o.params.project = Pman.Tab.DocumentsTab.panel.getProjectId();\n}"
149 "*prop": "dataSource",
152 "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
158 "xtype": "HttpProxy",
159 "|url": "baseURL + '/Roo/mtrack_change.php'",
166 "totalProperty": "total",
167 "xtype": "JsonReader",
168 "|fields": "[\n {\n 'name': 'person_id',\n 'type': 'int'\n },\n {\n 'name': 'person_name',\n 'type': 'string'\n },\n {\n 'name': 'changeday',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'nchanges',\n 'type': 'int'\n },\n 'project_code',\n 'project_id',\n \n\n]",
174 "*prop": "colModel[]",
175 "dataIndex": "changeday",
178 "xtype": "ColumnModel",
179 "|renderer": "function(v,x,r) { \n\n return String.format('{0}', v ? v.format('d') : '' );\n }",
183 "*prop": "colModel[]",
184 "dataIndex": "project_code",
187 "xtype": "ColumnModel",
188 "|renderer": "function(v,x,r) { \n \n Roo.log(r);\n return String.format( '{0}' ,v );\n }\n ",
192 "*prop": "colModel[]",
193 "dataIndex": "person_name",
196 "xtype": "ColumnModel",
197 "|renderer": "function(v,x,r) { \n \n return String.format( '{0}' , v);\n }\n ",
201 "*prop": "colModel[]",
203 "dataIndex": "nchanges",
206 "xtype": "ColumnModel",
207 "|renderer": "function(v,x,r) { \n return v * 1;\n }\n ",
216 "xtype": "ContentPanel",
221 "render": "function (_self)\n{\n _this.datePicker = _self;\n}",
222 "select": "function (_self, date)\n{\n if (_this.tpanel.view.store) {\n return;\n }\n _this.tpanel.view.store.load({});\n}",
223 "monthchange": "function (_self, date)\n{\n if (_this.grid) {\n _this.grid.ds.load({ });\n }\n}"
225 "xtype": "DatePicker",