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.XtuplePriceList = {
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 : "Edit / Create Price List",
42 xtype : 'LayoutDialog',
55 click : function (_self, e)
67 click : function (_self, e)
72 //_this.dialog.el.mask("Saving");
73 _this.form.doAction("submit");
83 xtype : 'ContentPanel',
88 url : baseURL + '/Roo/ipshead.php',
91 style : 'margin:10px;',
94 actioncomplete : function(_self,action)
96 if (action.type == 'setdata') {
97 //_this.dialog.el.mask("Loading");
100 if (_this.data.ipshead_id) {
101 this.load({ method: 'GET', params: { '_id' : _this.data.ipshead_id }});
105 ipshead_effective : new Date(1970,1,1),
106 ipshead_expires :new Date(2100,1,1)
113 if (action.type == 'load') {
114 _this.dialog.el.unmask();
117 if (action.type =='submit') {
119 _this.dialog.el.unmask();
122 if (_this.callback) {
123 _this.callback.call(_this, _this.form.getValues());
129 rendered : function (form)
142 name : 'ipshead_name'
146 fieldLabel : 'Description',
150 name : 'ipshead_descrip',
157 url : baseURL + '/Roo/curr_symbol.php',
166 xtype : 'JsonReader',
168 fields : [{"name":"id","type":"int"},{"name":"curr_name","type":"string"}],
169 totalProperty : 'total'
175 sortInfo : { direction : 'ASC', field: 'id' },
177 beforeload : function (_self, o){
178 o.params = o.params || {};
189 triggerAction : 'all',
190 fieldLabel : 'Currency',
191 forceSelection : true,
192 selectOnFocus : true,
194 displayField : 'curr_name',
195 emptyText : "Select currency",
196 hiddenName : 'ipshead_curr_id',
198 valueField : 'curr_id',
205 name : 'ipshead_curr_id_curr_name',
206 qtip : "Select curr_symbol",
207 queryParam : 'query[curr_name]',
208 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>',
209 loadingText : "Searching...",
217 fieldLabel : 'Effective',
224 altFormats : 'Y-m-d',
225 name : 'ipshead_effective'
229 fieldLabel : 'Expires',
236 altFormats : 'Y-m-d',
237 name : 'ipshead_expires'