Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1347 posts 1608 karma points
    Oct 11, 2012 @ 10:44
    Gordon Saxby
    0

    Add new context menu item

    I have seen the code / video to add a new context menu ... however, I am not completely clear on how to add "real world" code for the menu item.

    I need to add code that will copy a node from one place to another and publish, etc.

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Oct 11, 2012 @ 18:37
    Dirk De Grave
    0

    All code will be initiated from a js function (set as JsFunctionName) which you'll need to add to your class that implements IAction. For example, to open a dialog from a context menu, add this code

            public string JsFunctionName
            {
                get { return startDialog();"; }
            }
            public string JsSource
            {
                get
                {
                    return @"function startDialog(){
                                UmbClientMgr.openModalWindow('dialogs/Dialog.aspx?nodeId=' + UmbClientMgr.mainTree().getActionNode().nodeId, 'title', true, 460, 250, 0, 0, '', '');
                            }";
                }
            } 

    Does that help?

     

    Cheers,

    /Dirk

     

     

  • Gordon Saxby 1347 posts 1608 karma points
    Oct 11, 2012 @ 22:41
    Gordon Saxby
    0

    Yes, I think so - doing it tomorrow, so I'll find out then ;-)

     

  • Gordon Saxby 1347 posts 1608 karma points
    Oct 12, 2012 @ 18:19
    Gordon Saxby
    0

    It worked! :-)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies