Pman.Tab.MTrackMerger.bjs
[Pman.MTrack] / Pman.Tab.MTrackMerger.bjs
1 {
2     "id": "roo-file-160",
3     "name": "Pman.Tab.MTrackMerger",
4     "parent": "Pman.Tab.MTrack",
5     "title": "Pman.Tab.MTrackMerger",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackMerger.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "activate": "function (_self)\n{\n   try {\n        var t = _this.tree.tree;\n        t.loader.load(t.root);\n    } catch(e) {}\n}"
11             },
12             "background": true,
13             "region": "center",
14             "title": "Merger",
15             "xtype": "NestedLayoutPanel",
16             "|xns": "Roo",
17             "items": [
18                 {
19                     "|xns": "Roo",
20                     "xtype": "BorderLayout",
21                     "*prop": "layout",
22                     "items": [
23                         {
24                             "*prop": "west",
25                             "split": true,
26                             "width": 200,
27                             "xtype": "LayoutRegion",
28                             "|xns": "Roo"
29                         },
30                         {
31                             "*prop": "center",
32                             "xtype": "LayoutRegion",
33                             "|xns": "Roo"
34                         },
35                         {
36                             "*prop": "south",
37                             "height": 200,
38                             "split": true,
39                             "titlebar": true,
40                             "xtype": "LayoutRegion",
41                             "|xns": "Roo"
42                         },
43                         {
44                             "listeners": {
45                                 "render": "function (_self)\n{\n  _this.tree = _self;\n}"
46                             },
47                             "autoScroll": true,
48                             "fitToFrame": true,
49                             "region": "west",
50                             "xtype": "TreePanel",
51                             "|xns": "Roo",
52                             "items": [
53                                 {
54                                     "|xns": "Roo",
55                                     "xtype": "Toolbar",
56                                     "*prop": "toolbar",
57                                     "items": [
58                                         {
59                                             "listeners": {
60                                                 "click": "function (_self, e)\n{\n  var t = _this.tree.tree;\n  t.loader.load(t.root);\n}"
61                                             },
62                                             "text": "Reload",
63                                             "xtype": "Button",
64                                             "|xns": "Roo.Toolbar"
65                                         }
66                                     ]
67                                 },
68                                 {
69                                     "|xns": "Roo.tree",
70                                     "xtype": "TreePanel",
71                                     "*prop": "tree",
72                                     "items": [
73                                         {
74                                             "listeners": {
75                                                 "selectionchange": "function (_self, node)\n{\n   _this.grid.ds.load({});\n}"
76                                             },
77                                             "*prop": "sm",
78                                             "xtype": "DefaultSelectionModel",
79                                             "|xns": "Roo.tree"
80                                         },
81                                         {
82                                             "listeners": {
83                                                 "beforeload": "function (This, node, callback)\n{\n   _this.tree.el.mask(\"Loading\");\n}",
84                                                 "load": "function (This, node, response)\n{\n     _this.tree.el.unmask();\n     _this.tree.tree.root.expand(false,true);\n}",
85                                                 "loadexception": "function (This, node, response)\n{\n _this.tree.el.unmask();\n}"
86                                             },
87                                             "*prop": "loader",
88                                             "requestMethod": "GET",
89                                             "root": "data",
90                                             "xtype": "TreeLoader",
91                                             "|baseParams": "{ _tree : 1 }",
92                                             "|dataUrl": "baseURL + '/MTrack/Merger'",
93                                             "|xns": "Roo.tree"
94                                         },
95                                         {
96                                             "*prop": "root",
97                                             "text": "All Changes",
98                                             "xtype": "TreeNode",
99                                             "|xns": "Roo.tree"
100                                         }
101                                     ]
102                                 }
103                             ]
104                         },
105                         {
106                             "listeners": {
107                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        //_this.grid.footer.onClick('first');\n    }\n}"
108                             },
109                             "background": true,
110                             "fitContainer": true,
111                             "fitToframe": true,
112                             "region": "center",
113                             "tableName": "core_enum",
114                             "title": "core_enum",
115                             "xtype": "GridPanel",
116                             "|xns": "Roo",
117                             "items": [
118                                 {
119                                     "listeners": {
120                                         "|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}",
121                                         "|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"
122                                     },
123                                     "*prop": "grid",
124                                     "autoExpandColumn": "etype",
125                                     "loadMask": true,
126                                     "xtype": "Grid",
127                                     "|xns": "Roo.grid",
128                                     "items": [
129                                         {
130                                             "listeners": {
131                                                 "beforeload": "function (_self, options)\n{\n   if (!_this.tree.tree.selModel.getSelectedNode()) {\n       return false;\n   }\n   \n   options.params._changedFiles = _this.tree.tree.selModel.getSelectedNode().attributes.rev;\n}"
132                                             },
133                                             "*prop": "dataSource",
134                                             "remoteSort": false,
135                                             "|sortInfo": "{ field: 'filename', dir : 'ASC' }",
136                                             "xtype": "Store",
137                                             "|xns": "Roo.data",
138                                             "items": [
139                                                 {
140                                                     "*prop": "proxy",
141                                                     "method": "GET",
142                                                     "xtype": "HttpProxy",
143                                                     "|url": "baseURL + '/MTrack/Merger.php'",
144                                                     "|xns": "Roo.data"
145                                                 },
146                                                 {
147                                                     "*prop": "reader",
148                                                     "id": "id",
149                                                     "root": "data",
150                                                     "totalProperty": "total",
151                                                     "xtype": "JsonReader",
152                                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'filename',\n        'type': 'string'\n    },\n    {\n        'name': 'added',\n        'type': 'int'\n    },\n    {\n        'name': 'removed',\n        'type': 'int'\n    }\n\n]",
153                                                     "|xns": "Roo.data"
154                                                 }
155                                             ]
156                                         },
157                                         {
158                                             "*prop": "sm",
159                                             "singleSelect": false,
160                                             "xtype": "RowSelectionModel",
161                                             "|xns": "Roo.grid"
162                                         },
163                                         {
164                                             "*prop": "toolbar",
165                                             "xtype": "Toolbar",
166                                             "|xns": "Roo",
167                                             "items": [
168                                                 {
169                                                     "listeners": {
170                                                         "|click": "function()\n{\n   \n}\n"
171                                                     },
172                                                     "cls": "x-btn-text-icon",
173                                                     "text": "Create Commit",
174                                                     "xtype": "Button",
175                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
176                                                     "|xns": "Roo.Toolbar"
177                                                 }
178                                             ]
179                                         },
180                                         {
181                                             "*prop": "colModel[]",
182                                             "dataIndex": "filename",
183                                             "header": "File",
184                                             "width": 200,
185                                             "xtype": "ColumnModel",
186                                             "|renderer": "function(v) { return String.format('{0}', v); }",
187                                             "|xns": "Roo.grid"
188                                         },
189                                         {
190                                             "*prop": "colModel[]",
191                                             "dataIndex": "added",
192                                             "header": "Added",
193                                             "width": 50,
194                                             "xtype": "ColumnModel",
195                                             "|renderer": "function(v) { return String.format('{0}', v); }",
196                                             "|xns": "Roo.grid"
197                                         },
198                                         {
199                                             "*prop": "colModel[]",
200                                             "dataIndex": "removed",
201                                             "header": "Removed",
202                                             "width": 50,
203                                             "xtype": "ColumnModel",
204                                             "|renderer": "function(v) { return String.format('{0}', v); }",
205                                             "|xns": "Roo.grid"
206                                         }
207                                     ]
208                                 }
209                             ]
210                         },
211                         {
212                             "region": "south",
213                             "title": "Review Changes",
214                             "xtype": "ContentPanel",
215                             "|xns": "Roo"
216                         }
217                     ]
218                 }
219             ]
220         }
221     ],
222     "permname": "",
223     "modOrder": "400"
224 }