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'
152 fieldLabel : 'Phone',
154 regex : /^[0-9 +-]+$/,
161 fieldLabel : 'Phone (Alt)',
163 regex : /^[0-9 +-]+$/,
166 name : 'cntct_phone1'
173 fieldLabel : 'Email',
184 style : 'width:420px',
189 fieldLabel : 'Line 1',
194 name : 'cntct_addr_id_addr_line1',
196 keyup : function (_self, e)
198 _this.form.findField('addr_number').sync();
204 fieldLabel : 'Line 2',
208 name : 'cntct_addr_id_addr_line2'
212 fieldLabel : 'Line 3',
216 name : 'cntct_addr_id_addr_line3'
222 url : baseURL + '/Roo/addr.php',
231 xtype : 'JsonReader',
232 fields : [ "addr_state"],
234 totalProperty : 'total'
239 sortInfo : { direction : 'ASC', field: 'addr_state' },
242 beforeload : function (_self, o){
243 o.params = o.params || {};
245 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
246 //if (!o.params.state_country_id_country_name.length) {
247 // Roo.MessageBox.alert("Select Country First");
251 o.params._distinct = 'addr_state';
252 o.params._columns = 'addr_state';
253 o.params.limit = 999;
264 triggerAction : 'all',
265 fieldLabel : 'State',
266 selectOnFocus : true,
267 displayField : 'addr_state',
269 hiddenName : 'cntct_addr_id_addr_state',
271 valueField : 'addr_state',
278 name : 'cntct_addr_id_addr_state',
279 qtip : "Select State",
280 queryParam : 'query[addr_state]',
281 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
282 loadingText : "Searching...",
294 name : 'cntct_addr_id_addr_city'
298 fieldLabel : 'Zip code',
302 name : 'cntct_addr_id_addr_postalcode'
308 url : baseURL + '/Roo/country.php',
317 xtype : 'JsonReader',
318 fields : [{"name":"country_id","type":"int"},"county_name"],
320 totalProperty : 'total'
325 sortInfo : { direction : 'ASC', field: 'country_name' },
328 beforeload : function (_self, o){
329 o.params = o.params || {};
331 o.params.limit = 999;
341 triggerAction : 'all',
342 fieldLabel : 'Country',
343 selectOnFocus : true,
344 displayField : 'country_name',
345 emptyText : "Country",
346 hiddenName : 'cntct_addr_id_addr_country',
348 valueField : 'country_name',
355 name : 'cntct_addr_id_addr_country',
356 qtip : "Select Country",
357 queryParam : 'query[country_name]',
358 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
359 loadingText : "Searching...",
370 legend : "Store Details (Delivery only)",
392 name : 'vendaddr_code'
409 name : 'cntct_addr_id'