PDA

View Full Version : help with floating panel



vasion
2 Jun 2011, 11:31 AM
i want to have a panel with form for a registration form, but floating panel does not align and resize properly. what am i doing wrong?

var register = new Ext.Panel({
floating:true,
fullscreen:true,
centered:true,
layout:{
align:"stretch"
},
dockedItems:[
{
xtype:"toolbar",
docked:"top",
align:"right",
items:[
{xtype:"spacer"},
{ iconMask:true,
iconCls:"delete",
handler:function(){register.hide();}
}
]
}
],
items:[{
xtype:"form",
id:'registerform_form',
scroll:"vertical",
items:[{
xtype:"fieldset",
title:"???????????",
instructions:"????????? ??????? ?? ?????????????.",
defaults:{labelWidth:"50%"},
items:[
{
xtype:"textfield",
name:"email",
label:"??.????",
placeHolder:"[email protected]",
required:true,
useClearIcon:true
},
{
xtype:"textfield",
name:"username",
label:"??????????",
placeHolder:"????????????? ???",
required:true,
useClearIcon:true
},
{
xtype:"passwordfield",
name:"pass1",
label:"??????",
required:true,
useClearIcon:true,
placeHolder:"Sexy1990"
},
{
xtype:"passwordfield",
name:"pass2",
label:"????????",
required:true,
useClearIcon:true,
placeHolder:"Sexy1990"
}
]
},{
xtype:"button",
text:"?????????? ??",
margin:20,
handler:function(){
sendregform();
}
},{
xtype:"button",
text:"??????",
ui:"decline-round",
margin:20,
handler:function(){register.hide();}
}]
}

]
});

after that i call is with


register.show();

but when i do it, the panel is waaaaaay too big. it looks fine in Chrome, but awful in Iphone's Safari.