From: Alan Knowles Date: Sun, 1 Apr 2012 14:35:49 +0000 (+0800) Subject: MTrackWeb/templates/images/MTrackWeb/MTrackWeb.TabTimeline.bjs X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=8b09e37c726b9b9030d5dda48c862a278e23bd0a;p=web.mtrack MTrackWeb/templates/images/MTrackWeb/MTrackWeb.TabTimeline.bjs --- diff --git a/MTrackWeb/templates/images/MTrackWeb/MTrackWeb.TabTimeline.bjs b/MTrackWeb/templates/images/MTrackWeb/MTrackWeb.TabTimeline.bjs deleted file mode 100644 index 47df2b95..00000000 --- a/MTrackWeb/templates/images/MTrackWeb/MTrackWeb.TabTimeline.bjs +++ /dev/null @@ -1,238 +0,0 @@ -{ - "id": "roo-file-128", - "name": "MTrackWeb.TabTimeline", - "parent": "MTrackWeb.Layout", - "title": "", - "path": "/home/alan/gitlive/web.mtrack/MTrackWeb/templates/images/MTrackWeb/MTrackWeb.TabTimeline.bjs", - "items": [ - { - "listeners": { - "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 if (!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 != MTrackWeb.Layout.projectCombo.getValue());\n \n _this.project = MTrackWeb.Layout.projectCombo.getValue();\n \n \n \n \n \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}" - }, - "background": true, - "fitContainer": true, - "fitToFrame": true, - "region": "center", - "title": "Timeline", - "xtype": "NestedLayoutPanel", - "|xns": "Roo", - "items": [ - { - "|xns": "Roo", - "xtype": "BorderLayout", - "*prop": "layout", - "items": [ - { - "*prop": "center", - "tabPosition": "top", - "xtype": "LayoutRegion", - "|xns": "Roo" - }, - { - "*prop": "west", - "width": 200, - "xtype": "LayoutRegion", - "|xns": "Roo" - }, - { - "listeners": { - "activate": "function (_self)\n{\n _this.tpanel = _self;\n}" - }, - "autoScroll": true, - "background": true, - "fitContainer": true, - "fitToFrame": true, - "region": "center", - "title": "Timeline", - "xtype": "ContentPanel", - "|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", - "|xns": "Roo", - "items": [ - { - "|xns": "Roo", - "xtype": "Toolbar", - "*prop": "toolbar", - "items": [ - { - "text": "Select a date to refresh..", - "xtype": "Button", - "|xns": "Roo.Toolbar" - } - ] - }, - { - "xtype": "View", - "|xns": "MTrack.Timeline", - "items": [ - { - "listeners": { - "beforeload": "function (_self, o)\n{\n o = o || {};\n if (!_this.datePicker) {return false; }\n \n o.params = o.params || {};\n o.params.json = 1;\n o.params.ajax_body = 1;\n o.params.from_date = _this.datePicker.getValue().format('Y-m-d');\n}", - "load": "function (_self, records, options)\n{\n Roo.log('store - load');\n}" - }, - "*prop": "store", - "xtype": "Store", - "|xns": "Roo.data", - "items": [ - { - "*prop": "reader", - "id": "id", - "root": "data", - "totalProperty": "total", - "xtype": "JsonReader", - "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': '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\n]", - "|xns": "Roo.data" - }, - { - "*prop": "proxy", - "method": "GET", - "|url": "baseURL + '/Timeline'", - "xtype": "HttpProxy", - "|xns": "Roo.data" - } - ] - } - ] - } - ] - }, - { - "region": "west", - "xtype": "NestedLayoutPanel", - "|xns": "Roo", - "items": [ - { - "|xns": "Roo", - "xtype": "BorderLayout", - "*prop": "layout", - "items": [ - { - "*prop": "center", - "xtype": "LayoutRegion", - "|xns": "Roo" - }, - { - "*prop": "north", - "height": 220, - "xtype": "LayoutRegion", - "|xns": "Roo" - }, - { - "listeners": { - "|activate": "function() {\n _this.gridpanel = this;\n\n}" - }, - "autoScroll": true, - "background": true, - "fitContainer": true, - "fitToframe": true, - "region": "center", - "tableName": "Events", - "title": "Events", - "xtype": "GridPanel", - "|xns": "Roo", - "items": [ - { - "listeners": { - "|render": "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n this.dataSource.load({});\n\n}" - }, - "*prop": "grid", - "autoExpandColumn": "person_id_name", - "loadMask": true, - "xtype": "Grid", - "|xns": "Roo.grid", - "items": [ - { - "listeners": { - "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}" - }, - "*prop": "sm", - "singleSelect": true, - "xtype": "RowSelectionModel", - "|xns": "Roo.grid" - }, - { - "listeners": { - "beforeload": "function (_self, o)\n{\n o = o || {};\n o.params = o.params || {};\n o.params.ajax_body =1;\n o.params.json = true;\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}" - }, - "*prop": "dataSource", - "remoteSort": true, - "xtype": "Store", - "|sortInfo": "{ field : 'person_name', direction: 'ASC' }", - "|xns": "Roo.data", - "items": [ - { - "*prop": "proxy", - "method": "GET", - "xtype": "HttpProxy", - "|url": "baseURL + '/Timeline.php'", - "|xns": "Roo.data" - }, - { - "*prop": "reader", - "id": "id", - "root": "data", - "totalProperty": "total", - "xtype": "JsonReader", - "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': '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\n]", - "|xns": "Roo.data" - } - ] - }, - { - "*prop": "colModel[]", - "dataIndex": "changeday", - "header": "Date", - "width": 50, - "xtype": "ColumnModel", - "|renderer": "function(v,x,r) { \n\n return String.format('{0}', v ? v.format('d/M') : '' );\n }", - "|xns": "Roo.grid" - }, - { - "*prop": "colModel[]", - "dataIndex": "name", - "header": "Who", - "width": 100, - "xtype": "ColumnModel", - "|renderer": "function(v,x,r) { \n \n return String.format( '{0}' , v);\n }\n ", - "|xns": "Roo.grid" - }, - { - "*prop": "colModel[]", - "dataIndex": "nchanges", - "header": "Changes", - "width": 30, - "xtype": "ColumnModel", - "|renderer": "function(v,x,r) { \n return v * 1;\n }\n ", - "|xns": "Roo.grid" - } - ] - } - ] - }, - { - "region": "north", - "xtype": "ContentPanel", - "|xns": "Roo", - "items": [ - { - "listeners": { - "render": "function (_self)\n{\n _this.datePicker = _self;\n}", - "select": "function (_self, date)\n{\n if (_this.tpanel.view.store) {\n return;\n }\n _this.tpanel.view.store.load({});\n}", - "monthchange": "function (_self, date)\n{\n if (_this.grid) {\n _this.grid.ds.load({ });\n }\n}" - }, - "xtype": "DatePicker", - "|xns": "Roo" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ], - "permname": "", - "modOrder": "300" -} \ No newline at end of file