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',
159 regex : /^[0-9 +-]+$/,
174 fieldLabel : 'Phone (Alt)',
176 regex : /^[0-9 +-]+$/,
179 name : 'cntct_phone1'
189 fieldLabel : 'Email',
200 style : 'width:420px',
205 fieldLabel : 'Line 1',
210 name : 'cntct_addr_id_addr_line1',
212 keyup : function (_self, e)
214 _this.form.findField('addr_number').sync();
220 fieldLabel : 'Line 2',
224 name : 'cntct_addr_id_addr_line2'
228 fieldLabel : 'Line 3',
232 name : 'cntct_addr_id_addr_line3'
238 url : baseURL + '/Roo/addr.php',
247 xtype : 'JsonReader',
248 fields : [ "addr_state"],
250 totalProperty : 'total'
255 sortInfo : { direction : 'ASC', field: 'addr_state' },
258 beforeload : function (_self, o){
259 o.params = o.params || {};
261 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
262 //if (!o.params.state_country_id_country_name.length) {
263 // Roo.MessageBox.alert("Select Country First");
267 o.params._distinct = 'addr_state';
268 o.params._columns = 'addr_state';
269 o.params.limit = 999;
280 triggerAction : 'all',
281 fieldLabel : 'State',
282 selectOnFocus : true,
283 displayField : 'addr_state',
285 hiddenName : 'cntct_addr_id_addr_state',
287 valueField : 'addr_state',
294 name : 'cntct_addr_id_addr_state',
295 qtip : "Select State",
296 queryParam : 'query[addr_state]',
297 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
298 loadingText : "Searching...",
310 name : 'cntct_addr_id_addr_city'
314 fieldLabel : 'Zip code',
318 name : 'cntct_addr_id_addr_postalcode'
324 url : baseURL + '/Roo/country.php',
333 xtype : 'JsonReader',
334 fields : [{"name":"country_id","type":"int"},"county_name"],
336 totalProperty : 'total'
341 sortInfo : { direction : 'ASC', field: 'country_name' },
344 beforeload : function (_self, o){
345 o.params = o.params || {};
347 o.params.limit = 999;
357 triggerAction : 'all',
358 fieldLabel : 'Country',
359 selectOnFocus : true,
360 displayField : 'country_name',
361 emptyText : "Country",
362 hiddenName : 'cntct_addr_id_addr_country',
364 valueField : 'country_name',
371 name : 'cntct_addr_id_addr_country',
372 qtip : "Select Country",
373 queryParam : 'query[country_name]',
374 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
375 loadingText : "Searching...",
386 legend : "Store Details (Delivery only)",
408 name : 'vendaddr_code'
425 name : 'cntct_addr_id'