2 "name" : "Pman.Dialog.BAdminCompany",
3 "parent" : "Pman.Tab.BAdmin",
5 "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Dialog.BAdminCompany.bjs",
9 "1c76cbfe21c6f44c1d1e59d54f3e4420" : "Company",
10 "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
11 "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
12 "1243daf593fa297e07ab03bf06d925af" : "Searching...",
13 "bcc254b55c4a1babdf1dcb82c207506b" : "Phone",
14 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
15 "30a47f1901469a01975f8d24bbb9f701" : "Modify Company",
16 "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
17 "dd7bf230fde8d4836917806aff6a6b27" : "Address",
18 "c9cc8cce247e49bae79f15173ce97354" : "Save",
19 "9810aa2b9f44401be4bf73188ef2b67d" : "Fax",
20 "e6b391a8d2c4d45902a23a8b6585703d" : "URL"
25 "render" : "function (_self)\n{\n _this.modal = _self;\n}"
28 "String cls" : "enable-overflow",
30 "$ xns" : "Roo.bootstrap",
31 "String title" : "Modify Company",
34 "xtype" : "Container",
35 "$ xns" : "Roo.bootstrap",
36 "String style" : "width: 100%;",
40 "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}",
41 "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('Modify Company');\n \n } else {\n _this.modal.setTitle('Add 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}",
42 "render" : "function (_self)\n{\n _this.form = _self; \n}"
44 "$ url" : "baseURL + '/Roo/Core_company.php'",
46 "$ xns" : "Roo.bootstrap",
50 "$ xns" : "Roo.bootstrap",
55 "$ xns" : "Roo.bootstrap",
59 "render" : "function (_self)\n{\n _this.type = _self;\n _self.store.load({});\n}"
61 "String loadingText" : "Searching...",
62 "Boolean selectOnFocus" : true,
63 "Boolean allowBlank" : false,
64 "String name" : "comptype_display_name",
65 "Number minChars" : 2,
66 "String valueField" : "name",
67 "String queryParam" : "query[name]",
68 "Boolean typeAhead" : false,
70 "Boolean editable" : false,
71 "String triggerAction" : "all",
72 "string fieldLabel" : "Type",
73 "String labelAlign" : "left",
74 "Boolean alwaysQuery" : true,
75 "$ xns" : "Roo.bootstrap",
76 "String hiddenName" : "comptype",
77 "Number labelWidth" : 2,
78 "String displayField" : "display_name",
82 "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}"
84 "Object sortInfo" : "{ direction : 'ASC', field: 'id' }",
86 "boolean remoteSort" : true,
91 "$ url" : "baseURL + '/Roo/core_enum.php'",
92 "xtype" : "HttpProxy",
94 "String method" : "GET",
98 "xtype" : "JsonReader",
99 "String root" : "data",
100 "$ xns" : "Roo.data",
103 "String totalProperty" : "total"
115 "$ xns" : "Roo.bootstrap",
120 "$ xns" : "Roo.bootstrap",
124 "render" : "function (_self)\n{\n _this.company = _self;\n}"
126 "String name" : "name",
128 "string fieldLabel" : "Company",
129 "$ xns" : "Roo.bootstrap",
130 "Number labelWidth" : 3
138 "$ xns" : "Roo.bootstrap",
143 "$ xns" : "Roo.bootstrap",
147 "render" : "function (_self)\n{\n _this.tel = _self;\n}"
149 "String name" : "tel",
151 "string fieldLabel" : "Phone",
152 "$ xns" : "Roo.bootstrap",
153 "Number labelWidth" : 3
161 "$ xns" : "Roo.bootstrap",
166 "$ xns" : "Roo.bootstrap",
170 "render" : "function (_self)\n{\n _this.fax = _self;\n}"
172 "String name" : "fax",
174 "string fieldLabel" : "Fax",
175 "$ xns" : "Roo.bootstrap",
176 "Number labelWidth" : 3
184 "$ xns" : "Roo.bootstrap",
189 "$ xns" : "Roo.bootstrap",
193 "render" : "function (_self)\n{\n _this.fax = _self;\n}"
195 "String name" : "email",
197 "string fieldLabel" : "Email",
198 "$ xns" : "Roo.bootstrap",
199 "Number labelWidth" : 3
207 "$ xns" : "Roo.bootstrap",
212 "$ xns" : "Roo.bootstrap",
216 "render" : "function (_self)\n{\n _this.url = _self;\n}"
218 "String name" : "url",
220 "string fieldLabel" : "URL",
221 "$ xns" : "Roo.bootstrap",
222 "Number labelWidth" : 3
230 "$ xns" : "Roo.bootstrap",
235 "$ xns" : "Roo.bootstrap",
239 "render" : "function (_self)\n{\n _this.address = _self;\n}"
241 "String name" : "address",
243 "string fieldLabel" : "Address",
244 "$ xns" : "Roo.bootstrap",
245 "Number labelWidth" : 3
252 "String cls" : "badmin-company-edit-remark",
254 "$ xns" : "Roo.bootstrap",
259 "$ xns" : "Roo.bootstrap",
263 "render" : "function (_self)\n{\n _this.remarks = _self;\n}"
265 "String name" : "remarks",
266 "xtype" : "TextArea",
267 "string fieldLabel" : "Remarks",
268 "$ xns" : "Roo.bootstrap",
269 "Number labelWidth" : 3
277 "render" : "function (_self)\n{\n _this.companyID = _self;\n}"
279 "String name" : "id",
281 "String inputType" : "hidden",
282 "$ xns" : "Roo.bootstrap"
290 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
292 "String weight" : "default",
294 "$ xns" : "Roo.bootstrap",
295 "String html" : "Cancel",
296 "* prop" : "buttons[]"
300 "render" : "function (_self)\n{\n _this.btn_ok=this;\n}",
301 "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}"
303 "String weight" : "primary",
305 "$ xns" : "Roo.bootstrap",
306 "String html" : "Save",
307 "* prop" : "buttons[]"