3 "name": "Pman.Dialog.CoreCompanies",
6 "path": "/home/alan/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 "render": "function (_self)\n{\n _this.etypeCombo = _self;\n}"
69 "displayField": "name",
70 "emptyText": "Select Type",
72 "forceSelection": true,
73 "hiddenName": "comptype",
75 "loadingText": "Searching...",
77 "name": "comptype_display",
79 "qtip": "Select type",
80 "queryParam": "query[name]",
81 "selectOnFocus": true,
82 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
83 "triggerAction": "all",
92 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n //o.params['query[empty_etype]'] = 1;\n o.params.etype = 'COMPTYPE';\n}\n"
97 "|sortInfo": "{ direction : 'ASC', field: 'id' }",
102 "xtype": "HttpProxy",
105 "|url": "baseURL + '/Roo/core_enum.php'"
111 "totalProperty": "total",
112 "xtype": "JsonReader",
113 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
122 "fieldLabel": "Company Name",
124 "qtip": "Enter Company Name",
126 "xtype": "TextField",
131 "fieldLabel": "Phone",
133 "qtip": "Enter Phone Number",
135 "xtype": "TextField",
142 "qtip": "Enter Fax Number",
144 "xtype": "TextField",
149 "fieldLabel": "Email",
151 "qtip": "Enter Email Address",
153 "xtype": "TextField",
158 "fieldLabel": "Address",
160 "qtip": "Enter Address",
162 "xtype": "TextField",
167 "fieldLabel": "Remarks",
170 "qtip": "Enter remarks",
184 "fieldLabel": "Background Colour",
185 "name": "background_color",
186 "xtype": "TextField",
190 "fieldLabel": "Logo Image",
192 "icon": "rootURL + 'images/default/dd/drop-add.gif'",
194 "style": "border: 1px solid #ccc;",
196 "xtype": "DisplayField",
197 "|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}",
202 "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}"
226 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
228 "*prop": "buttons[]",
235 "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
237 "*prop": "buttons[]",