Add keyboard shortcut for project overview

This commit is contained in:
Frederic Guillot 2016-02-16 21:26:26 -05:00
parent 8936792f6f
commit 4961805e0f
4 changed files with 13 additions and 2 deletions

View File

@ -54,6 +54,7 @@
<div class="listing">
<h3><?= t('Board/Calendar/List view') ?></h3>
<ul>
<li><?= t('Switch to the project overview') ?> = <strong>v o</strong></li>
<li><?= t('Switch to the board view') ?> = <strong>v b</strong></li>
<li><?= t('Switch to the calendar view') ?> = <strong>v c</strong></li>
<li><?= t('Switch to the list view') ?> = <strong>v l</strong></li>

File diff suppressed because one or more lines are too long

View File

@ -40,6 +40,15 @@ Search.prototype.listen = function() {
Search.prototype.keyboardShortcuts = function() {
var self = this;
// Switch view mode for projects: go to the overview page
Mousetrap.bind("v o", function(e) {
var link = $(".view-overview");
if (link.length) {
window.location = link.attr('href');
}
});
// Switch view mode for projects: go to the board
Mousetrap.bind("v b", function(e) {
var link = $(".view-board");

View File

@ -6,6 +6,7 @@ Keyboard shortcuts availability depends of the page you are presently.
Project views (Board, Calendar, List, Gantt)
--------------------------------------------
- Switch to the project overview = **v o**
- Switch to the board view = **v b** (press on **v** then **b**)
- Switch to the calendar view = **v c**
- Switch to the list view = **v l**
@ -25,4 +26,4 @@ Application
- Go to the search box = **f**
- Reset the search box = **r**
- Close dialog box = **ESC**
- Submit form = **CTRL+ENTER** or **⌘+ENTER**
- Submit form = **CTRL+ENTER** or **⌘+ENTER**