Charlyva
12-28-2007, 07:33 PM
Hi. I've created a RadioGroup and added a style-rule by the cls-config. Don't know why, but the style do not adapt on my radiobuttons. :( Forumsearch brought no further information for me. sad to say.
I guess, thats a simple thing. I would be truly grateful, if you look at my code and give me a hint whats going wrong.
Ext.onReady(function(){...
//---------WESTBOX - Im Norden steht die Filiale und der Modus, im Süden die Actions---
//erstellen einer Radiogroup, in der festgelegt ist, welche Aktion auf die Grid ausgeübt werden soll.
var rdienst = new Ext.form.Radio({
id:'dienst-planen',
inputValue:'d',
xtype:'radio',
checked:true,
boxLabel:'Dienst',
name:'menugroup',
cls:'radiobox'
});
var rkrank = new Ext.form.Radio({
id:'krankenstand',
inputValue:'k',
cls:'radiobox',
xtype:'radio',
boxLabel:'Krankenstand',
name:'menugroup'
});
var rurlaub = new Ext.form.Radio({
id:'urlaub',
inputValue:'u',
cls:'radiobox',
xtype:'radio',
boxLabel:'Urlaub',
name:'menugroup'
});
var rseminar = new Ext.form.Radio({
id:'seminar',
inputValue:'s',
cls:'radiobox',
xtype:'radio',
boxLabel:'Seminar',
name:'menugroup'
});
var rfeiert = new Ext.form.Radio({
id:'feiertag',
inputValue:'f',
cls:'radiobox',
xtype:'radio',
boxLabel:'Feiertag',
name:'menugroup'
});
var rtagneu = new Ext.form.Radio({
id:'tag-neu',
inputValue:'t',
cls:'radiobox',
xtype:'radio',
boxLabel:'Tag neu',
name:'menugroup'
});
var rloesch = new Ext.form.Radio({
id:'loeschen',
inputValue:'l',
cls:'radiobox',
xtype:'radio',
boxLabel:'Löschen',
name:'menugroup'
});
//Der Button im Westen, der die ausgewählte Aktion in den Radiobuttons auf den markierten Teil der Grid anwendet.
var buttonplan = new Ext.Button({
minWidth: 100,
cls:'westbutton',
handler: function(){Ext.Msg.alert('Click','Sie haben auf "Planen" gedrückt.');},
text:'Planen...'
});
//Der Container für den Actionbereich (Radiogroup + Button) im Westen
var actions = new Ext.Panel({
region:'center',
title:'Actions',
border:false,
items:[rdienst,rkrank,rurlaub,rseminar,rfeiert,rtagneu,rl oesch,buttonplan]
});
}
CSS:
.radiobox {
margin:8;
padding:0;
font-size:10pt;
vertical-align: middle;
}
.westbutton {
margin:10;
font-size:10pt;
padding:0;
}
Look at this. No margins defined...
http://pep.rockt.it
Greets,
Mike
PS: I've just recognised, that the checkbox with the "checked:true" config is not checked, but the last one is instead. Highlighted it blue.
I guess, thats a simple thing. I would be truly grateful, if you look at my code and give me a hint whats going wrong.
Ext.onReady(function(){...
//---------WESTBOX - Im Norden steht die Filiale und der Modus, im Süden die Actions---
//erstellen einer Radiogroup, in der festgelegt ist, welche Aktion auf die Grid ausgeübt werden soll.
var rdienst = new Ext.form.Radio({
id:'dienst-planen',
inputValue:'d',
xtype:'radio',
checked:true,
boxLabel:'Dienst',
name:'menugroup',
cls:'radiobox'
});
var rkrank = new Ext.form.Radio({
id:'krankenstand',
inputValue:'k',
cls:'radiobox',
xtype:'radio',
boxLabel:'Krankenstand',
name:'menugroup'
});
var rurlaub = new Ext.form.Radio({
id:'urlaub',
inputValue:'u',
cls:'radiobox',
xtype:'radio',
boxLabel:'Urlaub',
name:'menugroup'
});
var rseminar = new Ext.form.Radio({
id:'seminar',
inputValue:'s',
cls:'radiobox',
xtype:'radio',
boxLabel:'Seminar',
name:'menugroup'
});
var rfeiert = new Ext.form.Radio({
id:'feiertag',
inputValue:'f',
cls:'radiobox',
xtype:'radio',
boxLabel:'Feiertag',
name:'menugroup'
});
var rtagneu = new Ext.form.Radio({
id:'tag-neu',
inputValue:'t',
cls:'radiobox',
xtype:'radio',
boxLabel:'Tag neu',
name:'menugroup'
});
var rloesch = new Ext.form.Radio({
id:'loeschen',
inputValue:'l',
cls:'radiobox',
xtype:'radio',
boxLabel:'Löschen',
name:'menugroup'
});
//Der Button im Westen, der die ausgewählte Aktion in den Radiobuttons auf den markierten Teil der Grid anwendet.
var buttonplan = new Ext.Button({
minWidth: 100,
cls:'westbutton',
handler: function(){Ext.Msg.alert('Click','Sie haben auf "Planen" gedrückt.');},
text:'Planen...'
});
//Der Container für den Actionbereich (Radiogroup + Button) im Westen
var actions = new Ext.Panel({
region:'center',
title:'Actions',
border:false,
items:[rdienst,rkrank,rurlaub,rseminar,rfeiert,rtagneu,rl oesch,buttonplan]
});
}
CSS:
.radiobox {
margin:8;
padding:0;
font-size:10pt;
vertical-align: middle;
}
.westbutton {
margin:10;
font-size:10pt;
padding:0;
}
Look at this. No margins defined...
http://pep.rockt.it
Greets,
Mike
PS: I've just recognised, that the checkbox with the "checked:true" config is not checked, but the last one is instead. Highlighted it blue.