Uncommited changes synced
[Pman.MTrack] / Pman.Tab.MTrackRepos.bjs
1 {
2     "id": "roo-file-134",
3     "name": "Pman.Tab.MTrackRepos",
4     "parent": "Pman.Tab.MTrack",
5     "title": "Pman.Tab.MTrackRepos",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackRepos.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
11             },
12             "background": true,
13             "fitContainer": true,
14             "fitToframe": true,
15             "region": "center",
16             "tableName": "mtrack_repos",
17             "title": "Repositories",
18             "xtype": "GridPanel",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "listeners": {
23                         "|render": "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.MTrackRepos;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
24                         "|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"
25                     },
26                     "*prop": "grid",
27                     "autoExpandColumn": "shortname",
28                     "loadMask": true,
29                     "xtype": "Grid",
30                     "|xns": "Roo.grid",
31                     "items": [
32                         {
33                             "*prop": "dataSource",
34                             "xtype": "Store",
35                             "remoteSort": true,
36                             "|sortInfo": "{ field : 'shortname', direction: 'ASC' }",
37                             "|xns": "Roo.data",
38                             "items": [
39                                 {
40                                     "*prop": "proxy",
41                                     "xtype": "HttpProxy",
42                                     "method": "GET",
43                                     "|url": "baseURL + '/Roo/mtrack_repos.php'",
44                                     "|xns": "Roo.data"
45                                 },
46                                 {
47                                     "|xns": "Roo.data",
48                                     "xtype": "JsonReader",
49                                     "totalProperty": "total",
50                                     "root": "data",
51                                     "*prop": "reader",
52                                     "id": "id",
53                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'shortname',\n        'type': 'string'\n    },\n    {\n        'name': 'scmtype',\n        'type': 'string'\n    },\n    {\n        'name': 'repopath',\n        'type': 'string'\n    },\n    {\n        'name': 'browserurl',\n        'type': 'string'\n    },\n    {\n        'name': 'browsertype',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'serverurl',\n        'type': 'string'\n    },\n    {\n        'name': 'parent',\n        'type': 'string'\n    },\n    {\n        'name': 'clonedfrom',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    }\n]"
54                                 }
55                             ]
56                         },
57                         {
58                             "*prop": "footer",
59                             "xtype": "PagingToolbar",
60                             "pageSize": 25,
61                             "displayInfo": true,
62                             "displayMsg": "Displaying mtrack_repos{0} - {1} of {2}",
63                             "emptyMsg": "No mtrack_repos found",
64                             "|xns": "Roo"
65                         },
66                         {
67                             "*prop": "toolbar",
68                             "xtype": "Toolbar",
69                             "|xns": "Roo",
70                             "items": [
71                                 {
72                                     "listeners": {
73                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
74                                     },
75                                     "cls": "x-btn-text-icon",
76                                     "text": "Add",
77                                     "xtype": "Button",
78                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
79                                     "|xns": "Roo.Toolbar"
80                                 },
81                                 {
82                                     "listeners": {
83                                         "|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('reload');\n    }); \n    \n}\n"
84                                     },
85                                     "cls": "x-btn-text-icon",
86                                     "text": "Edit",
87                                     "xtype": "Button",
88                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
89                                     "|xns": "Roo.Toolbar"
90                                 }
91                             ]
92                         },
93                         {
94                             "*prop": "colModel[]",
95                             "dataIndex": "project_id_name",
96                             "header": "Project",
97                             "width": 150,
98                             "xtype": "ColumnModel",
99                             "|renderer": "function(v) { return String.format('{0}', v); }",
100                             "|xns": "Roo.grid"
101                         },
102                         {
103                             "xtype": "ColumnModel",
104                             "header": "Shortname",
105                             "width": 200,
106                             "dataIndex": "shortname",
107                             "|renderer": "function(v) { return String.format('{0}', v); }",
108                             "|xns": "Roo.grid",
109                             "*prop": "colModel[]"
110                         },
111                         {
112                             "*prop": "colModel[]",
113                             "dataIndex": "scmtype",
114                             "header": "Scmtype",
115                             "width": 70,
116                             "xtype": "ColumnModel",
117                             "|renderer": "function(v) { return String.format('{0}', v); }",
118                             "|xns": "Roo.grid"
119                         },
120                         {
121                             "*prop": "colModel[]",
122                             "dataIndex": "repopath",
123                             "header": "Repopath",
124                             "width": 100,
125                             "xtype": "ColumnModel",
126                             "|renderer": "function(v) { return String.format('{0}', v); }",
127                             "|xns": "Roo.grid"
128                         },
129                         {
130                             "xtype": "ColumnModel",
131                             "header": "Description",
132                             "width": 200,
133                             "dataIndex": "description",
134                             "|renderer": "function(v) { return String.format('{0}', v); }",
135                             "|xns": "Roo.grid",
136                             "*prop": "colModel[]"
137                         },
138                         {
139                             "*prop": "colModel[]",
140                             "dataIndex": "parent",
141                             "header": "Parent",
142                             "width": 100,
143                             "xtype": "ColumnModel",
144                             "|renderer": "function(v) { return String.format('{0}', v); }",
145                             "|xns": "Roo.grid"
146                         }
147                     ]
148                 }
149             ]
150         }
151     ],
152     "permname": "",
153     "modOrder": "001"
154 }