1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.XtuplePriceList = {
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 Price List",
42 xtype: 'ContentPanel',
50 actioncomplete : function(_self,action)
52 if (action.type == 'setdata') {
53 //_this.dialog.el.mask("Loading");
56 if (_this.data.ipshead_id) {
57 this.load({ method: 'GET', params: { '_id' : _this.data.ipshead_id }});
61 ipshead_effective : new Date(1970,1,1),
62 ipshead_expires :new Date(2100,1,1)
69 if (action.type == 'load') {
70 _this.dialog.el.unmask();
73 if (action.type =='submit') {
75 _this.dialog.el.unmask();
79 _this.callback.call(_this, _this.form.getValues());
85 rendered : function (form)
91 style : 'margin:10px;',
92 url : baseURL + '/Roo/ipshead.php',
99 name : 'ipshead_name',
105 fieldLabel : 'Description',
107 name : 'ipshead_descrip',
114 displayField : 'curr_name',
116 emptyText : "Select currency",
117 fieldLabel : 'Currency',
118 forceSelection : true,
119 hiddenName : 'ipshead_curr_id',
121 loadingText : "Searching...",
123 name : 'ipshead_curr_id_curr_name',
125 qtip : "Select curr_symbol",
126 queryParam : 'query[curr_name]',
127 selectOnFocus : true,
128 tpl : '<div class="x-grid-cell-text x-btn button"><b>{curr_name}</b> </div>',
129 triggerAction : 'all',
131 valueField : 'curr_id',
137 sortInfo : { direction : 'ASC', field: 'id' },
139 beforeload : function (_self, o){
140 o.params = o.params || {};
148 url : baseURL + '/Roo/curr_symbol.php'
155 totalProperty : 'total',
156 fields : [{"name":"id","type":"int"},{"name":"curr_name","type":"string"}]
164 altFormats : 'Y-m-d',
165 fieldLabel : 'Effective',
167 name : 'ipshead_effective',
175 altFormats : 'Y-m-d',
176 fieldLabel : 'Expires',
178 name : 'ipshead_expires',
188 xtype: 'LayoutRegion',
196 click : function (_self, e)
207 click : function (_self, e)
212 //_this.dialog.el.mask("Saving");
213 _this.form.doAction("submit");