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/Companies.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 "render": "function (_self)\n{\n _this.etypeCombo = _self;\n}",
94 "select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}"
97 "displayField": "comptype_name",
99 "emptyText": "Select Type",
100 "fieldLabel": "Type",
101 "forceSelection": true,
103 "loadingText": "Searching...",
106 "qtip": "Select type",
107 "queryParam": "query[name]",
108 "selectOnFocus": true,
109 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
110 "triggerAction": "all",
119 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params['query[empty_etype]'] = 1;\n}\n"
124 "|sortInfo": "{ direction : 'ASC', field: 'id' }",
129 "xtype": "HttpProxy",
132 "|url": "baseURL + '/Roo/core_enum.php'"
136 "xtype": "JsonReader",
140 "totalProperty": "total",
141 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
149 "fieldLabel": "Company Name",
151 "qtip": "Enter Company Name",
153 "xtype": "TextField",
158 "fieldLabel": "Phone",
160 "qtip": "Enter Phone Number",
162 "xtype": "TextField",
169 "qtip": "Enter Fax Number",
171 "xtype": "TextField",
176 "fieldLabel": "Email",
178 "qtip": "Enter Email Address",
180 "xtype": "TextField",
185 "fieldLabel": "Address",
187 "qtip": "Enter Address",
189 "xtype": "TextField",
194 "fieldLabel": "Remarks",
197 "qtip": "Enter remarks",
211 "fieldLabel": "Background Colour",
212 "name": "background_color",
213 "xtype": "TextField",
217 "fieldLabel": "Logo Image",
219 "icon": "rootURL + 'images/default/dd/drop-add.gif'",
221 "style": "border: 1px solid #ccc;",
223 "xtype": "DisplayField",
224 "|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}",
229 "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}"
253 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
255 "*prop": "buttons[]",
262 "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
264 "*prop": "buttons[]",