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                                     "|xns": "Roo.form",
51                                     "xtype": "Column",
52                                     "items": [
53                                         {
54                                             "allowBlank": false,
55                                             "fieldLabel": "Company ID (for filing Ref.)",
56                                             "name": "code",
57                                             "qtip": "Enter code",
58                                             "width": 100,
59                                             "xtype": "TextField",
60                                             "|xns": "Roo.form"
61                                         },
62                                         {
63                                             "allowBlank": false,
64                                             "displayField": "desc",
65                                             "editable": false,
66                                             "emptyText": "Select Type",
67                                             "fieldLabel": "Type",
68                                             "hiddenName": "comptype",
69                                             "listWidth": 250,
70                                             "name": "comptype_name",
71                                             "qtip": "Select Company type",
72                                             "selectOnFocus": true,
73                                             "triggerAction": "all",
74                                             "typeAhead": false,
75                                             "valueField": "val",
76                                             "width": 200,
77                                             "xtype": "ComboBox",
78                                             "|xns": "Roo.form",
79                                             "items": [
80                                                 {
81                                                     "*prop": "store",
82                                                     "data": "[ 'CONSULTANT', \"Consultant\" ],[ 'CLIENT'    ,  \"Client\" ],[ 'CONTRACTOR' , \"Contractor\" ]",
83                                                     "fields": "['val', 'desc']",
84                                                     "xtype": "SimpleStore",
85                                                     "|xns": "Roo.data"
86                                                 }
87                                             ]
88                                         },
89                                         {
90                                             "allowBlank": true,
91                                             "fieldLabel": "Company Name",
92                                             "name": "name",
93                                             "qtip": "Enter Company Name",
94                                             "width": 300,
95                                             "xtype": "TextField",
96                                             "|xns": "Roo.form"
97                                         },
98                                         {
99                                             "allowBlank": true,
100                                             "fieldLabel": "Phone",
101                                             "name": "tel",
102                                             "qtip": "Enter Phone Number",
103                                             "width": 300,
104                                             "xtype": "TextField",
105                                             "|xns": "Roo.form"
106                                         },
107                                         {
108                                             "allowBlank": true,
109                                             "fieldLabel": "Fax",
110                                             "name": "fax",
111                                             "qtip": "Enter Fax Number",
112                                             "width": 300,
113                                             "xtype": "TextField",
114                                             "|xns": "Roo.form"
115                                         },
116                                         {
117                                             "allowBlank": true,
118                                             "fieldLabel": "Email",
119                                             "name": "email",
120                                             "qtip": "Enter Email Address",
121                                             "width": 300,
122                                             "xtype": "TextField",
123                                             "|xns": "Roo.form"
124                                         },
125                                         {
126                                             "allowBlank": true,
127                                             "fieldLabel": "Address",
128                                             "name": "address",
129                                             "qtip": "Enter Address",
130                                             "width": 300,
131                                             "xtype": "TextField",
132                                             "|xns": "Roo.form"
133                                         },
134                                         {
135                                             "allowBlank": true,
136                                             "fieldLabel": "Remarks",
137                                             "height": 40,
138                                             "name": "remarks",
139                                             "qtip": "Enter remarks",
140                                             "width": 300,
141                                             "xtype": "TextArea",
142                                             "|xns": "Roo.form"
143                                         }
144                                     ]
145                                 }
146                             ]
147                         }
148                     ]
149                 },
150                 {
151                     "*prop": "buttons[]",
152                     "text": "Cancel",
153                     "xtype": "Button",
154                     "|xns": "Roo"
155                 },
156                 {
157                     "*prop": "buttons[]",
158                     "text": "Save",
159                     "xtype": "Button",
160                     "|xns": "Roo"
161                 }
162             ]
163         }
164     ],
165     "permname": "",
166     "modOrder": "001"
167 }