2 "name" : "Pman.Dialog.XtupleQuickContact",
5 "path" : "/home/alan/gitlive/Pman.Xtuple/Pman.Dialog.XtupleQuickContact.bjs",
11 "collapsible" : false,
12 "title" : "Quick enter Contact / Address",
13 "xtype" : "LayoutDialog",
21 "xtype" : "LayoutRegion",
27 "xtype" : "ContentPanel",
32 "|actioncomplete" : "function(_self,action)\n{\n if (action.type == 'setdata') {\n if (_this.data._id) { \n this.load({ method: 'GET', params: { \n _id : _this.data._id , \n _with_addr : 1\n }});\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",
33 "|rendered" : "function (form)\n{\n _this.form= form;\n}\n"
35 "$ url" : "baseURL + '/Roo/cntct.php'",
38 "style" : "margin:10px;",
42 "fieldLabel" : "First Name",
43 "xtype" : "TextField",
47 "name" : "cntct_first_name"
50 "fieldLabel" : "Last Name",
51 "xtype" : "TextField",
54 "name" : "cntct_last_name"
57 "fieldLabel" : "ID Card",
58 "xtype" : "TextField",
61 "name" : "cntct_id_card"
74 "fieldLabel" : "Phone / Alt",
75 "xtype" : "TextField",
76 "$ regex" : "/^[0-9 +-]+$/",
79 "name" : "cntct_phone"
86 "Boolean hideLabels" : true,
87 "String/Object/Function style" : "padding-left:10px",
90 "fieldLabel" : "Phone (Alt)",
91 "xtype" : "TextField",
92 "$ regex" : "/^[0-9 +-]+$/",
95 "name" : "cntct_phone2"
102 "fieldLabel" : "Email",
104 "xtype" : "TextField",
106 "$ xns" : "Roo.form",
107 "name" : "cntct_email"
110 "xtype" : "FieldSet",
111 "legend" : "Address",
112 "style" : "width:420px",
113 "$ xns" : "Roo.form",
117 "keyup" : "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
119 "fieldLabel" : "Line 1",
120 "xtype" : "TextField",
121 "allowBlank" : false,
123 "$ xns" : "Roo.form",
124 "name" : "cntct_addr_id_addr_line1"
127 "fieldLabel" : "Line 2",
128 "xtype" : "TextField",
130 "$ xns" : "Roo.form",
131 "name" : "cntct_addr_id_addr_line2"
134 "fieldLabel" : "Line 3",
135 "xtype" : "TextField",
137 "$ xns" : "Roo.form",
138 "name" : "cntct_addr_id_addr_line3"
142 "triggerAction" : "all",
143 "fieldLabel" : "State",
144 "selectOnFocus" : true,
145 "displayField" : "addr_state",
146 "emptyText" : "State",
147 "hiddenName" : "cntct_addr_id_addr_state",
149 "valueField" : "addr_state",
150 "xtype" : "ComboBox",
155 "$ xns" : "Roo.form",
156 "name" : "cntct_addr_id_addr_state",
157 "qtip" : "Select State",
158 "queryParam" : "query[addr_state]",
159 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>",
160 "loadingText" : "Searching...",
164 "|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"
168 "$ sortInfo" : "{ direction : 'ASC', field: 'addr_state' }",
169 "$ xns" : "Roo.data",
173 "$ url" : "baseURL + '/Roo/addr.php'",
174 "xtype" : "HttpProxy",
176 "$ xns" : "Roo.data",
182 "xtype" : "JsonReader",
183 "$ fields" : "[ \"addr_state\"]",
184 "$ xns" : "Roo.data",
186 "totalProperty" : "total"
193 "fieldLabel" : "City",
194 "xtype" : "TextField",
196 "$ xns" : "Roo.form",
197 "name" : "cntct_addr_id_addr_city"
200 "fieldLabel" : "Zip code",
201 "xtype" : "TextField",
203 "$ xns" : "Roo.form",
204 "name" : "cntct_addr_id_addr_postalcode"
208 "triggerAction" : "all",
209 "fieldLabel" : "Country",
210 "selectOnFocus" : true,
211 "displayField" : "country_name",
212 "emptyText" : "Country",
213 "hiddenName" : "cntct_addr_id_addr_country",
215 "valueField" : "country_name",
216 "xtype" : "ComboBox",
221 "$ xns" : "Roo.form",
222 "name" : "cntct_addr_id_addr_country",
223 "qtip" : "Select Country",
224 "queryParam" : "query[country_name]",
225 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>",
226 "loadingText" : "Searching...",
230 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.limit = 999;\n}\n"
234 "$ sortInfo" : "{ direction : 'ASC', field: 'country_name' }",
235 "$ xns" : "Roo.data",
239 "$ url" : "baseURL + '/Roo/country.php'",
240 "xtype" : "HttpProxy",
242 "$ xns" : "Roo.data",
248 "xtype" : "JsonReader",
249 "$ fields" : "[{\"name\":\"country_id\",\"type\":\"int\"},\"county_name\"]",
250 "$ xns" : "Roo.data",
252 "totalProperty" : "total"
261 "legend" : "Store Details (Delivery only)",
262 "xtype" : "FieldSet",
263 "$ xns" : "Roo.form",
266 "fieldLabel" : "Name",
267 "xtype" : "TextField",
271 "$ xns" : "Roo.form",
275 "fieldLabel" : "Code",
276 "xtype" : "TextField",
280 "$ xns" : "Roo.form",
281 "name" : "vendaddr_code"
288 "$ xns" : "Roo.form",
289 "name" : "customer_id"
294 "$ xns" : "Roo.form",
295 "name" : "cntct_addr_id"
299 "$ xns" : "Roo.form",
308 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
313 "* prop" : "buttons[]"
317 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}"
322 "* prop" : "buttons[]"