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 +-]+$/,
175 fieldLabel : 'Phone (Alt)',
177 regex : /^[0-9 +-]+$/,
180 name : 'cntct_phone1'
190 fieldLabel : 'Email',
201 style : 'width:420px',
206 fieldLabel : 'Line 1',
211 name : 'cntct_addr_id_addr_line1',
213 keyup : function (_self, e)
215 _this.form.findField('addr_number').sync();
221 fieldLabel : 'Line 2',
225 name : 'cntct_addr_id_addr_line2'
229 fieldLabel : 'Line 3',
233 name : 'cntct_addr_id_addr_line3'
239 url : baseURL + '/Roo/addr.php',
248 xtype : 'JsonReader',
249 fields : [ "addr_state"],
251 totalProperty : 'total'
256 sortInfo : { direction : 'ASC', field: 'addr_state' },
259 beforeload : function (_self, o){
260 o.params = o.params || {};
262 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
263 //if (!o.params.state_country_id_country_name.length) {
264 // Roo.MessageBox.alert("Select Country First");
268 o.params._distinct = 'addr_state';
269 o.params._columns = 'addr_state';
270 o.params.limit = 999;
281 triggerAction : 'all',
282 fieldLabel : 'State',
283 selectOnFocus : true,
284 displayField : 'addr_state',
286 hiddenName : 'cntct_addr_id_addr_state',
288 valueField : 'addr_state',
295 name : 'cntct_addr_id_addr_state',
296 qtip : "Select State",
297 queryParam : 'query[addr_state]',
298 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
299 loadingText : "Searching...",
311 name : 'cntct_addr_id_addr_city'
315 fieldLabel : 'Zip code',
319 name : 'cntct_addr_id_addr_postalcode'
325 url : baseURL + '/Roo/country.php',
334 xtype : 'JsonReader',
335 fields : [{"name":"country_id","type":"int"},"county_name"],
337 totalProperty : 'total'
342 sortInfo : { direction : 'ASC', field: 'country_name' },
345 beforeload : function (_self, o){
346 o.params = o.params || {};
348 o.params.limit = 999;
358 triggerAction : 'all',
359 fieldLabel : 'Country',
360 selectOnFocus : true,
361 displayField : 'country_name',
362 emptyText : "Country",
363 hiddenName : 'cntct_addr_id_addr_country',
365 valueField : 'country_name',
372 name : 'cntct_addr_id_addr_country',
373 qtip : "Select Country",
374 queryParam : 'query[country_name]',
375 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
376 loadingText : "Searching...",
387 legend : "Store Details (Delivery only)",
409 name : 'vendaddr_code'
426 name : 'cntct_addr_id'