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": false,
51                                     "fieldLabel": "Company ID (for filing Ref.)",
52                                     "name": "code",
53                                     "qtip": "Enter code",
54                                     "width": 100,
55                                     "xtype": "TextField",
56                                     "|xns": "Roo.form"
57                                 },
58                                 {
59                                     "allowBlank": false,
60                                     "displayField": "desc",
61                                     "editable": false,
62                                     "emptyText": "Select Type",
63                                     "fieldLabel": "Type",
64                                     "hiddenName": "comptype",
65                                     "listWidth": 250,
66                                     "name": "comptype_name",
67                                     "qtip": "Select Company type",
68                                     "selectOnFocus": true,
69                                     "triggerAction": "all",
70                                     "typeAhead": false,
71                                     "valueField": "val",
72                                     "width": 200,
73                                     "xtype": "ComboBox",
74                                     "|xns": "Roo.form",
75                                     "items": [
76                                         {
77                                             "*prop": "store",
78                                             "data": "[ 'CONSULTANT', \"Consultant\" ],[ 'CLIENT'    ,  \"Client\" ],[ 'CONTRACTOR' , \"Contractor\" ]",
79                                             "fields": "['val', 'desc']",
80                                             "xtype": "SimpleStore",
81                                             "|xns": "Roo.data"
82                                         }
83                                     ]
84                                 },
85                                 {
86                                     "allowBlank": true,
87                                     "fieldLabel": "Company Name",
88                                     "name": "name",
89                                     "qtip": "Enter Company Name",
90                                     "width": 300,
91                                     "xtype": "TextField",
92                                     "|xns": "Roo.form"
93                                 },
94                                 {
95                                     "allowBlank": true,
96                                     "fieldLabel": "Phone",
97                                     "name": "tel",
98                                     "qtip": "Enter Phone Number",
99                                     "width": 300,
100                                     "xtype": "TextField",
101                                     "|xns": "Roo.form"
102                                 }
103                             ]
104                         }
105                     ]
106                 },
107                 {
108                     "*prop": "buttons[]",
109                     "text": "Cancel",
110                     "xtype": "Button",
111                     "|xns": "Roo"
112                 },
113                 {
114                     "*prop": "buttons[]",
115                     "text": "Save",
116                     "xtype": "Button",
117                     "|xns": "Roo"
118                 }
119             ]
120         }
121     ],
122     "permname": "",
123     "modOrder": "001"
124 }