Pman.Dialog.CorePersonContact.bjs
[Pman.Core] / Pman.Dialog.CorePersonContact.bjs
1 {
2     "id": "roo-file-129",
3     "name": "Pman.Dialog.CorePersonContact",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Core/Pman.Dialog.CorePersonContact.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 630,
12             "resizable": false,
13             "title": "Edit / Create Person",
14             "width": 500,
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/Person.php'",
38                             "items": [
39                                 {
40                                     "|xns": "Roo.form",
41                                     "xtype": "ComboBox",
42                                     "allowBlank": "false",
43                                     "editable": "false",
44                                     "emptyText": "Select Companies",
45                                     "forceSelection": true,
46                                     "listWidth": 400,
47                                     "loadingText": "Searching...",
48                                     "minChars": 2,
49                                     "pageSize": 20,
50                                     "qtip": "Select Companies",
51                                     "selectOnFocus": true,
52                                     "triggerAction": "all",
53                                     "typeAhead": true,
54                                     "width": 300,
55                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> </div>",
56                                     "queryParam": "query[code]",
57                                     "fieldLabel": "Company",
58                                     "valueField": "id",
59                                     "displayField": "code",
60                                     "hiddenName": "company_id",
61                                     "name": "company_id_code",
62                                     "items": [
63                                         {
64                                             "*prop": "store",
65                                             "xtype": "Store",
66                                             "|xns": "Roo.data",
67                                             "remoteSort": true,
68                                             "|sortInfo": "{ direction : 'ASC', field: 'id' }",
69                                             "listeners": {
70                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
71                                             },
72                                             "items": [
73                                                 {
74                                                     "*prop": "proxy",
75                                                     "xtype": "HttpProxy",
76                                                     "method": "GET",
77                                                     "|xns": "Roo.data",
78                                                     "|url": "baseURL + '/Roo/Companies.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\":\"code\",\"type\":\"string\"}]"
88                                                 }
89                                             ]
90                                         }
91                                     ]
92                                 },
93                                 {
94                                     "|xns": "Roo.form",
95                                     "xtype": "ComboBox",
96                                     "allowBlank": "false",
97                                     "editable": "false",
98                                     "emptyText": "Select Office",
99                                     "forceSelection": true,
100                                     "listWidth": 400,
101                                     "loadingText": "Searching...",
102                                     "minChars": 2,
103                                     "pageSize": 20,
104                                     "qtip": "Select Office",
105                                     "selectOnFocus": true,
106                                     "triggerAction": "all",
107                                     "typeAhead": true,
108                                     "width": 300,
109                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
110                                     "queryParam": "query[name]",
111                                     "fieldLabel": "Office",
112                                     "valueField": "id",
113                                     "displayField": "name",
114                                     "hiddenName": "office_id",
115                                     "name": "office_id_name",
116                                     "items": [
117                                         {
118                                             "*prop": "store",
119                                             "xtype": "Store",
120                                             "|xns": "Roo.data",
121                                             "remoteSort": true,
122                                             "|sortInfo": "{ direction : 'ASC', field: 'id' }",
123                                             "listeners": {
124                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
125                                             },
126                                             "items": [
127                                                 {
128                                                     "*prop": "proxy",
129                                                     "xtype": "HttpProxy",
130                                                     "method": "GET",
131                                                     "|xns": "Roo.data",
132                                                     "|url": "baseURL + '/Roo/Office.php'"
133                                                 },
134                                                 {
135                                                     "*prop": "reader",
136                                                     "xtype": "JsonReader",
137                                                     "|xns": "Roo.data",
138                                                     "id": "id",
139                                                     "root": "data",
140                                                     "totalProperty": "total",
141                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
142                                                 }
143                                             ]
144                                         }
145                                     ]
146                                 },
147                                 {
148                                     "fieldLabel": "Name",
149                                     "name": "name",
150                                     "width": 300,
151                                     "xtype": "TextField",
152                                     "|xns": "Roo.form"
153                                 },
154                                 {
155                                     "fieldLabel": "Role",
156                                     "name": "role",
157                                     "width": 200,
158                                     "|xns": "Roo.form",
159                                     "xtype": "TextField"
160                                 },
161                                 {
162                                     "fieldLabel": "Phone",
163                                     "name": "phone",
164                                     "width": 200,
165                                     "|xns": "Roo.form",
166                                     "xtype": "TextField"
167                                 },
168                                 {
169                                     "fieldLabel": "Fax",
170                                     "name": "fax",
171                                     "width": 200,
172                                     "|xns": "Roo.form",
173                                     "xtype": "TextField"
174                                 },
175                                 {
176                                     "fieldLabel": "Email",
177                                     "name": "email",
178                                     "width": 200,
179                                     "|xns": "Roo.form",
180                                     "xtype": "TextField"
181                                 },
182                                 {
183                                     "fieldLabel": "Lang",
184                                     "name": "lang",
185                                     "width": 200,
186                                     "|xns": "Roo.form",
187                                     "xtype": "TextField"
188                                 },
189                                 {
190                                     "fieldLabel": "No reset sent",
191                                     "name": "no_reset_sent",
192                                     "width": 75,
193                                     "|xns": "Roo.form",
194                                     "xtype": "TextField"
195                                 },
196                                 {
197                                     "fieldLabel": "Action type",
198                                     "name": "action_type",
199                                     "width": 200,
200                                     "|xns": "Roo.form",
201                                     "xtype": "TextField"
202                                 },
203                                 {
204                                     "|xns": "Roo.form",
205                                     "xtype": "ComboBox",
206                                     "allowBlank": "false",
207                                     "editable": "false",
208                                     "emptyText": "Select Projects",
209                                     "forceSelection": true,
210                                     "listWidth": 400,
211                                     "loadingText": "Searching...",
212                                     "minChars": 2,
213                                     "pageSize": 20,
214                                     "qtip": "Select Projects",
215                                     "selectOnFocus": true,
216                                     "triggerAction": "all",
217                                     "typeAhead": true,
218                                     "width": 300,
219                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
220                                     "queryParam": "query[name]",
221                                     "fieldLabel": "Project",
222                                     "valueField": "id",
223                                     "displayField": "name",
224                                     "hiddenName": "project_id",
225                                     "name": "project_id_name",
226                                     "items": [
227                                         {
228                                             "*prop": "store",
229                                             "xtype": "Store",
230                                             "|xns": "Roo.data",
231                                             "remoteSort": true,
232                                             "|sortInfo": "{ direction : 'ASC', field: 'id' }",
233                                             "listeners": {
234                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
235                                             },
236                                             "items": [
237                                                 {
238                                                     "*prop": "proxy",
239                                                     "xtype": "HttpProxy",
240                                                     "method": "GET",
241                                                     "|xns": "Roo.data",
242                                                     "|url": "baseURL + '/Roo/Projects.php'"
243                                                 },
244                                                 {
245                                                     "*prop": "reader",
246                                                     "xtype": "JsonReader",
247                                                     "|xns": "Roo.data",
248                                                     "id": "id",
249                                                     "root": "data",
250                                                     "totalProperty": "total",
251                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
252                                                 }
253                                             ]
254                                         }
255                                     ]
256                                 },
257                                 {
258                                     "fieldLabel": "Deleted by",
259                                     "name": "deleted_by",
260                                     "width": 75,
261                                     "|xns": "Roo.form",
262                                     "xtype": "TextField"
263                                 },
264                                 {
265                                     "fieldLabel": "Deleted dt",
266                                     "name": "deleted_dt",
267                                     "width": 75,
268                                     "|xns": "Roo.form",
269                                     "xtype": "DateField"
270                                 },
271                                 {
272                                     "name": "id",
273                                     "|xns": "Roo.form",
274                                     "xtype": "Hidden"
275                                 }
276                             ]
277                         }
278                     ]
279                 },
280                 {
281                     "listeners": {
282                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
283                     },
284                     "*prop": "buttons[]",
285                     "text": "Cancel",
286                     "xtype": "Button",
287                     "|xns": "Roo"
288                 },
289                 {
290                     "listeners": {
291                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
292                     },
293                     "*prop": "buttons[]",
294                     "text": "Save",
295                     "xtype": "Button",
296                     "|xns": "Roo"
297                 }
298             ]
299         }
300     ],
301     "permname": ""
302 }