Skip to content

iklymenko/oro-hotkeys

 
 

Repository files navigation

Atwix Hotkeys

Atwix Hotkeys extension provides an ability to use single key for accessing to different UI elements.

Base hotkeys are:

  • 's' - Open search dialog.
  • 'c' - Open shortcuts dialog.
  • 'r' - Return to home page.
  • 'f' - Open favourites tab.
  • 'h' - Open history tab.
  • 'm' - Open most viewed tab.
  • 'p' - Open pinbar tab.

Installation

Use standard Package Manager in Oro Platform to find and install the extension.

Or use as dependency in composer:

"require": {
        "atwix/hotkeys": "1.0",
    }

Custom hotkeys

You are able to map your own keys and maps by passing parameters to the hotkeysHandler() object. Just override src/Atwix/Bundle/HotkeysBundle/Resources/views/Js/hotkeys.js.twig and pass your own settings to the object.

Example: open user menu by pressing 'u' button

{% if true == isDesktopVersion() and true == oro_config_value('atwix_hotkeys.hotkeys_enabled') %}
<script type="text/javascript">
    require(['jquery', 'atwixhotkeys/js/hotkeys'], function($) {
        $(function() {
            var customKeys = {
                usermenu: ['85', '.user-menu .dropdown-toggle', 'click']
            }
            var oroHotkeys = new hotkeysHandler(customKeys);
        });
    });
</script>
{% endif %}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 48.2%
  • PHP 46.5%
  • HTML 5.3%