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'
157 fieldLabel : 'Phone / Alt',
159 regex : /^[0-9 +-]+$/,
172 style : 'padding-left:10px',
176 fieldLabel : 'Phone (Alt)',
178 regex : /^[0-9 +-]+$/,
181 name : 'cntct_phone1'
191 fieldLabel : 'Email',
202 style : 'width:420px',
207 fieldLabel : 'Line 1',
212 name : 'cntct_addr_id_addr_line1',
214 keyup : function (_self, e)
216 _this.form.findField('addr_number').sync();
222 fieldLabel : 'Line 2',
226 name : 'cntct_addr_id_addr_line2'
230 fieldLabel : 'Line 3',
234 name : 'cntct_addr_id_addr_line3'
240 url : baseURL + '/Roo/addr.php',
249 xtype : 'JsonReader',
250 fields : [ "addr_state"],
252 totalProperty : 'total'
257 sortInfo : { direction : 'ASC', field: 'addr_state' },
260 beforeload : function (_self, o){
261 o.params = o.params || {};
263 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
264 //if (!o.params.state_country_id_country_name.length) {
265 // Roo.MessageBox.alert("Select Country First");
269 o.params._distinct = 'addr_state';
270 o.params._columns = 'addr_state';
271 o.params.limit = 999;
282 triggerAction : 'all',
283 fieldLabel : 'State',
284 selectOnFocus : true,
285 displayField : 'addr_state',
287 hiddenName : 'cntct_addr_id_addr_state',
289 valueField : 'addr_state',
296 name : 'cntct_addr_id_addr_state',
297 qtip : "Select State",
298 queryParam : 'query[addr_state]',
299 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
300 loadingText : "Searching...",
312 name : 'cntct_addr_id_addr_city'
316 fieldLabel : 'Zip code',
320 name : 'cntct_addr_id_addr_postalcode'
326 url : baseURL + '/Roo/country.php',
335 xtype : 'JsonReader',
336 fields : [{"name":"country_id","type":"int"},"county_name"],
338 totalProperty : 'total'
343 sortInfo : { direction : 'ASC', field: 'country_name' },
346 beforeload : function (_self, o){
347 o.params = o.params || {};
349 o.params.limit = 999;
359 triggerAction : 'all',
360 fieldLabel : 'Country',
361 selectOnFocus : true,
362 displayField : 'country_name',
363 emptyText : "Country",
364 hiddenName : 'cntct_addr_id_addr_country',
366 valueField : 'country_name',
373 name : 'cntct_addr_id_addr_country',
374 qtip : "Select Country",
375 queryParam : 'query[country_name]',
376 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
377 loadingText : "Searching...",
388 legend : "Store Details (Delivery only)",
410 name : 'vendaddr_code'
427 name : 'cntct_addr_id'