Options
All
  • Public
  • Public/Protected
  • All
Menu

JMap.Application.User

You can manage everything related to user in JMap NG App here.

Index

Functions

addPopupMenuAction

  • addPopupMenuAction(action: JAppUserAction, index?: undefined | number): void
  • JMap.Application.User.addPopupMenuAction

    Adds an action to the JMap User menu (visible in the project selection panel).

    An action must set the "href" OR the "onCLick" parameters, but not both.

    Displaying the action's label in the UI The action's label will be translated by JMap NG translation engine if a JTranslationItem is passed, otherwise the simple string will be used. (see See JMap.Language.translate and JMap.Language.addBundle for more details on translations)

    example
    
    JMap.Application.User.addPopupMenuAction({
      id: "my-unique-id",
      icon: "fas fa-info-circle",
      label: {  key: "my.custom.menu.item.translation.key", bundleId: "myTranslationBundleId"}, // label can also be a simple string
      isHelp: true, // if true will be displayed in the JMap help menu
      onClick: () => window.open("https://link-to-my-documentation", "_blanck")
    }, 2)

    Parameters

    • action: JAppUserAction

      : the action to add

    • Optional index: undefined | number

      : will insert at a specific index in the menu. Start at 0. If index is not correct insert at the end

    Returns void

existsPopupMenuActionById

  • existsPopupMenuActionById(actionId: string): boolean
  • JMap.Application.User.existsPopupMenuActionById

    Returns true if an action menu exists for the given id, else false.

    throws

    if actionId is not a string (non empty)

    example
    
    // returns true if the action menu id="my-custom-action-menu" exists, else false
    JMap.Application.User.existsPopupMenuActionById("my-custom-action-menu")

    Parameters

    • actionId: string

      the action menu id

    Returns boolean

removePopupMenuActionById

  • removePopupMenuActionById(actionId: string): void
  • JMap.Application.User.removePopupMenuActionById

    Removes an existing action menu

    throws

    if actionId is not valid, or not found

    example
    
    // remove the action menu id="my-custom-action-menu"
    JMap.Application.User.removePopupMenuActionById("my-custom-action-menu")

    Parameters

    • actionId: string

      the action menu id

    Returns void