Pman.Dialog.MTrackMilestone.bjs
[Pman.MTrack] / Pman.Dialog.MTrackMilestone.bjs
1 {
2     "id": "roo-file-116",
3     "name": "Pman.Dialog.MTrackMilestone",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackMilestone.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 320,
12             "resizable": false,
13             "title": "Edit / Create mtrack_milestone",
14             "width": 450,
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                             "listeners": {
30                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       if (_this.data.id) {\n\n         this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n         return;\n       }\n       return;\n    }\n    if (action.type == 'load') {\n        \n        return;\n    }\n    if (action.type =='submit') {\n    \n        \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",
31                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
32                             },
33                             "method": "POST",
34                             "style": "margin:10px;",
35                             "xtype": "Form",
36                             "|url": "baseURL + '/Roo/mtrack_milestone.php'",
37                             "|xns": "Roo.form",
38                             "items": [
39                                 {
40                                     "allowBlank": "false",
41                                     "displayField": "name",
42                                     "editable": "false",
43                                     "emptyText": "Select Project",
44                                     "fieldLabel": "Project",
45                                     "forceSelection": true,
46                                     "hiddenName": "project_id",
47                                     "listWidth": 400,
48                                     "loadingText": "Searching...",
49                                     "minChars": 2,
50                                     "name": "project_id_name",
51                                     "pageSize": 20,
52                                     "qtip": "Select Projects",
53                                     "queryParam": "query[name]",
54                                     "selectOnFocus": true,
55                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{CODE} - {name}</b> </div>",
56                                     "triggerAction": "all",
57                                     "typeAhead": true,
58                                     "valueField": "id",
59                                     "width": 300,
60                                     "xtype": "ComboBox",
61                                     "|xns": "Roo.form",
62                                     "items": [
63                                         {
64                                             "listeners": {
65                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
66                                             },
67                                             "*prop": "store",
68                                             "remoteSort": true,
69                                             "xtype": "Store",
70                                             "|sortInfo": "{ direction : 'ASC', field: 'name' }",
71                                             "|xns": "Roo.data",
72                                             "items": [
73                                                 {
74                                                     "*prop": "proxy",
75                                                     "xtype": "HttpProxy",
76                                                     "method": "GET",
77                                                     "|xns": "Roo.data",
78                                                     "|url": "baseURL + '/Roo/Projects.php'"
79                                                 },
80                                                 {
81                                                     "*prop": "reader",
82                                                     "xtype": "JsonReader",
83                                                     "|xns": "Roo.data",
84                                                     "id": "id",
85                                                     "root": "data",
86                                                     "totalProperty": "total",
87                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
88                                                 }
89                                             ]
90                                         }
91                                     ]
92                                 },
93                                 {
94                                     "fieldLabel": "Name",
95                                     "name": "name",
96                                     "width": 300,
97                                     "xtype": "TextField",
98                                     "|xns": "Roo.form"
99                                 },
100                                 {
101                                     "fieldLabel": "Description",
102                                     "height": 100,
103                                     "name": "description",
104                                     "width": 300,
105                                     "xtype": "TextArea",
106                                     "|xns": "Roo.form"
107                                 },
108                                 {
109                                     "boxWidth": 0,
110                                     "allowBlank": "false",
111                                     "displayField": "",
112                                     "editable": "false",
113                                     "emptyText": "Select Projects",
114                                     "fieldLabel": "Projects",
115                                     "forceSelection": true,
116                                     "hiddenName": "",
117                                     "listWidth": 400,
118                                     "loadingText": "Searching...",
119                                     "minChars": 2,
120                                     "name": "",
121                                     "pageSize": 20,
122                                     "qtip": "Select Projects",
123                                     "queryParam": "",
124                                     "selectOnFocus": true,
125                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
126                                     "triggerAction": "all",
127                                     "typeAhead": true,
128                                     "valueField": "id",
129                                     "width": 300,
130                                     "xtype": "ComboBoxLister",
131                                     "|xns": "Roo.form",
132                                     "items": [
133                                         {
134                                             "*prop": "store",
135                                             "xtype": "Store",
136                                             "|xns": "Roo.data",
137                                             "remoteSort": true,
138                                             "|sortInfo": "{ direction : 'ASC', field: 'id' }",
139                                             "listeners": {
140                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
141                                             },
142                                             "items": [
143                                                 {
144                                                     "*prop": "proxy",
145                                                     "xtype": "HttpProxy",
146                                                     "method": "GET",
147                                                     "|xns": "Roo.data",
148                                                     "|url": "baseURL + '/Roo/Projects.php'"
149                                                 },
150                                                 {
151                                                     "*prop": "reader",
152                                                     "xtype": "JsonReader",
153                                                     "|xns": "Roo.data",
154                                                     "id": "id",
155                                                     "root": "data",
156                                                     "totalProperty": "total",
157                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
158                                                 }
159                                             ]
160                                         }
161                                     ]
162                                 },
163                                 {
164                                     "fieldLabel": "Startdate",
165                                     "format": "Y-m-d",
166                                     "name": "startdate",
167                                     "width": 75,
168                                     "xtype": "DateField",
169                                     "|value": "(function() { (new Date()).format('Y-m-d')})()",
170                                     "|xns": "Roo.form"
171                                 },
172                                 {
173                                     "fieldLabel": "Duedate",
174                                     "format": "Y-m-d",
175                                     "name": "duedate",
176                                     "width": 75,
177                                     "xtype": "DateField",
178                                     "|xns": "Roo.form"
179                                 },
180                                 {
181                                     "fieldLabel": "Completed",
182                                     "format": "Y-m-d",
183                                     "name": "completed",
184                                     "width": 75,
185                                     "xtype": "DateField",
186                                     "|xns": "Roo.form"
187                                 },
188                                 {
189                                     "name": "id",
190                                     "|xns": "Roo.form",
191                                     "xtype": "Hidden"
192                                 }
193                             ]
194                         }
195                     ]
196                 },
197                 {
198                     "listeners": {
199                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
200                     },
201                     "*prop": "buttons[]",
202                     "text": "Cancel",
203                     "xtype": "Button",
204                     "|xns": "Roo"
205                 },
206                 {
207                     "listeners": {
208                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
209                     },
210                     "*prop": "buttons[]",
211                     "text": "Save",
212                     "xtype": "Button",
213                     "|xns": "Roo"
214                 }
215             ]
216         }
217     ],
218     "permname": "",
219     "modOrder": "001"
220 }