Pman.Tab.MTrackMilestone.bjs
[Pman.MTrack] / Pman.Tab.MTrackMilestone.bjs
1 {
2     "id": "roo-file-126",
3     "name": "Pman.Tab.MTrackMilestone",
4     "parent": "Pman.Tab.MTrack",
5     "title": "Pman.Tab.MTrackMilestone",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackMilestone.bjs",
7     "items": [
8         {
9             "|xns": "Roo",
10             "xtype": "GridPanel",
11             "title": "mtrack_milestone",
12             "fitToframe": true,
13             "fitContainer": true,
14             "tableName": "mtrack_milestone",
15             "background": true,
16             "region": "center",
17             "listeners": {
18                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
19             },
20             "items": [
21                 {
22                     "*prop": "grid",
23                     "xtype": "Grid",
24                     "autoExpandColumn": "name",
25                     "loadMask": true,
26                     "listeners": {
27                         "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
28                         "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
29                     },
30                     "|xns": "Roo.grid",
31                     "items": [
32                         {
33                             "listeners": {
34                                 "beforeload": "function (_self, options)\n{\n    options.params._with_active_tickets = 1;\n}"
35                             },
36                             "*prop": "dataSource",
37                             "remoteSort": true,
38                             "xtype": "Store",
39                             "|sortInfo": "{ field : 'duedate', direction: 'ASC' }",
40                             "|xns": "Roo.data",
41                             "items": [
42                                 {
43                                     "*prop": "proxy",
44                                     "xtype": "HttpProxy",
45                                     "method": "GET",
46                                     "|url": "baseURL + '/Roo/mtrack_milestone.php'",
47                                     "|xns": "Roo.data"
48                                 },
49                                 {
50                                     "|xns": "Roo.data",
51                                     "xtype": "JsonReader",
52                                     "totalProperty": "total",
53                                     "root": "data",
54                                     "*prop": "reader",
55                                     "id": "id",
56                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'startdate',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'duedate',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'completed',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'deleted',\n        'type': 'int'\n    },\n    {\n        'name': 'created',\n        'type': 'int'\n    },\n    {\n        'name': 'updated',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'deleted_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'deleted_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'updated_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'created_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'created_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'created_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'created_reason',\n        'type': 'string'\n    }\n]"
57                                 }
58                             ]
59                         },
60                         {
61                             "*prop": "footer",
62                             "xtype": "PagingToolbar",
63                             "pageSize": 25,
64                             "displayInfo": true,
65                             "displayMsg": "Displaying mtrack_milestone{0} - {1} of {2}",
66                             "emptyMsg": "No mtrack_milestone found",
67                             "|xns": "Roo"
68                         },
69                         {
70                             "*prop": "toolbar",
71                             "xtype": "Toolbar",
72                             "|xns": "Roo",
73                             "items": [
74                                 {
75                                     "text": "Add",
76                                     "xtype": "Button",
77                                     "cls": "x-btn-text-icon",
78                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
79                                     "listeners": {
80                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
81                                     },
82                                     "|xns": "Roo.Toolbar"
83                                 },
84                                 {
85                                     "text": "Edit",
86                                     "xtype": "Button",
87                                     "cls": "x-btn-text-icon",
88                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
89                                     "listeners": {
90                                         "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
91                                     },
92                                     "|xns": "Roo.Toolbar"
93                                 },
94                                 {
95                                     "text": "Delete",
96                                     "cls": "x-btn-text-icon",
97                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
98                                     "xtype": "Button",
99                                     "listeners": {
100                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'mtrack_milestone'); \n}\n        "
101                                     },
102                                     "|xns": "Roo.Toolbar"
103                                 }
104                             ]
105                         },
106                         {
107                             "*prop": "colModel[]",
108                             "dataIndex": "project_id_name",
109                             "header": "Project",
110                             "width": 150,
111                             "xtype": "ColumnModel",
112                             "|renderer": "function(v) { return String.format('{0}', v); }",
113                             "|xns": "Roo.grid"
114                         },
115                         {
116                             "*prop": "colModel[]",
117                             "dataIndex": "active_tickets",
118                             "header": "Active Tickets",
119                             "width": 50,
120                             "xtype": "ColumnModel",
121                             "|renderer": "function(v) { return String.format('{0}', v); }",
122                             "|xns": "Roo.grid"
123                         },
124                         {
125                             "xtype": "ColumnModel",
126                             "header": "Name",
127                             "width": 200,
128                             "dataIndex": "name",
129                             "|renderer": "function(v) { return String.format('{0}', v); }",
130                             "|xns": "Roo.grid",
131                             "*prop": "colModel[]"
132                         },
133                         {
134                             "xtype": "ColumnModel",
135                             "header": "Description",
136                             "width": 200,
137                             "dataIndex": "description",
138                             "|renderer": "function(v) { return String.format('{0}', v); }",
139                             "|xns": "Roo.grid",
140                             "*prop": "colModel[]"
141                         },
142                         {
143                             "xtype": "ColumnModel",
144                             "header": "Startdate",
145                             "width": 75,
146                             "dataIndex": "startdate",
147                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
148                             "|xns": "Roo.grid",
149                             "*prop": "colModel[]"
150                         },
151                         {
152                             "xtype": "ColumnModel",
153                             "header": "Duedate",
154                             "width": 75,
155                             "dataIndex": "duedate",
156                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
157                             "|xns": "Roo.grid",
158                             "*prop": "colModel[]"
159                         },
160                         {
161                             "xtype": "ColumnModel",
162                             "header": "Completed",
163                             "width": 75,
164                             "dataIndex": "completed",
165                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
166                             "|xns": "Roo.grid",
167                             "*prop": "colModel[]"
168                         }
169                     ]
170                 }
171             ]
172         }
173     ],
174     "permname": "",
175     "modOrder": "200"
176 }