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"
37 "name_qtip" : "4ef6052d74436756f08e95fd63949653",
38 "tel_fieldLabel" : "bcc254b55c4a1babdf1dcb82c207506b",
39 "address_qtip" : "32c4e9483403d60115b21519178e5384",
40 "background_color_fieldLabel" : "35cb9e66ff801a819684ee0fbeabaeeb",
41 "comptype_id_display_name_emptyText" : "023a5dfa857c4aa0156e6685231a1dbd",
42 "comptype_id_display_name_fieldLabel" : "a1fa27779242b4902f7ae3bdd5c6d508",
43 "comptype_id_display_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
44 "code_fieldLabel" : "b33457e7e1cd5dbf1db34a0c60fcb75f",
45 "fax_fieldLabel" : "9810aa2b9f44401be4bf73188ef2b67d",
46 "name_fieldLabel" : "e7b47c58815acf1d3afa59a84b5db7fb",
47 "fax_qtip" : "cf3a5d25d39613ad5bbc2f5eb0f9b675",
48 "url_qtip" : "8c04eb09879a05470fae436ba76e3bb9",
49 "remarks_fieldLabel" : "231bc72756b5e6de492aaaa1577f61b1",
50 "code_qtip" : "733640ec0c9367df1b4d85eb286ed9ae",
51 "tel_qtip" : "bc3a4c40d007b8d610a16312970e5cb3",
52 "email_qtip" : "9f86c00615b1a210935ac28ff8ebbb22",
53 "url_fieldLabel" : "02a3a357710cc2a5dfdfb74ed012fb59",
54 "remarks_qtip" : "c54b90756cfbeff9217293b567cb2eb0",
55 "comptype_id_display_name_qtip" : "8535bcc0f05358a583bb432bbadf7e0d",
56 "email_fieldLabel" : "ce8ae9da5b7cd6c3df2929543a9af92d",
57 "address_fieldLabel" : "dd7bf230fde8d4836917806aff6a6b27",
58 "logo_id_fieldLabel" : "bc87ef2144ae15ef4f78211e73948051"
64 "collapsible" : false,
65 "title" : "Add / Edit Organization",
66 "xtype" : "LayoutDialog",
75 "alwaysShowTabs" : false,
77 "xtype" : "LayoutRegion",
87 "xtype" : "ContentPanel",
93 "actionfailed" : "function(f, act) {\n _this.dialog.el.unmask();\n // error msg???\n Pman.standardActionFailed(f,act);\n \n}",
94 "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}",
95 "rendered" : "function (form)\n{\n _this.form = form;\n}"
97 "$ url" : "baseURL + '/Roo/core_company.php'",
101 "$ xns" : "Roo.form",
106 "$ xns" : "Roo.form",
109 "fieldLabel" : "Company ID (for filing Ref.)",
110 "xtype" : "TextField",
113 "$ xns" : "Roo.form",
115 "qtip" : "Enter code"
119 "render" : "function (_self)\n{\n _this.etypeCombo = _self;\n}"
122 "Boolean allowBlank" : false,
123 "alwaysQuery" : true,
124 "triggerAction" : "all",
125 "fieldLabel" : "Type",
126 "forceSelection" : true,
127 "selectOnFocus" : true,
129 "emptyText" : "Select Type",
130 "displayField" : "display_name",
131 "hiddenName" : "comptype_id",
134 "xtype" : "ComboBox",
137 "$ xns" : "Roo.form",
138 "name" : "comptype_id_display_name",
139 "qtip" : "Select type",
140 "queryParam" : "query[name]",
141 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> : {display_name}</div>",
142 "loadingText" : "Searching...",
146 "|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"
150 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
151 "$ xns" : "Roo.data",
155 "$ url" : "baseURL + '/Roo/core_enum.php'",
156 "xtype" : "HttpProxy",
158 "$ xns" : "Roo.data",
164 "xtype" : "JsonReader",
165 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
166 "$ xns" : "Roo.data",
168 "totalProperty" : "total"
175 "fieldLabel" : "Company Name",
176 "xtype" : "TextField",
177 "allowBlank" : false,
179 "$ xns" : "Roo.form",
181 "qtip" : "Enter Company Name"
184 "fieldLabel" : "Phone",
185 "xtype" : "TextField",
188 "$ xns" : "Roo.form",
190 "qtip" : "Enter Phone Number"
193 "fieldLabel" : "Fax",
194 "xtype" : "TextField",
197 "$ xns" : "Roo.form",
199 "qtip" : "Enter Fax Number"
202 "fieldLabel" : "Email",
203 "xtype" : "TextField",
206 "$ xns" : "Roo.form",
208 "qtip" : "Enter Email Address"
211 "fieldLabel" : "Url",
212 "xtype" : "TextField",
215 "$ xns" : "Roo.form",
220 "fieldLabel" : "Address",
221 "xtype" : "TextField",
224 "$ xns" : "Roo.form",
226 "qtip" : "Enter Address"
229 "fieldLabel" : "Remarks",
230 "xtype" : "TextArea",
233 "$ xns" : "Roo.form",
236 "qtip" : "Enter remarks"
241 "labelAlign" : "top",
244 "$ xns" : "Roo.form",
247 "fieldLabel" : "Background Colour",
248 "xtype" : "ColorField",
249 "$ xns" : "Roo.form",
250 "name" : "background_color"
253 "fieldLabel" : "Logo Image",
254 "xtype" : "DisplayField",
255 "style" : "border: 1px solid #ccc;",
256 "$ 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}",
257 "icon" : "rootURL + 'images/default/dd/drop-add.gif'",
259 "$ xns" : "Roo.form",
265 "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}"
267 "text" : "Add Image",
275 "$ xns" : "Roo.form",
284 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
289 "* prop" : "buttons[]"
293 "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}"
298 "* prop" : "buttons[]"