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                                     "allowBlank": "false",
110                                     "boxWidth": 300,
111                                     "displayField": "name",
112                                     "editable": true,
113                                     "emptyText": "Select Milestones",
114                                     "fieldLabel": "Depends On",
115                                     "forceSelection": true,
116                                     "hiddenName": "depends_on",
117                                     "listWidth": 400,
118                                     "loadingText": "Searching...",
119                                     "minChars": 2,
120                                     "name": "depends_on_list",
121                                     "pageSize": 20,
122                                     "qtip": "Select Milestones",
123                                     "queryParam": "query[name]",
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": 150,
130                                     "xtype": "ComboBoxLister",
131                                     "|xns": "Roo.form",
132                                     "items": [
133                                         {
134                                             "listeners": {
135                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
136                                             },
137                                             "*prop": "store",
138                                             "remoteSort": true,
139                                             "xtype": "Store",
140                                             "|sortInfo": "{ direction : 'ASC', field: 'name' }",
141                                             "|xns": "Roo.data",
142                                             "items": [
143                                                 {
144                                                     "*prop": "proxy",
145                                                     "method": "GET",
146                                                     "xtype": "HttpProxy",
147                                                     "|url": "baseURL + '/Roo/Mtrack_milestone.php'",
148                                                     "|xns": "Roo.data"
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                                     "|xns": "Roo.form",
165                                     "xtype": "Row",
166                                     "items": [
167                                         {
168                                             "fieldLabel": "Startdate",
169                                             "format": "Y-m-d",
170                                             "name": "startdate",
171                                             "width": 75,
172                                             "xtype": "DateField",
173                                             "|value": "(function() { (new Date()).format('Y-m-d')})()",
174                                             "|xns": "Roo.form"
175                                         },
176                                         {
177                                             "fieldLabel": "Duedate",
178                                             "format": "Y-m-d",
179                                             "name": "duedate",
180                                             "width": 75,
181                                             "xtype": "DateField",
182                                             "|xns": "Roo.form"
183                                         }
184                                     ]
185                                 },
186                                 {
187                                     "fieldLabel": "Completed",
188                                     "format": "Y-m-d",
189                                     "name": "completed",
190                                     "width": 75,
191                                     "xtype": "DateField",
192                                     "|xns": "Roo.form"
193                                 },
194                                 {
195                                     "name": "id",
196                                     "|xns": "Roo.form",
197                                     "xtype": "Hidden"
198                                 }
199                             ]
200                         }
201                     ]
202                 },
203                 {
204                     "listeners": {
205                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
206                     },
207                     "*prop": "buttons[]",
208                     "text": "Cancel",
209                     "xtype": "Button",
210                     "|xns": "Roo"
211                 },
212                 {
213                     "listeners": {
214                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
215                     },
216                     "*prop": "buttons[]",
217                     "text": "Save",
218                     "xtype": "Button",
219                     "|xns": "Roo"
220                 }
221             ]
222         }
223     ],
224     "permname": "",
225     "modOrder": "001"
226 }