[CLOSED] How do you reference the shortcut from ShortcutContextMenu

  1. #1

    [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]
  2. #2
    Hi @AaronDev,

    Please use:
    item.parentMenu.module.shortcut
  3. #3
    Hi Daniil

    I missed module in parent menu. From this I was able to get the window and loader url to open in a new tab. Many thanks for the help!

Similar Threads

  1. Can we Remove Desktop Shortcut.
    By nagesh in forum 2.x Help
    Replies: 16
    Last Post: Jan 18, 2013, 1:50 PM
  2. creating shortcut dynamically
    By softlabsgroup.support in forum 1.x Help
    Replies: 0
    Last Post: Jun 06, 2012, 12:27 PM
  3. Creating Shortcut
    By softlabsgroup.support in forum 1.x Help
    Replies: 0
    Last Post: Jun 02, 2012, 6:30 AM
  4. Desktop Shortcut BUG on IE
    By joao.msdn in forum 1.x Help
    Replies: 8
    Last Post: Jun 27, 2011, 6:46 AM
  5. Shortcut in desktopwindow
    By Richardt in forum 1.x Help
    Replies: 0
    Last Post: Aug 23, 2009, 1:10 PM

Posting Permissions