Addded new keyboard shortcut to edit the task description

This commit is contained in:
Frederic Guillot 2016-03-20 16:29:20 -04:00
parent 77c84410ec
commit 4c733eb715
4 changed files with 7 additions and 1 deletions

View File

@ -19,6 +19,7 @@
<h3><?= t('Task view') ?></h3>
<ul>
<li><?= t('Edit task') ?> = <strong>e</strong></li>
<li><?= t('Edit description') ?> = <strong>d</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>

View File

@ -23,6 +23,7 @@
<section
class="sidebar-container" id="task-view"
data-edit-url="<?= $this->url->href('taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
data-description-url="<?= $this->url->href('taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
data-subtask-url="<?= $this->url->href('subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
data-internal-link-url="<?= $this->url->href('TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
data-comment-url="<?= $this->url->href('comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,10 @@ Kanboard.Task.prototype.keyboardShortcuts = function() {
self.app.get("Popover").open(taskView.data("edit-url"));
});
Mousetrap.bind("d", function() {
self.app.get("Popover").open(taskView.data("description-url"));
});
Mousetrap.bind("c", function() {
self.app.get("Popover").open(taskView.data("comment-url"));
});