PDA

View Full Version : Ext.util.CSS.swapStyleSheet and combo problem



evilized
27 Nov 2007, 8:35 AM
hi friends...


i've a problem with a form... when i change the theme "css style" for all the page, the combo is displayed of a way bad... like the screenshot...


i dont know why was this problem... :">

can anybody help me please...?

my code definition for the formPanel is like the follow:

[php]themes = new Ext.form.ComboBox({
typeAhead: true,
lazyRender:true,
triggerAction: 'all',
transform:'themes',
name:'theme',
emptyText:'User el tema por defecto',
fieldLabel:'Tema',
editable:false,
onSelect:onSelectTheme
});

form = new Ext.form.FormPanel({
url:'resources/backend/login.php?do=login',
method:'post',
autoHeight:true,
renderTo:'form-container',
defaultType:'textfield',
defaults:{width:190},
layout:'form',
buttonAlign:'left',
bodyStyle:'padding:5px 5px 0;background-color:transparent;border-width:0px;',
items:[
{
fieldLabel:'Usuario',
name:'user',
allowBlank:false,
vtype:'email'
},{
fieldLabel:'Contrase

evilized
29 Nov 2007, 2:06 PM
can anybody help me.... :(

tryanDLS
29 Nov 2007, 2:45 PM
What style sheet? You say you're doing something to swap the stylesheet, but you don't even show the code.

evilized
30 Nov 2007, 5:38 AM
What style sheet? You say you're doing something to swap the stylesheet, but you don't even show the code.

sorry, here is my code for the swap of style...


themes.on('select',function(cb,record,index){
Ext.util.CSS.swapStyleSheet(
'theme','ext-2.0/resources/css/xtheme-'+record.get('value')+'.css'
);

})


and in my html code, i've a link like...


<link media="theme" rel="stylesheet" type="text/css" href="ext-2.0/resources/css/xtheme-{$smarty.const.theme}.css" />


so, i'm changing the style sheet.....

:)