Pman.Dialog.MTrackRepos.bjs
[Pman.MTrack] / Pman.Dialog.MTrackRepos.bjs
1 {
2     "id": "roo-file-137",
3     "name": "Pman.Dialog.MTrackRepos",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackRepos.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 420,
12             "resizable": false,
13             "title": "Edit / Create mtrack_repos",
14             "width": 400,
15             "xtype": "LayoutDialog",
16             "|xns": "Roo",
17             "items": [
18                 {
19                     "|xns": "Roo",
20                     "xtype": "LayoutRegion",
21                     "*prop": "center"
22                 },
23                 {
24                     "region": "center",
25                     "xtype": "ContentPanel",
26                     "|xns": "Roo",
27                     "items": [
28                         {
29                             "|xns": "Roo.form",
30                             "xtype": "Form",
31                             "listeners": {
32                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       //_this.dialog.el.mask(\"Loading\");\n       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
33                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
34                             },
35                             "method": "POST",
36                             "style": "margin:10px;",
37                             "|url": "baseURL + '/Roo/mtrack_repos.php'",
38                             "items": [
39                                 {
40                                     "fieldLabel": "Shortname",
41                                     "name": "shortname",
42                                     "width": 200,
43                                     "|xns": "Roo.form",
44                                     "xtype": "TextField"
45                                 },
46                                 {
47                                     "fieldLabel": "Scmtype",
48                                     "name": "scmtype",
49                                     "width": 200,
50                                     "|xns": "Roo.form",
51                                     "xtype": "TextField"
52                                 },
53                                 {
54                                     "fieldLabel": "Repopath",
55                                     "name": "repopath",
56                                     "width": 200,
57                                     "|xns": "Roo.form",
58                                     "xtype": "TextField"
59                                 },
60                                 {
61                                     "fieldLabel": "Browserurl",
62                                     "name": "browserurl",
63                                     "width": 200,
64                                     "|xns": "Roo.form",
65                                     "xtype": "TextField"
66                                 },
67                                 {
68                                     "fieldLabel": "Browsertype",
69                                     "name": "browsertype",
70                                     "width": 200,
71                                     "|xns": "Roo.form",
72                                     "xtype": "TextField"
73                                 },
74                                 {
75                                     "fieldLabel": "Description",
76                                     "name": "description",
77                                     "width": 200,
78                                     "|xns": "Roo.form",
79                                     "xtype": "TextArea",
80                                     "height": 100
81                                 },
82                                 {
83                                     "fieldLabel": "Serverurl",
84                                     "name": "serverurl",
85                                     "width": 200,
86                                     "|xns": "Roo.form",
87                                     "xtype": "TextField"
88                                 },
89                                 {
90                                     "fieldLabel": "Parent",
91                                     "name": "parent",
92                                     "width": 200,
93                                     "|xns": "Roo.form",
94                                     "xtype": "TextField"
95                                 },
96                                 {
97                                     "fieldLabel": "Clonedfrom",
98                                     "name": "clonedfrom",
99                                     "width": 75,
100                                     "|xns": "Roo.form",
101                                     "xtype": "TextField"
102                                 },
103                                 {
104                                     "allowBlank": "false",
105                                     "displayField": "name",
106                                     "editable": "false",
107                                     "emptyText": "Select Projects",
108                                     "fieldLabel": "Projects",
109                                     "forceSelection": true,
110                                     "hiddenName": "project_id",
111                                     "listWidth": 400,
112                                     "loadingText": "Searching...",
113                                     "minChars": 2,
114                                     "name": "project_id_name",
115                                     "pageSize": 20,
116                                     "qtip": "Select Projects",
117                                     "queryParam": "",
118                                     "selectOnFocus": true,
119                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
120                                     "triggerAction": "all",
121                                     "typeAhead": true,
122                                     "valueField": "id",
123                                     "width": 300,
124                                     "xtype": "ComboBox",
125                                     "|xns": "Roo.form",
126                                     "items": [
127                                         {
128                                             "*prop": "store",
129                                             "xtype": "Store",
130                                             "|xns": "Roo.data",
131                                             "remoteSort": true,
132                                             "|sortInfo": "{ direction : 'ASC', field: 'id' }",
133                                             "listeners": {
134                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
135                                             },
136                                             "items": [
137                                                 {
138                                                     "*prop": "proxy",
139                                                     "xtype": "HttpProxy",
140                                                     "method": "GET",
141                                                     "|xns": "Roo.data",
142                                                     "|url": "baseURL + '/Roo/Projects.php'"
143                                                 },
144                                                 {
145                                                     "*prop": "reader",
146                                                     "xtype": "JsonReader",
147                                                     "|xns": "Roo.data",
148                                                     "id": "id",
149                                                     "root": "data",
150                                                     "totalProperty": "total",
151                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
152                                                 }
153                                             ]
154                                         }
155                                     ]
156                                 },
157                                 {
158                                     "fieldLabel": "Project",
159                                     "name": "project_id",
160                                     "width": 75,
161                                     "|xns": "Roo.form",
162                                     "xtype": "TextField"
163                                 },
164                                 {
165                                     "name": "id",
166                                     "|xns": "Roo.form",
167                                     "xtype": "Hidden"
168                                 }
169                             ]
170                         }
171                     ]
172                 },
173                 {
174                     "listeners": {
175                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
176                     },
177                     "*prop": "buttons[]",
178                     "text": "Cancel",
179                     "xtype": "Button",
180                     "|xns": "Roo"
181                 },
182                 {
183                     "listeners": {
184                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
185                     },
186                     "*prop": "buttons[]",
187                     "text": "Save",
188                     "xtype": "Button",
189                     "|xns": "Roo"
190                 }
191             ]
192         }
193     ],
194     "permname": "",
195     "modOrder": "001"
196 }