diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-11-30 06:41:48 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-11-30 06:41:48 +0300 |
commit | af3a79c055bfe2c5778b5827ba3d165674315f4b (patch) | |
tree | a0e4432d5be6318209f968536dcaf1fa2494a86b /plugins/CoreHome/angularjs | |
parent | e80aeb9ccecc2f175176d8920d241a93de168920 (diff) |
Show shortcut help screen when pressing `?` (#12283)
* Adds help screen for shortcuts
* Dynamically create shortcut summary by using new js method piwikHelper.registerShortcut
* Update CHANGELOG.md
Diffstat (limited to 'plugins/CoreHome/angularjs')
-rw-r--r-- | plugins/CoreHome/angularjs/quick-access/quick-access.directive.js | 2 | ||||
-rw-r--r-- | plugins/CoreHome/angularjs/siteselector/siteselector.controller.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js index 7161883e75..47df2e68fe 100644 --- a/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js +++ b/plugins/CoreHome/angularjs/quick-access/quick-access.directive.js @@ -259,7 +259,7 @@ } }; - Mousetrap.bind('f', function(event) { + piwikHelper.registerShortcut('f', _pk_translate('CoreHome_ShortcutSearch'), function(event) { if (event.altKey) { return; } diff --git a/plugins/CoreHome/angularjs/siteselector/siteselector.controller.js b/plugins/CoreHome/angularjs/siteselector/siteselector.controller.js index 8974576246..56643c7804 100644 --- a/plugins/CoreHome/angularjs/siteselector/siteselector.controller.js +++ b/plugins/CoreHome/angularjs/siteselector/siteselector.controller.js @@ -38,7 +38,7 @@ '#' + piwik.helper.getQueryStringWithParametersModified(hash.substring(1), newParameters); }; - Mousetrap.bind('w', function(event) { + piwikHelper.registerShortcut('w', _pk_translate('CoreHome_ShortcutWebsiteSelector'), function(event) { if (event.altKey) { return; } |