1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.XtupleLocation = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
38 title : "Edit / Create location",
42 xtype: 'ContentPanel',
50 actioncomplete : function(_self,action)
52 if (action.type == 'setdata') {
54 if (_this.data.location_id) {
55 this.load({ method: 'GET', params: { '_id' : _this.data.location_id }});
60 if (action.type == 'load') {
64 if (action.type =='submit') {
70 _this.callback.call(_this, _this.form.getValues());
76 rendered : function (form)
82 style : 'margin:10px;',
83 url : baseURL + '/Roo/location.php',
89 name : 'location_name',
95 fieldLabel : 'Description',
96 name : 'location_descrip',
103 displayField : 'cust_name',
105 emptyText : "Select custinfo",
106 fieldLabel : 'Customer',
107 forceSelection : true,
108 hiddenName : 'location_cust_id',
110 loadingText : "Searching...",
112 name : 'location_cust_id_cust_name',
114 qtip : "Select custinfo",
115 queryParam : 'query[cust_name]',
116 selectOnFocus : true,
117 tpl : '<div class="x-grid-cell-text x-btn button"><b>{cust_name}</b> ({cust_number}) </div>',
118 triggerAction : 'all',
119 valueField : 'cust_id',
125 beforeload : function (_self, o){
126 o.params = o.params || {};
131 sortInfo : { direction : 'ASC', field: 'cust_name' },
136 url : baseURL + '/Roo/custinfo.php'
143 totalProperty : 'total',
144 fields : [{"name":"id","type":"int"},{"name":"cust_name","type":"string"}]
159 xtype: 'LayoutRegion',
167 click : function (_self, e)
178 click : function (_self, e)
184 _this.form.doAction("submit");