PDA

View Full Version : Do not hide the menu when clicked.



Radius-Service
12 Oct 2011, 2:04 AM
Hello

Can you please tell how to make sure that when you click on a menu item ('mAdmin'), which has a submenu ('btnCatalog'), menu (mAdmin) not to hide?

Thanks.




items:[
{
id: 'mAdmin',
text '?????????????????',
menu:[{
id: 'mAdminUser',
text: '?????????? ??????????????',
handler: fAdminUser,
},{
id: 'btnCatalog',
text: '????????? ???????????',
menu:[{
id: 'btnShowPermission',
text: '??????????',
handler: adminPermissions,
}]
}
]
}
]

Asken
12 Oct 2011, 2:21 AM
Try this:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.menu.Menu-cfg-ignoreParentClicks

Radius-Service
12 Oct 2011, 2:55 AM
Don't working.
Or am I doing wrong?



Ext.create('Ext.toolbar.Toolbar', {
id : 'main.panel.mainMenuBar',
dock : 'top',
height : 27,
items:[
{
id : 'cachedCount',
text : '?????????????????',
ignoreParentClicks: true,
menu:[{
id : 'mAdminUser',
text : '?????????? ??????????????',
handler : fAdminUser
},{
id : 'btnAdminRole',
text : '?????????? ???????',
handler : adminRole
},{
id : 'btnCatalog',
text : '????????? ???????????'
menu:[{
id : 'btnShowPermission',
text : '??????????',
handler : adminPermission
},{
id : 'btnShowGroups',
text : '??????',
handler : adminGroups
}]
}
]
}
]
});

evant
12 Oct 2011, 3:00 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.menu.Item-cfg-hideOnClick