3 "name": "Pman.Dialog.XtupleAddress",
6 "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleAddress.bjs",
9 ".builderCfg": "{\"cols\":[{\"table\":\"addr\",\"column\":\"addr_id\",\"columnshort\":\"addr_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\",\"display\":\"addr_id\"},{\"table\":\"addr\",\"column\":\"addr_active\",\"columnshort\":\"addr_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_line1\",\"columnshort\":\"addr_line1\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_line2\",\"columnshort\":\"addr_line2\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_line3\",\"columnshort\":\"addr_line3\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_city\",\"columnshort\":\"addr_city\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_state\",\"columnshort\":\"addr_state\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_postalcode\",\"columnshort\":\"addr_postalcode\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_country\",\"columnshort\":\"addr_country\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_notes\",\"columnshort\":\"addr_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_number\",\"columnshort\":\"addr_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"addr_id\"],\"table\":\"addr\",\"xtype\":\"LayoutDialog\",\"|xns\":\"Roo\"}",
15 "title": "Edit Address",
17 "xtype": "LayoutDialog",
22 "xtype": "LayoutRegion",
27 "xtype": "ContentPanel",
36 "|xns": "Roo.Toolbar",
41 "click": "function()\n{\n var id = _this.form.findField('addr_id').getValue() *1;\n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"You can not delete this, you have not created it yet\");\n return;\n }\n \n \n Roo.MessageBox.confirm(\"Confirm\", \"You will only be able to delete this if it is not referenced anywhere<BR>\"+\n \", are you sure you want to try that?\",\n function (res) {\n if(res!='yes') {\n return;\n \n }\n new Pman.Request({\n method: 'POST',\n url: baseURL+ '/Roo/addr',\n params : {\n _delete : id\n },\n success : function() {\n _this.callback({ addr_id : 0, addr_line1 : '' });\n _this.dialog.hide();\n }\n });\n });\n \n \n \n}\n "
43 "cls": "x-btn-text-icon",
46 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
53 "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n if (_this.data.addr_id) { \n this.load({ method: 'GET', params: { '_id' : _this.data.addr_id }});\n }\n return;\n }\n if (action.type == 'load') {\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.form.setValues(action.result.data);\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
54 "|rendered": "function (form)\n{\n _this.form= form;\n}\n"
57 "style": "margin:10px;",
59 "|url": "baseURL + '/Roo/addr.php'",
64 "keyup": "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
67 "fieldLabel": "Line 1",
74 "fieldLabel": "Line 2",
81 "fieldLabel": "Line 3",
96 "displayField": "addr_state",
99 "fieldLabel": "State",
101 "loadingText": "Searching...",
103 "name": "addr_state",
104 "qtip": "Select State",
105 "queryParam": "query[addr_state]",
106 "selectOnFocus": true,
107 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b></div>",
108 "triggerAction": "all",
110 "valueField": "addr_state",
117 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n \n // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();\n //if (!o.params.state_country_id_country_name.length) {\n // Roo.MessageBox.alert(\"Select Country First\");\n// return false;\n // }\n \n o.params._distinct = 'addr_state';\n o.params._columns = 'addr_state';\n o.params.limit = 999;\n // set more here\n}\n"
122 "|sortInfo": "{ direction : 'ASC', field: 'addr_state' }",
128 "xtype": "HttpProxy",
129 "|url": "baseURL + '/Roo/addr.php'",
136 "totalProperty": "total",
137 "xtype": "JsonReader",
138 "|fields": "[ 'addr_state' ]",
147 "displayField": "country_name",
149 "emptyText": "Country",
150 "fieldLabel": "Country",
152 "loadingText": "Searching...",
154 "name": "addr_country",
155 "qtip": "Select Country",
156 "queryParam": "query[country_name]",
157 "selectOnFocus": true,
158 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>",
159 "triggerAction": "all",
161 "valueField": "country_name",
168 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.limit = 999;\n}\n"
173 "|sortInfo": "{ direction : 'ASC', field: 'country_name' }",
179 "xtype": "HttpProxy",
180 "|url": "baseURL + '/Roo/country.php'",
187 "totalProperty": "total",
188 "xtype": "JsonReader",
189 "|fields": "[{'name':'country_id','type':'int'},'county_name']",
197 "fieldLabel": "postalcode",
198 "name": "addr_postalcode",
200 "xtype": "TextField",
204 "fieldLabel": "Unique#",
205 "name": "addr_number",
207 "xtype": "TextField",
208 "|sync": "function() {\n if (_this.form.findField('addr_id') * 1 > 0 ) {\n return;\n }\n this.setValue('C' + _this.form.findField('customer_id').getValue() + '-' + \n _this.form.findField('addr_line1').getValue()\n );\n \n}\n",
212 "fieldLabel": "notes",
213 "name": "addr_notes",
219 "name": "customer_id",
236 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
238 "*prop": "buttons[]",
245 "click": "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction('submit');\n\n}"
247 "*prop": "buttons[]",