2 "name" : "Pman.Dialog.BAdminCompany",
3 "parent" : "Pman.Tab.BAdmin",
5 "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Dialog.BAdminCompany.bjs",
9 "1c76cbfe21c6f44c1d1e59d54f3e4420" : "Company",
10 "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
11 "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
12 "1243daf593fa297e07ab03bf06d925af" : "Searching...",
13 "bcc254b55c4a1babdf1dcb82c207506b" : "Phone",
14 "66bc3ece76861852889e623217049d32" : "Edit Company Details",
15 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
16 "ca0dbad92a874b2f69b549293387925e" : "Code",
17 "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
18 "dd7bf230fde8d4836917806aff6a6b27" : "Address",
19 "c9cc8cce247e49bae79f15173ce97354" : "Save",
20 "e6b391a8d2c4d45902a23a8b6585703d" : "URL"
23 "tel_fieldLabel" : "bcc254b55c4a1babdf1dcb82c207506b",
24 "comptype_display_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
25 "code_fieldLabel" : "ca0dbad92a874b2f69b549293387925e",
26 "name_fieldLabel" : "1c76cbfe21c6f44c1d1e59d54f3e4420",
27 "remarks_fieldLabel" : "231bc72756b5e6de492aaaa1577f61b1",
28 "url_fieldLabel" : "e6b391a8d2c4d45902a23a8b6585703d",
29 "email_fieldLabel" : "ce8ae9da5b7cd6c3df2929543a9af92d",
30 "address_fieldLabel" : "dd7bf230fde8d4836917806aff6a6b27",
31 "comptype_display_name_fieldLabel" : "a1fa27779242b4902f7ae3bdd5c6d508"
36 "show" : "function (_self)\n{\n _this.form.findField('code').hide();\n\n if(appDisabled.indexOf('Coba.SuperAdmin') * 1 == -1) {\n _this.form.findField('code').show();\n }\n}",
37 "render" : "function (_self)\n{\n _this.modal = _self;\n}"
39 "String cls" : "padding-bottom-trim badmin-dialog-company enable-modal-body-overflow",
41 "int max_width" : 650,
42 "$ xns" : "Roo.bootstrap",
43 "String title" : "Edit Company Details",
46 "xtype" : "Container",
47 "$ xns" : "Roo.bootstrap",
48 "String style" : "width: 100%;",
52 "actionfailed" : "function (_self, action)\n{\n //Pman.standardActionFailed(_self,action);\n \n if (!this.isValid) {\n return;\n }\n \n Roo.bootstrap.MessageBox.alert(action.result.errorMsg);\n\n}",
53 "actioncomplete" : "function (_self, action)\n{\n if(action.type == 'setdata'){\n _self.reset(); \n\n if(_this.data.id * 1 > 0) {\n this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});\n _this.modal.setTitle('Edit Company Details');\n \n } else {\n _this.modal.setTitle('Create Company');\n }\n return;\n }\n \n \n if (action.type == 'load') {\n _this.data = action.result.data;\n \n if(_this.data.comptype == 'OWNER'){\n _this.form.findField('comptype').hide();\n }\n \n return;\n }\n \n \n if (action.type == 'submit') { // only submitted here if we are \n //_this.dialog.hide();\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(this, action.result.data);\n }\n return; \n }\n}",
54 "render" : "function (_self)\n{\n _this.form = _self; \n}"
56 "$ url" : "baseURL + '/Roo/Core_company.php'",
58 "$ xns" : "Roo.bootstrap",
62 "$ xns" : "Roo.bootstrap",
67 "$ xns" : "Roo.bootstrap",
71 "render" : "function (_self)\n{\n _this.company = _self;\n}"
73 "String name" : "code",
75 "string fieldLabel" : "Code",
76 "$ xns" : "Roo.bootstrap",
77 "String indicatorpos" : "left"
85 "$ xns" : "Roo.bootstrap",
90 "$ xns" : "Roo.bootstrap",
94 "render" : "function (_self)\n{\n _this.type = _self;\n _self.store.load({});\n}"
96 "Boolean selectOnFocus" : true,
97 "Boolean allowBlank" : false,
98 "String loadingText" : "Searching...",
99 "String name" : "comptype_display_name",
100 "Number minChars" : 2,
101 "String valueField" : "name",
102 "String queryParam" : "query[name]",
103 "Boolean typeAhead" : false,
104 "xtype" : "ComboBox",
105 "Boolean editable" : false,
106 "String triggerAction" : "all",
107 "string fieldLabel" : "Type",
108 "Boolean alwaysQuery" : true,
109 "$ xns" : "Roo.bootstrap",
110 "String hiddenName" : "comptype",
111 "String displayField" : "display_name",
112 "String indicatorpos" : "left",
116 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n // set more here\n //o.params['query[empty_etype]'] = 1;\n options.params.etype = 'COMPTYPE';\n}"
118 "Object sortInfo" : "{ direction : 'ASC', field: 'id' }",
120 "boolean remoteSort" : true,
121 "$ xns" : "Roo.data",
125 "$ url" : "baseURL + '/Roo/core_enum.php'",
126 "xtype" : "HttpProxy",
127 "$ xns" : "Roo.data",
128 "String method" : "GET",
132 "xtype" : "JsonReader",
133 "String root" : "data",
134 "$ xns" : "Roo.data",
137 "String totalProperty" : "total"
149 "$ xns" : "Roo.bootstrap",
154 "$ xns" : "Roo.bootstrap",
158 "render" : "function (_self)\n{\n _this.company = _self;\n}"
160 "String name" : "name",
162 "string fieldLabel" : "Company",
163 "$ xns" : "Roo.bootstrap",
164 "String indicatorpos" : "left"
172 "$ xns" : "Roo.bootstrap",
177 "$ xns" : "Roo.bootstrap",
181 "render" : "function (_self)\n{\n _this.address = _self;\n}"
183 "String name" : "address",
185 "string fieldLabel" : "Address",
186 "$ xns" : "Roo.bootstrap",
187 "String indicatorpos" : "left"
195 "$ xns" : "Roo.bootstrap",
200 "$ xns" : "Roo.bootstrap",
204 "render" : "function (_self)\n{\n _this.tel = _self;\n}"
206 "String name" : "tel",
208 "string fieldLabel" : "Phone",
209 "$ xns" : "Roo.bootstrap",
210 "String indicatorpos" : "left"
218 "$ xns" : "Roo.bootstrap",
223 "$ xns" : "Roo.bootstrap",
227 "render" : "function (_self)\n{\n _this.fax = _self;\n}"
229 "String name" : "email",
231 "string fieldLabel" : "Email",
232 "$ xns" : "Roo.bootstrap",
233 "String indicatorpos" : "left"
241 "$ xns" : "Roo.bootstrap",
246 "$ xns" : "Roo.bootstrap",
250 "render" : "function (_self)\n{\n _this.url = _self;\n}"
252 "String name" : "url",
254 "string fieldLabel" : "URL",
255 "$ xns" : "Roo.bootstrap",
256 "String indicatorpos" : "left"
263 "String cls" : "badmin-company-edit-remark",
265 "$ xns" : "Roo.bootstrap",
270 "$ xns" : "Roo.bootstrap",
274 "render" : "function (_self)\n{\n _this.remarks = _self;\n}"
276 "String name" : "remarks",
277 "xtype" : "TextArea",
278 "string fieldLabel" : "Remarks",
279 "$ xns" : "Roo.bootstrap",
280 "String indicatorpos" : "left"
288 "render" : "function (_self)\n{\n _this.companyID = _self;\n}"
290 "String name" : "id",
292 "String inputType" : "hidden",
293 "$ xns" : "Roo.bootstrap"
301 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
303 "String weight" : "default",
305 "$ xns" : "Roo.bootstrap",
306 "String html" : "Cancel",
307 "* prop" : "buttons[]"
311 "render" : "function (_self)\n{\n _this.btn_ok=this;\n}",
312 "click" : "function (_self, e)\n{\n if(!_this.form.isValid()){\n Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');\n return;\n }\n \n var myID = _this.form.findField('id').getValue();\n var myName = _this.form.findField('name').getValue();\n \n console.log(myID + ' ' + myName);\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 \n // Adding new record\n _this.form.doAction(\"submit\");\n },\n failure : function(res) {\n _this.form.doAction(\"submit\");\n }\n });\n \n return;\n \n}"
314 "String weight" : "primary",
316 "$ xns" : "Roo.bootstrap",
317 "String html" : "Save",
318 "* prop" : "buttons[]"