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"
67 "fieldLabel" : "Phone / Alt",
68 "xtype" : "TextField",
69 "$ regex" : "/^[0-9 +-]+$/",
72 "name" : "cntct_phone"
79 "Boolean hideLabels" : true,
80 "String/Object/Function style" : "padding-left:10px",
83 "fieldLabel" : "Phone (Alt)",
84 "xtype" : "TextField",
85 "$ regex" : "/^[0-9 +-]+$/",
88 "name" : "cntct_phone1"
95 "fieldLabel" : "Email",
97 "xtype" : "TextField",
100 "name" : "cntct_email"
103 "xtype" : "FieldSet",
104 "legend" : "Address",
105 "style" : "width:420px",
106 "$ xns" : "Roo.form",
110 "keyup" : "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
112 "fieldLabel" : "Line 1",
113 "xtype" : "TextField",
114 "allowBlank" : false,
116 "$ xns" : "Roo.form",
117 "name" : "cntct_addr_id_addr_line1"
120 "fieldLabel" : "Line 2",
121 "xtype" : "TextField",
123 "$ xns" : "Roo.form",
124 "name" : "cntct_addr_id_addr_line2"
127 "fieldLabel" : "Line 3",
128 "xtype" : "TextField",
130 "$ xns" : "Roo.form",
131 "name" : "cntct_addr_id_addr_line3"
135 "triggerAction" : "all",
136 "fieldLabel" : "State",
137 "selectOnFocus" : true,
138 "displayField" : "addr_state",
139 "emptyText" : "State",
140 "hiddenName" : "cntct_addr_id_addr_state",
142 "valueField" : "addr_state",
143 "xtype" : "ComboBox",
148 "$ xns" : "Roo.form",
149 "name" : "cntct_addr_id_addr_state",
150 "qtip" : "Select State",
151 "queryParam" : "query[addr_state]",
152 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>",
153 "loadingText" : "Searching...",
157 "|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"
161 "$ sortInfo" : "{ direction : 'ASC', field: 'addr_state' }",
162 "$ xns" : "Roo.data",
166 "$ url" : "baseURL + '/Roo/addr.php'",
167 "xtype" : "HttpProxy",
169 "$ xns" : "Roo.data",
175 "xtype" : "JsonReader",
176 "$ fields" : "[ \"addr_state\"]",
177 "$ xns" : "Roo.data",
179 "totalProperty" : "total"
186 "fieldLabel" : "City",
187 "xtype" : "TextField",
189 "$ xns" : "Roo.form",
190 "name" : "cntct_addr_id_addr_city"
193 "fieldLabel" : "Zip code",
194 "xtype" : "TextField",
196 "$ xns" : "Roo.form",
197 "name" : "cntct_addr_id_addr_postalcode"
201 "triggerAction" : "all",
202 "fieldLabel" : "Country",
203 "selectOnFocus" : true,
204 "displayField" : "country_name",
205 "emptyText" : "Country",
206 "hiddenName" : "cntct_addr_id_addr_country",
208 "valueField" : "country_name",
209 "xtype" : "ComboBox",
214 "$ xns" : "Roo.form",
215 "name" : "cntct_addr_id_addr_country",
216 "qtip" : "Select Country",
217 "queryParam" : "query[country_name]",
218 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>",
219 "loadingText" : "Searching...",
223 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.limit = 999;\n}\n"
227 "$ sortInfo" : "{ direction : 'ASC', field: 'country_name' }",
228 "$ xns" : "Roo.data",
232 "$ url" : "baseURL + '/Roo/country.php'",
233 "xtype" : "HttpProxy",
235 "$ xns" : "Roo.data",
241 "xtype" : "JsonReader",
242 "$ fields" : "[{\"name\":\"country_id\",\"type\":\"int\"},\"county_name\"]",
243 "$ xns" : "Roo.data",
245 "totalProperty" : "total"
254 "legend" : "Store Details (Delivery only)",
255 "xtype" : "FieldSet",
256 "$ xns" : "Roo.form",
259 "fieldLabel" : "Name",
260 "xtype" : "TextField",
264 "$ xns" : "Roo.form",
268 "fieldLabel" : "Code",
269 "xtype" : "TextField",
273 "$ xns" : "Roo.form",
274 "name" : "vendaddr_code"
281 "$ xns" : "Roo.form",
282 "name" : "customer_id"
287 "$ xns" : "Roo.form",
288 "name" : "cntct_addr_id"
292 "$ xns" : "Roo.form",
301 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
306 "* prop" : "buttons[]"
310 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}"
315 "* prop" : "buttons[]"