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 "render": "function (_self)\n{\n _this.etypeCombo = _self;\n}",
67 "select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}"
70 "displayField": "name",
71 "emptyText": "Select Type",
73 "forceSelection": true,
74 "hiddenName": "comptype",
76 "loadingText": "Searching...",
78 "name": "comptype_name",
80 "qtip": "Select type",
81 "queryParam": "query[name]",
82 "selectOnFocus": true,
83 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
84 "triggerAction": "all",
93 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params['query[empty_etype]'] = 1;\n}\n"
98 "|sortInfo": "{ direction : 'ASC', field: 'id' }",
103 "xtype": "HttpProxy",
106 "|url": "baseURL + '/Roo/core_enum.php'"
110 "xtype": "JsonReader",
114 "totalProperty": "total",
115 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
123 "fieldLabel": "Company Name",
125 "qtip": "Enter Company Name",
127 "xtype": "TextField",
132 "fieldLabel": "Phone",
134 "qtip": "Enter Phone Number",
136 "xtype": "TextField",
143 "qtip": "Enter Fax Number",
145 "xtype": "TextField",
150 "fieldLabel": "Email",
152 "qtip": "Enter Email Address",
154 "xtype": "TextField",
159 "fieldLabel": "Address",
161 "qtip": "Enter Address",
163 "xtype": "TextField",
168 "fieldLabel": "Remarks",
171 "qtip": "Enter remarks",
185 "fieldLabel": "Background Colour",
186 "name": "background_color",
187 "xtype": "TextField",
191 "fieldLabel": "Logo Image",
193 "icon": "rootURL + 'images/default/dd/drop-add.gif'",
195 "style": "border: 1px solid #ccc;",
197 "xtype": "DisplayField",
198 "|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}",
203 "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}"
227 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
229 "*prop": "buttons[]",
236 "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
238 "*prop": "buttons[]",