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 : 'ID Card',
149 name : 'cntct_id_card'
165 fieldLabel : 'Phone / Alt',
167 regex : /^[0-9 +-]+$/,
180 style : 'padding-left:10px',
184 fieldLabel : 'Phone (Alt)',
186 regex : /^[0-9 +-]+$/,
189 name : 'cntct_phone2'
199 fieldLabel : 'Email',
210 style : 'width:420px',
215 fieldLabel : 'Line 1',
220 name : 'cntct_addr_id_addr_line1',
222 keyup : function (_self, e)
224 _this.form.findField('addr_number').sync();
230 fieldLabel : 'Line 2',
234 name : 'cntct_addr_id_addr_line2'
238 fieldLabel : 'Line 3',
242 name : 'cntct_addr_id_addr_line3'
248 url : baseURL + '/Roo/addr.php',
257 xtype : 'JsonReader',
258 fields : [ "addr_state"],
260 totalProperty : 'total'
265 sortInfo : { direction : 'ASC', field: 'addr_state' },
268 beforeload : function (_self, o){
269 o.params = o.params || {};
271 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
272 //if (!o.params.state_country_id_country_name.length) {
273 // Roo.MessageBox.alert("Select Country First");
277 o.params._distinct = 'addr_state';
278 o.params._columns = 'addr_state';
279 o.params.limit = 999;
290 triggerAction : 'all',
291 fieldLabel : 'State',
292 selectOnFocus : true,
293 displayField : 'addr_state',
295 hiddenName : 'cntct_addr_id_addr_state',
297 valueField : 'addr_state',
304 name : 'cntct_addr_id_addr_state',
305 qtip : "Select State",
306 queryParam : 'query[addr_state]',
307 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
308 loadingText : "Searching...",
320 name : 'cntct_addr_id_addr_city'
324 fieldLabel : 'Zip code',
328 name : 'cntct_addr_id_addr_postalcode'
334 url : baseURL + '/Roo/country.php',
343 xtype : 'JsonReader',
344 fields : [{"name":"country_id","type":"int"},"county_name"],
346 totalProperty : 'total'
351 sortInfo : { direction : 'ASC', field: 'country_name' },
354 beforeload : function (_self, o){
355 o.params = o.params || {};
357 o.params.limit = 999;
367 triggerAction : 'all',
368 fieldLabel : 'Country',
369 selectOnFocus : true,
370 displayField : 'country_name',
371 emptyText : "Country",
372 hiddenName : 'cntct_addr_id_addr_country',
374 valueField : 'country_name',
381 name : 'cntct_addr_id_addr_country',
382 qtip : "Select Country",
383 queryParam : 'query[country_name]',
384 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
385 loadingText : "Searching...",
396 legend : "Store Details (Delivery only)",
418 name : 'vendaddr_code'
435 name : 'cntct_addr_id'