Added "?" to display list of keyboard shortcuts

This commit is contained in:
Frederic Guillot 2016-03-11 23:01:38 -05:00
parent 4f54a547fa
commit 241ca53e47
9 changed files with 54 additions and 35 deletions

View File

@ -3,6 +3,7 @@ Version 1.0.27 (unreleased)
Improvements:
* Added "?" to display list of keyboard shortcuts
* Added new keyboard shortcuts for task view
* Always display project name and task title in task views
* Improve automatic action creation

View File

@ -54,4 +54,12 @@ class Doc extends Base
$this->response->html($this->helper->layout->app('doc/show', $this->readFile($filename)));
}
/**
* Display keyboard shortcut
*/
public function shortcuts()
{
$this->response->html($this->template->render('config/keyboard_shortcuts'));
}
}

View File

@ -48,40 +48,7 @@
</ul>
</div>
<div class="page-header">
<h2><?= t('Keyboard shortcuts') ?></h2>
</div>
<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>
<li><?= t('Switch to the Gantt chart view') ?> = <strong>v g</strong></li>
</ul>
<h3><?= t('Board view') ?></h3>
<ul>
<li><?= t('New task') ?> = <strong>n</strong></li>
<li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li>
<li><?= t('Compact/wide view') ?> = <strong>c</strong></li>
</ul>
<h3><?= t('Task view') ?></h3>
<ul>
<li><?= t('Edit task') ?> = <strong>e</strong></li>
<li><?= t('New subtask') ?> = <strong>s</strong></li>
<li><?= t('New comment') ?> = <strong>c</strong></li>
<li><?= t('New internal link') ?> = <strong>l</strong></li>
</ul>
<h3><?= t('Application') ?></h3>
<ul>
<li><?= t('Open board switcher') ?> = <strong>b</strong></li>
<li><?= t('Go to the search/filter box') ?> = <strong>f</strong></li>
<li><?= t('Reset the search/filter box') ?> = <strong>r</strong></li>
<li><?= t('Close dialog box') ?> = <strong>ESC</strong></li>
<li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li>
</ul>
</div>
<?= $this->render('config/keyboard_shortcuts') ?>
<div class="page-header">
<h2><?= t('License') ?></h2>

View File

@ -0,0 +1,35 @@
<div class="page-header">
<h2><?= t('Keyboard shortcuts') ?></h2>
</div>
<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>
<li><?= t('Switch to the Gantt chart view') ?> = <strong>v g</strong></li>
</ul>
<h3><?= t('Board view') ?></h3>
<ul>
<li><?= t('New task') ?> = <strong>n</strong></li>
<li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li>
<li><?= t('Compact/wide view') ?> = <strong>c</strong></li>
</ul>
<h3><?= t('Task view') ?></h3>
<ul>
<li><?= t('Edit task') ?> = <strong>e</strong></li>
<li><?= t('New subtask') ?> = <strong>s</strong></li>
<li><?= t('New comment') ?> = <strong>c</strong></li>
<li><?= t('New internal link') ?> = <strong>l</strong></li>
</ul>
<h3><?= t('Application') ?></h3>
<ul>
<li><?= t('Display list of keyboard shortcuts') ?> = <strong>?</strong></li>
<li><?= t('Open board switcher') ?> = <strong>b</strong></li>
<li><?= t('Go to the search/filter box') ?> = <strong>f</strong></li>
<li><?= t('Reset the search/filter box') ?> = <strong>r</strong></li>
<li><?= t('Close dialog box') ?> = <strong>ESC</strong></li>
<li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li>
</ul>
</div>

View File

@ -37,6 +37,7 @@
<body data-status-url="<?= $this->url->href('app', 'status') ?>"
data-login-url="<?= $this->url->href('auth', 'login') ?>"
data-markdown-preview-url="<?= $this->url->href('TaskHelper', 'preview') ?>"
data-keyboard-shortcut-url="<?= $this->url->href('Doc', 'shortcuts') ?>"
data-timezone="<?= $this->app->getTimezone() ?>"
data-js-lang="<?= $this->app->jsLang() ?>">

File diff suppressed because one or more lines are too long

View File

@ -86,6 +86,11 @@ App.prototype.keyboardShortcuts = function() {
self.popover.close();
self.dropdown.close();
});
// Show keyboard shortcut
Mousetrap.bind("?", function() {
self.popover.open($("body").data("keyboard-shortcut-url"));
});
};
App.prototype.checkSession = function() {

View File

@ -29,6 +29,7 @@ Vue détaillée d'une tâche
Application
-----------
- Afficher la liste des raccourcis clavier = **?**
- Ouvrir le changement de tableau = **b**
- Aller au moteur de recherche = **f**
- Restaurer la boîte de recherche = **r**

View File

@ -30,6 +30,7 @@ Task view
Application
-----------
- Display list of keyboard shortcuts = **?**
- Open board switcher = **b**
- Go to the search box = **f**
- Reset the search box = **r**