Reputation: 2017
I'd like this effect.
I wouldn't like Take a nap
show as a non-leaf node with 10 minutes
and 20 minutes
show as leaf child nodes of Take a nap
node.
I try with code
children: [{
text: 'Take a nap <input type="radio" checked/>10 minutes<input type="radio"/>20 minutes',
leaf: true,
},{......}]
It can show as my expection. But can not work since the radio button can't be clicked.
And I don't like implement with menu like this:
var menu1 = new Ext.menu.Menu({
items: [
'<b class="menu-title">Choose Time</b>',
{
text: '10 minutes',
checked: true,
group: 'time'
}, {
text: '20 minutes',
checked: false,
group: 'time'
}]
});
children: [{
text: 'Go jogging',
leaf: true,
listeners: {
'click': function(node,event) {
x = event.browserEvent.clientX;
y = event.browserEvent.clientY;
menu1.showAt([x, y]);
}
}
}
Can extjs do this?
Demo In jsfiddle, for convenience.
Upvotes: 1
Views: 138