// Auto generated file - created by app.Builder.js- do not edit directly (at present!)
+Roo.namespace('Pman.Dialog');
+
Pman.Dialog.XtuplePriceList = {
dialog : false,
{
var _this = this;
this.dialog = Roo.factory({
- xtype: 'LayoutDialog',
- xns: Roo,
- closable : false,
- collapsible : false,
- height : 300,
+ center : {
+ '|xns' : 'Roo',
+ xtype : 'LayoutRegion',
+ xns : Roo
+ },
+ '|xns' : 'Roo',
modal : true,
- resizable : false,
+ collapsible : false,
title : "Edit / Create Price List",
+ xtype : 'LayoutDialog',
width : 400,
+ xns : Roo,
+ closable : false,
+ resizable : false,
+ height : 300,
+ buttons : [
+ {
+ '|xns' : 'Roo',
+ text : "Cancel",
+ xtype : 'Button',
+ xns : Roo,
+ listeners : {
+ click : function (_self, e)
+ {
+ _this.dialog.hide();
+ }
+ }
+ },
+{
+ '|xns' : 'Roo',
+ text : "Save",
+ xtype : 'Button',
+ xns : Roo,
+ listeners : {
+ click : function (_self, e)
+ {
+ // do some checks?
+
+
+ //_this.dialog.el.mask("Saving");
+ _this.form.doAction("submit");
+
+ }
+ }
+ }
+ ],
items : [
- {
- xtype: 'ContentPanel',
- xns: Roo,
+ {
+ '|xns' : 'Roo',
region : 'center',
+ xtype : 'ContentPanel',
+ xns : Roo,
items : [
- {
- xtype: 'Form',
- xns: Roo.form,
- listeners : {
- actioncomplete : function(_self,action)
- {
- if (action.type == 'setdata') {
- //_this.dialog.el.mask("Loading");
-
-
- if (_this.data.ipshead_id) {
- this.load({ method: 'GET', params: { '_id' : _this.data.ipshead_id }});
- return;
- }
- this.setValues({
- ipshead_effective : new Date(1970,1,1),
- ipshead_expires :new Date(2100,1,1)
-
- });
-
-
- return;
- }
- if (action.type == 'load') {
- _this.dialog.el.unmask();
- return;
- }
- if (action.type =='submit') {
-
- _this.dialog.el.unmask();
- _this.dialog.hide();
-
- if (_this.callback) {
- _this.callback.call(_this, _this.form.getValues());
- }
- _this.form.reset();
- return;
- }
- },
- rendered : function (form)
- {
- _this.form= form;
- }
- },
+ {
+ '|xns' : 'Roo.form',
+ url : baseURL + '/Roo/ipshead.php',
method : 'POST',
+ xtype : 'Form',
style : 'margin:10px;',
- url : baseURL + '/Roo/ipshead.php',
+ xns : Roo.form,
+ listeners : {
+ actioncomplete : function(_self,action)
+ {
+ if (action.type == 'setdata') {
+ //_this.dialog.el.mask("Loading");
+
+
+ if (_this.data.ipshead_id) {
+ this.load({ method: 'GET', params: { '_id' : _this.data.ipshead_id }});
+ return;
+ }
+ this.setValues({
+ ipshead_effective : new Date(1970,1,1),
+ ipshead_expires :new Date(2100,1,1)
+
+ });
+
+
+ return;
+ }
+ if (action.type == 'load') {
+ _this.dialog.el.unmask();
+ return;
+ }
+ if (action.type =='submit') {
+
+ _this.dialog.el.unmask();
+ _this.dialog.hide();
+
+ if (_this.callback) {
+ _this.callback.call(_this, _this.form.getValues());
+ }
+ _this.form.reset();
+ return;
+ }
+ },
+ rendered : function (form)
+ {
+ _this.form= form;
+ }
+ },
items : [
- {
- xtype: 'TextField',
- xns: Roo.form,
- allowBlank : false,
+ {
+ '|xns' : 'Roo.form',
fieldLabel : 'Name',
- name : 'ipshead_name',
- width : 250
+ xtype : 'TextField',
+ allowBlank : false,
+ width : 250,
+ xns : Roo.form,
+ name : 'ipshead_name'
},
- {
- xtype: 'TextArea',
- xns: Roo.form,
+ {
+ '|xns' : 'Roo.form',
fieldLabel : 'Description',
- height : 80,
+ xtype : 'TextArea',
+ width : 250,
+ xns : Roo.form,
name : 'ipshead_descrip',
- width : 250
+ height : 80
},
- {
- xtype: 'ComboBox',
- xns: Roo.form,
- allowBlank : false,
- displayField : 'curr_name',
- editable : false,
- emptyText : "Select currency",
- fieldLabel : 'Currency',
- forceSelection : true,
- hiddenName : 'ipshead_curr_id',
- listWidth : 150,
- loadingText : "Searching...",
- minChars : 2,
- name : 'ipshead_curr_id_curr_name',
- pageSize : 20,
- qtip : "Select curr_symbol",
- queryParam : 'query[curr_name]',
- selectOnFocus : true,
- tpl : '<div class="x-grid-cell-text x-btn button"><b>{curr_name}</b> </div>',
- triggerAction : 'all',
- typeAhead : true,
- valueField : 'curr_id',
- width : 150,
+ {
store : {
- xtype: 'Store',
- xns: Roo.data,
- remoteSort : true,
- sortInfo : { direction : 'ASC', field: 'id' },
- listeners : {
- beforeload : function (_self, o){
- o.params = o.params || {};
- // set more here
- }
- },
proxy : {
- xtype: 'HttpProxy',
- xns: Roo.data,
+ '|xns' : 'Roo.data',
+ url : baseURL + '/Roo/curr_symbol.php',
+ xtype : 'HttpProxy',
method : 'GET',
- url : baseURL + '/Roo/curr_symbol.php'
+ xns : Roo.data
},
reader : {
- xtype: 'JsonReader',
- xns: Roo.data,
+ '|xns' : 'Roo.data',
id : 'id',
root : 'data',
- totalProperty : 'total',
- fields : [{"name":"id","type":"int"},{"name":"curr_name","type":"string"}]
- }
- }
- },
- {
- xtype: 'DateField',
- xns: Roo.form,
+ xtype : 'JsonReader',
+ xns : Roo.data,
+ fields : [{"name":"id","type":"int"},{"name":"curr_name","type":"string"}],
+ totalProperty : 'total'
+ },
+ '|xns' : 'Roo.data',
+ xtype : 'Store',
+ remoteSort : true,
+ xns : Roo.data,
+ sortInfo : { direction : 'ASC', field: 'id' },
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+ // set more here
+ }
+ },
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.form',
+ listWidth : 250,
+ triggerAction : 'all',
+ fieldLabel : 'Currency',
+ forceSelection : true,
+ selectOnFocus : true,
+ pageSize : 20,
+ displayField : 'curr_name',
+ emptyText : "Select currency",
+ hiddenName : 'ipshead_curr_id',
+ minChars : 2,
+ valueField : 'curr_id',
+ xtype : 'ComboBox',
allowBlank : false,
- altFormats : 'Y-m-d',
+ typeAhead : true,
+ editable : false,
+ width : 250,
+ xns : Roo.form,
+ name : 'ipshead_curr_id_curr_name',
+ qtip : "Select curr_symbol",
+ queryParam : 'query[curr_name]',
+ tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>',
+ loadingText : "Searching...",
+ items : [
+
+ ]
+
+ },
+ {
+ '|xns' : 'Roo.form',
fieldLabel : 'Effective',
format : 'd/M/Y',
- name : 'ipshead_effective',
- width : 150,
- useIso : true
- },
- {
- xtype: 'DateField',
- xns: Roo.form,
+ xtype : 'DateField',
+ useIso : true,
allowBlank : false,
+ width : 250,
+ xns : Roo.form,
altFormats : 'Y-m-d',
+ name : 'ipshead_effective'
+ },
+ {
+ '|xns' : 'Roo.form',
fieldLabel : 'Expires',
format : 'd/M/Y',
- name : 'ipshead_expires',
- width : 150,
- useIso : true
+ xtype : 'DateField',
+ useIso : true,
+ allowBlank : false,
+ width : 250,
+ xns : Roo.form,
+ altFormats : 'Y-m-d',
+ name : 'ipshead_expires'
+ },
+ {
+ '|xns' : 'Roo.form',
+ name : 'ipshead_id',
+ xtype : 'Hidden',
+ xns : Roo.form
}
]
+
}
]
- }
- ],
- center : {
- xtype: 'LayoutRegion',
- xns: Roo
- },
- buttons : [
- {
- xtype: 'Button',
- xns: Roo,
- listeners : {
- click : function (_self, e)
- {
- _this.dialog.hide();
- }
- },
- text : "Cancel"
- },
- {
- xtype: 'Button',
- xns: Roo,
- listeners : {
- click : function (_self, e)
- {
- // do some checks?
-
-
- //_this.dialog.el.mask("Saving");
- _this.form.doAction("submit");
-
- }
- },
- text : "Save"
+
}
]
+
});
}
};