iolerp
16 Aug 2007, 7:40 PM
<div id="addItemDialog"></div>
<div id="addItemForm" style="margin-left:10px;margin-top:10px;margin-right:10px;margin-bottom:5px;display:none"></div>
function test(){
Ext.get('addItemForm').show();
if(!this.dialog){
this.dialog = new Ext.LayoutDialog('addItemDialog',{
modal:false,
width:600,
height:450,
shadow:true,
minWidth:500,
minHeight:350,
proxyDrag:true,
center:{
autoScroll:true,
animate:true
}
});
this.dialog.addKeyListener(27,this.dialog.hide,this.dialog);
this.dialog.addButton(OLERP_FINANCE_ITEM_SAVE,this.dialog.show,this.dialog);
this.dialog.addButton(OLERP_FINANCE_ITEM_CANCEL,this.dialog.hide,this.dialog);
}
if(!this.fs){
this.fs = new Ext.form.Form({
labelAlign:'right',
labelWidth:75,
method:'POST',
url:''
});
this.fs.fieldset(
{legend:OLERP_FINANCE_ITEM_FS_LEGEND},
new Ext.form.TextField({
fieldLabel:OLERP_FINANCE_ITEM_CODE,
width:150,
name:'item_code'
})
);
}
this.fs.end();
this.fs.render('addItemForm');
var layout = this.dialog.getLayout();
layout.beginUpdate();
layout.add('center',new Ext.ContentPanel('addItemForm'));
layout.endUpdate();
this.dialog.show();
}
I have a button use this function ,but when I run it ,the Dialog window can not be draggable,and the 'minize',and the 'close' button is disabled,and also just only I click the fieldLabel,the cursor appear,but when I click the textfield,the cursor doesn't appear,what's the problem?
thank you!!!
<div id="addItemForm" style="margin-left:10px;margin-top:10px;margin-right:10px;margin-bottom:5px;display:none"></div>
function test(){
Ext.get('addItemForm').show();
if(!this.dialog){
this.dialog = new Ext.LayoutDialog('addItemDialog',{
modal:false,
width:600,
height:450,
shadow:true,
minWidth:500,
minHeight:350,
proxyDrag:true,
center:{
autoScroll:true,
animate:true
}
});
this.dialog.addKeyListener(27,this.dialog.hide,this.dialog);
this.dialog.addButton(OLERP_FINANCE_ITEM_SAVE,this.dialog.show,this.dialog);
this.dialog.addButton(OLERP_FINANCE_ITEM_CANCEL,this.dialog.hide,this.dialog);
}
if(!this.fs){
this.fs = new Ext.form.Form({
labelAlign:'right',
labelWidth:75,
method:'POST',
url:''
});
this.fs.fieldset(
{legend:OLERP_FINANCE_ITEM_FS_LEGEND},
new Ext.form.TextField({
fieldLabel:OLERP_FINANCE_ITEM_CODE,
width:150,
name:'item_code'
})
);
}
this.fs.end();
this.fs.render('addItemForm');
var layout = this.dialog.getLayout();
layout.beginUpdate();
layout.add('center',new Ext.ContentPanel('addItemForm'));
layout.endUpdate();
this.dialog.show();
}
I have a button use this function ,but when I run it ,the Dialog window can not be draggable,and the 'minize',and the 'close' button is disabled,and also just only I click the fieldLabel,the cursor appear,but when I click the textfield,the cursor doesn't appear,what's the problem?
thank you!!!