Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.bjs
1 {
2     "id": "roo-file-160",
3     "name": "Pman.Dialog.CoreCompanies",
4     "parent": "",
5     "title": "",
6     "path": "/home/chris/gitlive/Pman.Core/Pman.Dialog.CoreCompanies.bjs",
7     "items": [
8         {
9             "autoCreate": "true",
10             "closable": false,
11             "collapsible": false,
12             "draggable": false,
13             "height": 400,
14             "modal": true,
15             "shadow": "true",
16             "title": "Edit Companies",
17             "width": 750,
18             "xtype": "LayoutDialog",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "*prop": "center",
23                     "alwaysShowTabs": false,
24                     "autoScroll": false,
25                     "closeOnTab": true,
26                     "hideTabs": true,
27                     "titlebar": false,
28                     "xtype": "LayoutRegion",
29                     "|xns": "Roo"
30                 },
31                 {
32                     "autoCreate": "true",
33                     "fitToFrame": true,
34                     "region": "center",
35                     "xtype": "ContentPanel",
36                     "|xns": "Roo",
37                     "items": [
38                         {
39                             "listeners": {
40                                 "actionfailed": "function(f, act) {\n    _this.dialog.el.unmask();\n    // error msg???\n    Pman.standardActionFailed(f,act);\n              \n}",
41                                 "actioncomplete": "function(f, act) {\n    _this.dialog.el.unmask();\n    //console.log('load completed'); \n    // error messages?????\n    \n   \n    if (act.type == 'load') {\n        \n        _this.data = act.result.data;\n        var meth = _this.data.isOwner || !Pman.Login.isOwner() ? 'disable' : 'enable';\n     \n            \n        if (_this.form.findField('comptype')) {\n            _this.form.findField('comptype')[meth]();\n        }\n         \n       // _this.loaded();\n        return;\n    }\n    \n    \n    if (act.type == 'submit') { // only submitted here if we are \n        _this.dialog.hide();\n       \n        if (_this.callback) {\n            _this.callback.call(this, act.result.data);\n        }\n        return; \n    }\n    // unmask?? \n}",
42                                 "rendered": "function (form)\n{\n    _this.form = form;\n}"
43                             },
44                             "fileUpload": true,
45                             "labelWidth": 160,
46                             "xtype": "Form",
47                             "|xns": "Roo.form",
48                             "items": [
49                                 {
50                                     "allowBlank": true,
51                                     "fieldLabel": "Phone",
52                                     "name": "tel",
53                                     "qtip": "Enter Phone Number",
54                                     "width": 300,
55                                     "xtype": "TextField",
56                                     "|xns": "Roo.form"
57                                 },
58                                 {
59                                     "allowBlank": true,
60                                     "fieldLabel": "Fax",
61                                     "name": "fax",
62                                     "qtip": "Enter Fax Number",
63                                     "width": 300,
64                                     "xtype": "TextField",
65                                     "|xns": "Roo.form"
66                                 },
67                                 {
68                                     "allowBlank": true,
69                                     "fieldLabel": "Email",
70                                     "name": "email",
71                                     "qtip": "Enter Email Address",
72                                     "width": 300,
73                                     "xtype": "TextField",
74                                     "|xns": "Roo.form"
75                                 },
76                                 {
77                                     "allowBlank": true,
78                                     "fieldLabel": "Address",
79                                     "name": "address",
80                                     "qtip": "Enter Address",
81                                     "width": 300,
82                                     "xtype": "TextField",
83                                     "|xns": "Roo.form"
84                                 },
85                                 {
86                                     "allowBlank": true,
87                                     "fieldLabel": "Remarks",
88                                     "height": 40,
89                                     "name": "remarks",
90                                     "qtip": "Enter remarks",
91                                     "width": 300,
92                                     "xtype": "TextArea",
93                                     "|xns": "Roo.form"
94                                 },
95                                 {
96                                     "|xns": "Roo.form",
97                                     "xtype": "Column",
98                                     "items": [
99                                         {
100                                             "allowBlank": false,
101                                             "fieldLabel": "Company ID (for filing Ref.)",
102                                             "name": "code",
103                                             "qtip": "Enter code",
104                                             "width": 100,
105                                             "xtype": "TextField",
106                                             "|xns": "Roo.form"
107                                         },
108                                         {
109                                             "allowBlank": false,
110                                             "displayField": "desc",
111                                             "editable": false,
112                                             "emptyText": "Select Type",
113                                             "fieldLabel": "Type",
114                                             "hiddenName": "comptype",
115                                             "listWidth": 250,
116                                             "name": "comptype_name",
117                                             "qtip": "Select Company type",
118                                             "selectOnFocus": true,
119                                             "triggerAction": "all",
120                                             "typeAhead": false,
121                                             "valueField": "val",
122                                             "width": 200,
123                                             "xtype": "ComboBox",
124                                             "|xns": "Roo.form",
125                                             "items": [
126                                                 {
127                                                     "*prop": "store",
128                                                     "data": "[ 'CONSULTANT', \"Consultant\" ],[ 'CLIENT'    ,  \"Client\" ],[ 'CONTRACTOR' , \"Contractor\" ]",
129                                                     "fields": "['val', 'desc']",
130                                                     "xtype": "SimpleStore",
131                                                     "|xns": "Roo.data"
132                                                 }
133                                             ]
134                                         },
135                                         {
136                                             "allowBlank": true,
137                                             "fieldLabel": "Company Name",
138                                             "name": "name",
139                                             "qtip": "Enter Company Name",
140                                             "width": 300,
141                                             "xtype": "TextField",
142                                             "|xns": "Roo.form"
143                                         },
144                                         {
145                                             "allowBlank": true,
146                                             "fieldLabel": "Phone",
147                                             "name": "tel",
148                                             "qtip": "Enter Phone Number",
149                                             "width": 300,
150                                             "xtype": "TextField",
151                                             "|xns": "Roo.form"
152                                         },
153                                         {
154                                             "allowBlank": true,
155                                             "fieldLabel": "Fax",
156                                             "name": "fax",
157                                             "qtip": "Enter Fax Number",
158                                             "width": 300,
159                                             "xtype": "TextField",
160                                             "|xns": "Roo.form"
161                                         },
162                                         {
163                                             "allowBlank": true,
164                                             "fieldLabel": "Email",
165                                             "name": "email",
166                                             "qtip": "Enter Email Address",
167                                             "width": 300,
168                                             "xtype": "TextField",
169                                             "|xns": "Roo.form"
170                                         },
171                                         {
172                                             "allowBlank": true,
173                                             "fieldLabel": "Address",
174                                             "name": "address",
175                                             "qtip": "Enter Address",
176                                             "width": 300,
177                                             "xtype": "TextField",
178                                             "|xns": "Roo.form"
179                                         },
180                                         {
181                                             "allowBlank": true,
182                                             "fieldLabel": "Remarks",
183                                             "height": 40,
184                                             "name": "remarks",
185                                             "qtip": "Enter remarks",
186                                             "width": 300,
187                                             "xtype": "TextArea",
188                                             "|xns": "Roo.form"
189                                         }
190                                     ]
191                                 }
192                             ]
193                         }
194                     ]
195                 },
196                 {
197                     "*prop": "buttons[]",
198                     "text": "Cancel",
199                     "xtype": "Button",
200                     "|xns": "Roo"
201                 },
202                 {
203                     "*prop": "buttons[]",
204                     "text": "Save",
205                     "xtype": "Button",
206                     "|xns": "Roo"
207                 }
208             ]
209         }
210     ],
211     "permname": "",
212     "modOrder": "001"
213 }