3 "name": "Pman.Dialog.CoreCompanies",
6 "path": "/home/chris/gitlive/Pman.Core/Pman.Dialog.CoreCompanies.bjs",
16 "title": "Edit Companies",
18 "xtype": "LayoutDialog",
23 "alwaysShowTabs": false,
28 "xtype": "LayoutRegion",
35 "xtype": "ContentPanel",
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 if(act.type == 'setdata'){\n this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n \n if (act.type == 'load') {\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}"
47 "|url": "baseURL + '/Roo/Person.php'",
57 "fieldLabel": "Company ID (for filing Ref.)",
66 "displayField": "desc",
68 "emptyText": "Select Type",
70 "hiddenName": "comptype",
72 "name": "comptype_name",
73 "qtip": "Select Company type",
74 "selectOnFocus": true,
75 "triggerAction": "all",
84 "data": "[ 'CONSULTANT', \"Consultant\" ],[ 'CLIENT' , \"Client\" ],[ 'CONTRACTOR' , \"Contractor\" ]",
85 "fields": "['val', 'desc']",
86 "xtype": "SimpleStore",
93 "fieldLabel": "Company Name",
95 "qtip": "Enter Company Name",
102 "fieldLabel": "Phone",
104 "qtip": "Enter Phone Number",
106 "xtype": "TextField",
113 "qtip": "Enter Fax Number",
115 "xtype": "TextField",
120 "fieldLabel": "Email",
122 "qtip": "Enter Email Address",
124 "xtype": "TextField",
129 "fieldLabel": "Address",
131 "qtip": "Enter Address",
133 "xtype": "TextField",
138 "fieldLabel": "Remarks",
141 "qtip": "Enter remarks",
155 "fieldLabel": "Background Colour",
156 "name": "background_color",
157 "xtype": "TextField",
161 "fieldLabel": "Logo Image",
163 "icon": "rootURL + 'images/default/dd/drop-add.gif'",
165 "style": "border: 1px solid #ccc;",
167 "xtype": "DisplayField",
168 "|valueRenderer": "function(v) {\n //var vp = v ? v : 'Companies:' + _this.data.id + ':-LOGO';\n if (!v) {\n return \"No Image Available\" + '<BR/>';\n }\n return String.format('<img src=\"{0}\" width=\"150\">', \n baseURL + '/Images/Thumb/150x150/' + v + '/logo.jpg'\n );\n}",
173 "click": "function (_self, e)\n{\n var _t = _this.form.findField('logo_id');\n \n Pman.Dialog.Image.show({\n onid :_this.data.id,\n ontable : 'Companies',\n imgtype : 'LOGO'\n }, function(data) {\n if (data) {\n _t.setValue(data.id);\n }\n \n });\n}"
196 "*prop": "buttons[]",
202 "*prop": "buttons[]",