1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.XtupleQuickContact = {
12 show : function(data, cb)
20 this.dialog.show(this.data._el);
23 this.form.setValues(data);
24 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
32 this.dialog = Roo.factory({
35 xtype : 'LayoutRegion',
41 title : "Quick enter Contact / Address",
42 xtype : 'LayoutDialog',
55 click : function (_self, e)
67 click : function (_self, e)
73 _this.form.doAction("submit");
83 xtype : 'ContentPanel',
88 url : baseURL + '/Roo/cntct.php',
91 style : 'margin:10px;',
94 actioncomplete : function(_self,action)
96 if (action.type == 'setdata') {
98 this.load({ method: 'GET', params: {
99 _id : _this.data._id ,
105 if (action.type == 'load') {
108 if (action.type =='submit') {
112 if (_this.callback) {
113 _this.form.setValues(action.result.data);
114 _this.callback.call(_this, _this.form.getValues());
120 rendered : function (form)
128 fieldLabel : 'First Name',
133 name : 'cntct_first_name'
137 fieldLabel : 'Last Name',
141 name : 'cntct_last_name'
145 fieldLabel : 'Phone',
147 regex : /^[0-9 +-]+$/,
154 fieldLabel : 'Phone (Alt)',
156 regex : /^[0-9 +-]+$/,
159 name : 'cntct_phone1'
163 fieldLabel : 'Email',
174 style : 'width:420px',
179 fieldLabel : 'Line 1',
184 name : 'cntct_addr_id_addr_line1',
186 keyup : function (_self, e)
188 _this.form.findField('addr_number').sync();
194 fieldLabel : 'Line 2',
198 name : 'cntct_addr_id_addr_line2'
202 fieldLabel : 'Line 3',
206 name : 'cntct_addr_id_addr_line3'
212 url : baseURL + '/Roo/addr.php',
221 xtype : 'JsonReader',
222 fields : [ "addr_state"],
224 totalProperty : 'total'
229 sortInfo : { direction : 'ASC', field: 'addr_state' },
232 beforeload : function (_self, o){
233 o.params = o.params || {};
235 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
236 //if (!o.params.state_country_id_country_name.length) {
237 // Roo.MessageBox.alert("Select Country First");
241 o.params._distinct = 'addr_state';
242 o.params._columns = 'addr_state';
243 o.params.limit = 999;
254 triggerAction : 'all',
255 fieldLabel : 'State',
256 selectOnFocus : true,
257 displayField : 'addr_state',
259 hiddenName : 'cntct_addr_id_addr_state',
261 valueField : 'addr_state',
268 name : 'cntct_addr_id_addr_state',
269 qtip : "Select State",
270 queryParam : 'query[addr_state]',
271 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
272 loadingText : "Searching...",
284 name : 'cntct_addr_id_addr_city'
288 fieldLabel : 'Zip code',
292 name : 'cntct_addr_id_addr_postalcode'
298 url : baseURL + '/Roo/country.php',
307 xtype : 'JsonReader',
308 fields : [{"name":"country_id","type":"int"},"county_name"],
310 totalProperty : 'total'
315 sortInfo : { direction : 'ASC', field: 'country_name' },
318 beforeload : function (_self, o){
319 o.params = o.params || {};
321 o.params.limit = 999;
331 triggerAction : 'all',
332 fieldLabel : 'Country',
333 selectOnFocus : true,
334 displayField : 'country_name',
335 emptyText : "Country",
336 hiddenName : 'cntct_addr_id_addr_country',
338 valueField : 'country_name',
345 name : 'cntct_addr_id_addr_country',
346 qtip : "Select Country",
347 queryParam : 'query[country_name]',
348 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
349 loadingText : "Searching...",
360 legend : "Store Details (Delivery only)",
382 name : 'vendaddr_code'
399 name : 'cntct_addr_id'