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'
153 triggerAction : 'all',
154 fieldLabel : 'Advalue Currency',
155 selectOnFocus : true,
156 displayField : 'code',
157 hiddenName : 'orig_advalue_currency',
163 actionMode : 'fieldEl',
167 name : 'currency_title',
168 qtip : "Select Currency",
169 store : Pman.I18n.currencyStore()
173 fieldLabel : 'Advalue',
174 xtype : 'NumberField',
175 actionMode : 'fieldEl',
176 allowDecimals : false,
179 name : 'orig_advalue'
186 fieldLabel : 'Phone',
188 regex : /^[0-9 +-]+$/,
195 fieldLabel : 'Phone (Alt)',
197 regex : /^[0-9 +-]+$/,
200 name : 'cntct_phone1'
204 fieldLabel : 'Email',
215 style : 'width:420px',
220 fieldLabel : 'Line 1',
225 name : 'cntct_addr_id_addr_line1',
227 keyup : function (_self, e)
229 _this.form.findField('addr_number').sync();
235 fieldLabel : 'Line 2',
239 name : 'cntct_addr_id_addr_line2'
243 fieldLabel : 'Line 3',
247 name : 'cntct_addr_id_addr_line3'
253 url : baseURL + '/Roo/addr.php',
262 xtype : 'JsonReader',
263 fields : [ "addr_state"],
265 totalProperty : 'total'
270 sortInfo : { direction : 'ASC', field: 'addr_state' },
273 beforeload : function (_self, o){
274 o.params = o.params || {};
276 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
277 //if (!o.params.state_country_id_country_name.length) {
278 // Roo.MessageBox.alert("Select Country First");
282 o.params._distinct = 'addr_state';
283 o.params._columns = 'addr_state';
284 o.params.limit = 999;
295 triggerAction : 'all',
296 fieldLabel : 'State',
297 selectOnFocus : true,
298 displayField : 'addr_state',
300 hiddenName : 'cntct_addr_id_addr_state',
302 valueField : 'addr_state',
309 name : 'cntct_addr_id_addr_state',
310 qtip : "Select State",
311 queryParam : 'query[addr_state]',
312 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
313 loadingText : "Searching...",
325 name : 'cntct_addr_id_addr_city'
329 fieldLabel : 'Zip code',
333 name : 'cntct_addr_id_addr_postalcode'
339 url : baseURL + '/Roo/country.php',
348 xtype : 'JsonReader',
349 fields : [{"name":"country_id","type":"int"},"county_name"],
351 totalProperty : 'total'
356 sortInfo : { direction : 'ASC', field: 'country_name' },
359 beforeload : function (_self, o){
360 o.params = o.params || {};
362 o.params.limit = 999;
372 triggerAction : 'all',
373 fieldLabel : 'Country',
374 selectOnFocus : true,
375 displayField : 'country_name',
376 emptyText : "Country",
377 hiddenName : 'cntct_addr_id_addr_country',
379 valueField : 'country_name',
386 name : 'cntct_addr_id_addr_country',
387 qtip : "Select Country",
388 queryParam : 'query[country_name]',
389 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
390 loadingText : "Searching...",
401 legend : "Store Details (Delivery only)",
423 name : 'vendaddr_code'
440 name : 'cntct_addr_id'