2 "name" : "Pman.Dialog.XtupleAddress",
5 "path" : "/home/alan/gitlive/Pman.Xtuple/Pman.Dialog.XtupleAddress.bjs",
9 "59716c97497eb9694541f7c3d37b1a4d" : "Country",
10 "3c1df4260ce594cb5594696461087f2f" : "Select Country",
11 "0dbd2559b7f2c43a6e5f0a649c4b172a" : "Edit Address",
12 "46a2a41cc6e552044816a2d04634545d" : "State",
13 "1243daf593fa297e07ab03bf06d925af" : "Searching...",
14 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
15 "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
16 "c9cc8cce247e49bae79f15173ce97354" : "Save",
17 "be2933038f93e25262400220080c111f" : "Select State"
22 "collapsible" : false,
23 "title" : "Edit Address",
24 "xtype" : "LayoutDialog",
30 "# 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\"}",
33 "xtype" : "LayoutRegion",
39 "xtype" : "ContentPanel",
49 "$ xns" : "Roo.Toolbar"
53 "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 "
57 "cls" : "x-btn-text-icon",
58 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
59 "$ xns" : "Roo.Toolbar"
65 "|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",
66 "|rendered" : "function (form)\n{\n _this.form= form;\n}\n"
68 "$ url" : "baseURL + '/Roo/addr.php'",
71 "style" : "margin:10px;",
76 "keyup" : "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
78 "fieldLabel" : "Line 1",
79 "xtype" : "TextField",
86 "fieldLabel" : "Line 2",
87 "xtype" : "TextField",
93 "fieldLabel" : "Line 3",
94 "xtype" : "TextField",
100 "fieldLabel" : "City",
101 "xtype" : "TextField",
103 "$ xns" : "Roo.form",
108 "triggerAction" : "all",
109 "fieldLabel" : "State",
110 "selectOnFocus" : true,
111 "displayField" : "addr_state",
112 "emptyText" : "State",
114 "valueField" : "addr_state",
115 "xtype" : "ComboBox",
120 "$ xns" : "Roo.form",
121 "name" : "addr_state",
122 "qtip" : "Select State",
123 "queryParam" : "query[addr_state]",
124 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b></div>",
125 "loadingText" : "Searching...",
129 "|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"
133 "$ sortInfo" : "{ direction : 'ASC', field: 'addr_state' }",
134 "$ xns" : "Roo.data",
138 "$ url" : "baseURL + '/Roo/addr.php'",
139 "xtype" : "HttpProxy",
141 "$ xns" : "Roo.data",
147 "xtype" : "JsonReader",
148 "$ fields" : "[ 'addr_state' ]",
149 "$ xns" : "Roo.data",
151 "totalProperty" : "total"
159 "triggerAction" : "all",
160 "fieldLabel" : "Country",
161 "selectOnFocus" : true,
162 "displayField" : "country_name",
163 "emptyText" : "Country",
165 "valueField" : "country_name",
166 "xtype" : "ComboBox",
171 "$ xns" : "Roo.form",
172 "name" : "addr_country",
173 "qtip" : "Select Country",
174 "queryParam" : "query[country_name]",
175 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>",
176 "loadingText" : "Searching...",
180 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.limit = 999;\n}\n"
184 "$ sortInfo" : "{ direction : 'ASC', field: 'country_name' }",
185 "$ xns" : "Roo.data",
189 "$ url" : "baseURL + '/Roo/country.php'",
190 "xtype" : "HttpProxy",
192 "$ xns" : "Roo.data",
198 "xtype" : "JsonReader",
199 "$ fields" : "[{'name':'country_id','type':'int'},'county_name']",
200 "$ xns" : "Roo.data",
202 "totalProperty" : "total"
209 "fieldLabel" : "postalcode",
210 "xtype" : "TextField",
212 "$ xns" : "Roo.form",
213 "name" : "addr_postalcode"
216 "fieldLabel" : "Unique#",
217 "xtype" : "TextField",
219 "$ 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",
220 "$ xns" : "Roo.form",
221 "name" : "addr_number"
224 "fieldLabel" : "notes",
225 "xtype" : "TextArea",
227 "$ xns" : "Roo.form",
228 "name" : "addr_notes"
233 "$ xns" : "Roo.form",
234 "name" : "customer_id"
239 "$ xns" : "Roo.form",
248 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
253 "* prop" : "buttons[]"
257 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction('submit');\n\n}"
262 "* prop" : "buttons[]"