Review main Merged

76595[FEATURE] Make context menu trigger configurable

Benjamin Kott CR +2 V +2 Hard +337 −62 updated 11/15/22, 13:46

Commit message

The context menu JavaScript API was adapted to also support opening
the menu through the "contextmenu" event type (right click) only.
Configuration for the context menu was streamlined and now reflects
its purpose. The trigger can now be set to "click" or "contextmenu".

Before:
    class="t3js-contextmenutrigger"
    data-table="pages"
    data-uid="10"
    data-context="tree"

After:
    data-contextmenu-trigger="click"
    data-contextmenu-table="pages"
    data-contextmenu-uid="10"
    data-contextmenu-context="tree"

New options:
data-contextmenu-trigger:
    click:
        Opens the contextmenu click and contextmenu
    contextmenu:
        Opens the contextmenu only on contextmenu

Examples:

    <a href="#"
        data-contextmenu-trigger="click"
        data-contextmenu-table="pages"
        data-contextmenu-uid="10"
    >
    Click and Contextmenu
    </a>

    <a href="#"
        data-contextmenu-trigger="contextmenu"
        data-contextmenu-table="pages"
        data-contextmenu-uid="10"
    >
    Contextmenu only
    </a>

Legacy configuration with `.t3js-contextmenutrigger` is still
supported to avoid migration issues, but is now considered
deprecated and will be removed with TYPO3 v13.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 25

Show 5 more files