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" : "Phone",
58 "xtype" : "TextField",
59 "$ regex" : "/^[0-9 +-]+$/",
62 "name" : "cntct_phone"
65 "fieldLabel" : "Phone (Alt)",
66 "xtype" : "TextField",
67 "$ regex" : "/^[0-9 +-]+$/",
70 "name" : "cntct_phone1"
73 "fieldLabel" : "Email",
75 "xtype" : "TextField",
78 "name" : "cntct_email"
83 "style" : "width:420px",
88 "keyup" : "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
90 "fieldLabel" : "Line 1",
91 "xtype" : "TextField",
95 "name" : "cntct_addr_id_addr_line1"
98 "fieldLabel" : "Line 2",
99 "xtype" : "TextField",
101 "$ xns" : "Roo.form",
102 "name" : "cntct_addr_id_addr_line2"
105 "fieldLabel" : "Line 3",
106 "xtype" : "TextField",
108 "$ xns" : "Roo.form",
109 "name" : "cntct_addr_id_addr_line3"
113 "triggerAction" : "all",
114 "fieldLabel" : "State",
115 "selectOnFocus" : true,
116 "displayField" : "addr_state",
117 "emptyText" : "State",
118 "hiddenName" : "cntct_addr_id_addr_state",
120 "valueField" : "addr_state",
121 "xtype" : "ComboBox",
126 "$ xns" : "Roo.form",
127 "name" : "cntct_addr_id_addr_state",
128 "qtip" : "Select State",
129 "queryParam" : "query[addr_state]",
130 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>",
131 "loadingText" : "Searching...",
135 "|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"
139 "$ sortInfo" : "{ direction : 'ASC', field: 'addr_state' }",
140 "$ xns" : "Roo.data",
144 "$ url" : "baseURL + '/Roo/addr.php'",
145 "xtype" : "HttpProxy",
147 "$ xns" : "Roo.data",
153 "xtype" : "JsonReader",
154 "$ fields" : "[ \"addr_state\"]",
155 "$ xns" : "Roo.data",
157 "totalProperty" : "total"
164 "fieldLabel" : "City",
165 "xtype" : "TextField",
167 "$ xns" : "Roo.form",
168 "name" : "cntct_addr_id_addr_city"
171 "fieldLabel" : "Zip code",
172 "xtype" : "TextField",
174 "$ xns" : "Roo.form",
175 "name" : "cntct_addr_id_addr_postalcode"
179 "triggerAction" : "all",
180 "fieldLabel" : "Country",
181 "selectOnFocus" : true,
182 "displayField" : "country_name",
183 "emptyText" : "Country",
184 "hiddenName" : "cntct_addr_id_addr_country",
186 "valueField" : "country_name",
187 "xtype" : "ComboBox",
192 "$ xns" : "Roo.form",
193 "name" : "cntct_addr_id_addr_country",
194 "qtip" : "Select Country",
195 "queryParam" : "query[country_name]",
196 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>",
197 "loadingText" : "Searching...",
201 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.limit = 999;\n}\n"
205 "$ sortInfo" : "{ direction : 'ASC', field: 'country_name' }",
206 "$ xns" : "Roo.data",
210 "$ url" : "baseURL + '/Roo/country.php'",
211 "xtype" : "HttpProxy",
213 "$ xns" : "Roo.data",
219 "xtype" : "JsonReader",
220 "$ fields" : "[{\"name\":\"country_id\",\"type\":\"int\"},\"county_name\"]",
221 "$ xns" : "Roo.data",
223 "totalProperty" : "total"
232 "legend" : "Store Details (Delivery only)",
233 "xtype" : "FieldSet",
234 "$ xns" : "Roo.form",
237 "fieldLabel" : "Name",
238 "xtype" : "TextField",
242 "$ xns" : "Roo.form",
246 "fieldLabel" : "Code",
247 "xtype" : "TextField",
251 "$ xns" : "Roo.form",
252 "name" : "vendaddr_code"
259 "$ xns" : "Roo.form",
260 "name" : "customer_id"
265 "$ xns" : "Roo.form",
266 "name" : "cntct_addr_id"
270 "$ xns" : "Roo.form",
279 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
284 "* prop" : "buttons[]"
288 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}"
293 "* prop" : "buttons[]"