2 "name" : "Pman.Dialog.CoreCompanies",
5 "path" : "/home/alan/gitlive/Pman.Core/Pman.Dialog.CoreCompanies.bjs",
9 "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
10 "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
11 "b33457e7e1cd5dbf1db34a0c60fcb75f" : "Company ID (for filing Ref.)",
12 "023a5dfa857c4aa0156e6685231a1dbd" : "Select Type",
13 "8535bcc0f05358a583bb432bbadf7e0d" : "Select type",
14 "733640ec0c9367df1b4d85eb286ed9ae" : "Enter code",
15 "8c04eb09879a05470fae436ba76e3bb9" : "Enter Url",
16 "4ef6052d74436756f08e95fd63949653" : "Enter Company Name",
17 "c54b90756cfbeff9217293b567cb2eb0" : "Enter remarks",
18 "1243daf593fa297e07ab03bf06d925af" : "Searching...",
19 "bcc254b55c4a1babdf1dcb82c207506b" : "Phone",
20 "cf3a5d25d39613ad5bbc2f5eb0f9b675" : "Enter Fax Number",
21 "9f86c00615b1a210935ac28ff8ebbb22" : "Enter Email Address",
22 "e7b47c58815acf1d3afa59a84b5db7fb" : "Company Name",
23 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
24 "32c4e9483403d60115b21519178e5384" : "Enter Address",
25 "b9c49611cfda3259a2b837b39489e650" : "Add Image",
26 "72b9d3d2e231f1de7a2bd70737f644aa" : "Add / Edit Organization",
27 "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
28 "02a3a357710cc2a5dfdfb74ed012fb59" : "Url",
29 "dd7bf230fde8d4836917806aff6a6b27" : "Address",
30 "c9cc8cce247e49bae79f15173ce97354" : "Save",
31 "bc3a4c40d007b8d610a16312970e5cb3" : "Enter Phone Number",
32 "9810aa2b9f44401be4bf73188ef2b67d" : "Fax",
33 "35cb9e66ff801a819684ee0fbeabaeeb" : "Background Colour",
34 "bc87ef2144ae15ef4f78211e73948051" : "Logo Image"
40 "collapsible" : false,
41 "title" : "Add / Edit Organization",
42 "xtype" : "LayoutDialog",
51 "alwaysShowTabs" : false,
53 "xtype" : "LayoutRegion",
63 "xtype" : "ContentPanel",
69 "actionfailed" : "function(f, act) {\n _this.dialog.el.unmask();\n // error msg???\n Pman.standardActionFailed(f,act);\n \n}",
70 "rendered" : "function (form)\n{\n _this.form = form;\n}",
71 "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.comptype == 'OWNER' ? '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}"
73 "$ url" : "baseURL + '/Roo/core_company.php'",
85 "fieldLabel" : "Company ID (for filing Ref.)",
86 "xtype" : "TextField",
95 "render" : "function (_self)\n{\n _this.etypeCombo = _self;\n}"
97 "Boolean allowBlank" : false,
100 "triggerAction" : "all",
101 "fieldLabel" : "Type",
102 "forceSelection" : true,
103 "selectOnFocus" : true,
105 "emptyText" : "Select Type",
106 "displayField" : "display_name",
107 "hiddenName" : "comptype",
109 "valueField" : "name",
110 "xtype" : "ComboBox",
113 "$ xns" : "Roo.form",
114 "name" : "comptype_display_name",
115 "qtip" : "Select type",
116 "queryParam" : "query[name]",
117 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> : {display_name}</div>",
118 "loadingText" : "Searching...",
122 "|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"
126 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
127 "$ xns" : "Roo.data",
131 "$ url" : "baseURL + '/Roo/core_enum.php'",
133 "xtype" : "HttpProxy",
134 "$ xns" : "Roo.data",
140 "xtype" : "JsonReader",
141 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
142 "$ xns" : "Roo.data",
144 "totalProperty" : "total"
151 "fieldLabel" : "Company Name",
152 "xtype" : "TextField",
153 "allowBlank" : false,
155 "$ xns" : "Roo.form",
157 "qtip" : "Enter Company Name"
160 "fieldLabel" : "Phone",
161 "xtype" : "TextField",
164 "$ xns" : "Roo.form",
166 "qtip" : "Enter Phone Number"
169 "fieldLabel" : "Fax",
170 "xtype" : "TextField",
173 "$ xns" : "Roo.form",
175 "qtip" : "Enter Fax Number"
178 "fieldLabel" : "Email",
179 "xtype" : "TextField",
182 "$ xns" : "Roo.form",
184 "qtip" : "Enter Email Address"
187 "fieldLabel" : "Url",
188 "xtype" : "TextField",
191 "$ xns" : "Roo.form",
196 "fieldLabel" : "Address",
197 "xtype" : "TextField",
200 "$ xns" : "Roo.form",
202 "qtip" : "Enter Address"
205 "fieldLabel" : "Remarks",
206 "xtype" : "TextArea",
209 "$ xns" : "Roo.form",
212 "qtip" : "Enter remarks"
217 "labelAlign" : "top",
220 "$ xns" : "Roo.form",
223 "fieldLabel" : "Background Colour",
224 "xtype" : "ColorField",
225 "$ xns" : "Roo.form",
226 "name" : "background_color"
229 "fieldLabel" : "Logo Image",
230 "style" : "border: 1px solid #ccc;",
231 "xtype" : "DisplayField",
232 "$ 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('<a target=\"_new\" href=\"{1}\"><img src=\"{0}\" width=\"150\"></a>', \n baseURL + '/Images/Thumb/150x150/' + v + '/logo.jpg',\n baseURL + '/Images/'+v+'/logo.jpg' // fixme - put escaped company name..\n );\n}",
233 "icon" : "rootURL + 'images/default/dd/drop-add.gif'",
235 "$ xns" : "Roo.form",
241 "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 : 'core_company',\n imgtype : 'LOGO'\n }, function(data) {\n if (data) {\n _t.setValue(data.id);\n }\n \n });\n}"
243 "text" : "Add Image",
251 "$ xns" : "Roo.form",
260 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
265 "* prop" : "buttons[]"
269 "click" : "function (_self, e)\n{\n if(!_this.form.isValid()){\n Roo.MessageBox.alert('Error', 'Please Correct all the errors in red');\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/Core_company.php',\n method : 'POST',\n params : {\n id : _this.form.findField('id').getValue() * 1,\n name : _this.form.findField('name').getValue(),\n _check_name : 1\n }, \n success : function(res) {\n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n },\n failure : function(res) {\n Roo.MessageBox.confirm(\n \"Confirm\", \n \"The company name has been used. Save it anyway?\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n }\n );\n }\n });\n \n return;\n \n}"
274 "* prop" : "buttons[]"