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": "",
63                                     "hiddenName": "comptype",
64                                     "listWidth": 250,
65                                     "name": "comptype_name",
66                                     "qtip": "Select Company type",
67                                     "selectOnFocus": true,
68                                     "triggerAction": "all",
69                                     "typeAhead": false,
70                                     "valueField": "val",
71                                     "width": 200,
72                                     "xtype": "ComboBox",
73                                     "|xns": "Roo.form",
74                                     "items": [
75                                         {
76                                             "*prop": "store",
77                                             "data": "[ 'CONSULTANT', \"Consultant\" ],[ 'CLIENT'    ,  \"Client\" ],[ 'CONTRACTOR' , \"Contractor\" ]",
78                                             "fields": "['val', 'desc']",
79                                             "xtype": "SimpleStore",
80                                             "|xns": "Roo.data"
81                                         }
82                                     ]
83                                 }
84                             ]
85                         }
86                     ]
87                 },
88                 {
89                     "*prop": "buttons[]",
90                     "text": "Cancel",
91                     "xtype": "Button",
92                     "|xns": "Roo"
93                 },
94                 {
95                     "*prop": "buttons[]",
96                     "text": "Save",
97                     "xtype": "Button",
98                     "|xns": "Roo"
99                 }
100             ]
101         }
102     ],
103     "permname": "",
104     "modOrder": "001"
105 }