Pman.Dialog.MTrackMilestone.bjs
[Pman.MTrack] / Pman.Dialog.MTrackMilestone.bjs
1 {
2     "id": "roo-file-185",
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": 350,
12             "modal": true,
13             "resizable": false,
14             "title": "Edit / Create Milestone",
15             "width": 400,
16             "xtype": "LayoutDialog",
17             "|xns": "Roo",
18             "items": [
19                 {
20                     "|xns": "Roo",
21                     "xtype": "LayoutRegion",
22                     "*prop": "center"
23                 },
24                 {
25                     "region": "center",
26                     "xtype": "ContentPanel",
27                     "|xns": "Roo",
28                     "items": [
29                         {
30                             "listeners": {
31                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        if (_this.data.id) {\n           this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       }\n       return;\n       \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",
32                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
33                             },
34                             "method": "POST",
35                             "style": "margin:10px;",
36                             "xtype": "Form",
37                             "|url": "baseURL + '/Roo/mtrack_milestone.php'",
38                             "|xns": "Roo.form",
39                             "items": [
40                                 {
41                                     "fieldLabel": "Name",
42                                     "name": "name",
43                                     "width": 200,
44                                     "|xns": "Roo.form",
45                                     "xtype": "TextField"
46                                 },
47                                 {
48                                     "allowBlank": false,
49                                     "displayField": "name",
50                                     "editable": false,
51                                     "emptyText": "Select Projects",
52                                     "fieldLabel": "Projects",
53                                     "forceSelection": true,
54                                     "hiddenName": "project_id",
55                                     "listWidth": 400,
56                                     "loadingText": "Searching...",
57                                     "minChars": 2,
58                                     "name": "project_id_name",
59                                     "pageSize": 50,
60                                     "qtip": "Select Projects",
61                                     "queryParam": "query[name]",
62                                     "selectOnFocus": true,
63                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> {name}</div>",
64                                     "triggerAction": "all",
65                                     "typeAhead": true,
66                                     "valueField": "id",
67                                     "width": 200,
68                                     "xtype": "ComboBox",
69                                     "|xns": "Roo.form",
70                                     "items": [
71                                         {
72                                             "listeners": {
73                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
74                                             },
75                                             "*prop": "store",
76                                             "remoteSort": true,
77                                             "xtype": "Store",
78                                             "|sortInfo": "{ direction : 'ASC', field: 'code' }",
79                                             "|xns": "Roo.data",
80                                             "items": [
81                                                 {
82                                                     "*prop": "proxy",
83                                                     "xtype": "HttpProxy",
84                                                     "method": "GET",
85                                                     "|xns": "Roo.data",
86                                                     "|url": "baseURL + '/Roo/Projects.php'"
87                                                 },
88                                                 {
89                                                     "*prop": "reader",
90                                                     "xtype": "JsonReader",
91                                                     "|xns": "Roo.data",
92                                                     "id": "id",
93                                                     "root": "data",
94                                                     "totalProperty": "total",
95                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
96                                                 }
97                                             ]
98                                         }
99                                     ]
100                                 },
101                                 {
102                                     "fieldLabel": "Description",
103                                     "name": "description",
104                                     "width": 200,
105                                     "|xns": "Roo.form",
106                                     "xtype": "TextArea",
107                                     "height": 100
108                                 },
109                                 {
110                                     "altFormats": "Y-m-d H:i:s",
111                                     "fieldLabel": "Startdate",
112                                     "format": "Y-m-d",
113                                     "name": "startdate",
114                                     "width": 100,
115                                     "xtype": "DateField",
116                                     "|xns": "Roo.form"
117                                 },
118                                 {
119                                     "altFormats": "Y-m-d H:i:s",
120                                     "fieldLabel": "Duedate",
121                                     "format": "Y-m-d",
122                                     "name": "duedate",
123                                     "width": 100,
124                                     "xtype": "DateField",
125                                     "|xns": "Roo.form"
126                                 },
127                                 {
128                                     "altFormats": "Y-m-d H:i:s",
129                                     "fieldLabel": "Completed",
130                                     "format": "Y-m-d",
131                                     "name": "completed",
132                                     "width": 100,
133                                     "xtype": "DateField",
134                                     "|xns": "Roo.form"
135                                 },
136                                 {
137                                     "name": "project_id",
138                                     "xtype": "Hidden",
139                                     "|xns": "Roo.form"
140                                 },
141                                 {
142                                     "name": "id",
143                                     "|xns": "Roo.form",
144                                     "xtype": "Hidden"
145                                 }
146                             ]
147                         }
148                     ]
149                 },
150                 {
151                     "listeners": {
152                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
153                     },
154                     "*prop": "buttons[]",
155                     "text": "Cancel",
156                     "xtype": "Button",
157                     "|xns": "Roo"
158                 },
159                 {
160                     "listeners": {
161                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
162                     },
163                     "*prop": "buttons[]",
164                     "text": "Save",
165                     "xtype": "Button",
166                     "|xns": "Roo"
167                 }
168             ]
169         }
170     ],
171     "permname": "",
172     "modOrder": "001"
173 }