Apr 16, 2015, 11:05 AM
[CLOSED] How do you reference the shortcut from ShortcutContextMenu
I'm having trouble trying to reference the desktop module right clicked on when using ShortcutContextMenu. I want the user to have the ability to open the link in a new tab as opposed to a window. I've tried going through the item and event in the listener but they reference the menu which is a child of the desktop so I can't navigate to the shortcut. Any assistance would be appreciated.
Html.X().Desktop()
.ID("DesktopMain")
.Listeners(l =>
{
l.Ready.BroadcastOnBus = "App.Desktop.ready";
})
.DesktopConfig(
Html.X().DesktopConfig()
.Wallpaper("~/Content/wallpapers/blue.jpg")
.ShortcutDragSelector(true)
.ShortcutDefaults(defaults =>
{
defaults.IconCls = "x-default-shortcut";
})
.ShortcutContextMenu(
Html.X().Menu().ID("DesktopModuleContext").Items(
Html.X().MenuItem().Text("Open in New Tab").Listeners(x=>x.Click.Fn = "shortcutContextMenuClick")
)
)
)
Last edited by Daniil; Apr 17, 2015 at 11:21 AM.
Reason: [CLOSED]