I'm using the application menu to display menu options to create certain items in my application. Based on the user's role I'm hiding certain menu options. Here's what it looks like:
New -> User (Get's hidden when role doesn't have authority)
-> Role (Get's hidden when role doesn't have authority)
-> Item 1
-> Item 2
The problem is when using the OnClientApplicationMenuItemClicking event and the first two items are hidden server side and the user clicks the "Item 1" menu item all of the client side functions think "Item 1" is actually "User".
function OnRibbonApplicationMenuClicking(sender, eventArgs) {
// Get the attributes for the button that was clicked
var selectedButton = eventArgs.get_item();
}
"selectedButton" ends up being the "User" menu item instead of the "Item 1" menu item.
New -> User (Get's hidden when role doesn't have authority)
-> Role (Get's hidden when role doesn't have authority)
-> Item 1
-> Item 2
The problem is when using the OnClientApplicationMenuItemClicking event and the first two items are hidden server side and the user clicks the "Item 1" menu item all of the client side functions think "Item 1" is actually "User".
function OnRibbonApplicationMenuClicking(sender, eventArgs) {
// Get the attributes for the button that was clicked
var selectedButton = eventArgs.get_item();
}
"selectedButton" ends up being the "User" menu item instead of the "Item 1" menu item.