summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/subtasks.jade1
-rw-r--r--client/components/cards/subtasks.js11
-rw-r--r--client/components/cards/subtasks.styl3
3 files changed, 15 insertions, 0 deletions
diff --git a/client/components/cards/subtasks.jade b/client/components/cards/subtasks.jade
index 5bf6c7ce..b0ef2f33 100644
--- a/client/components/cards/subtasks.jade
+++ b/client/components/cards/subtasks.jade
@@ -24,6 +24,7 @@ template(name="subtaskDetail")
else
.subtask-title
span
+ a.js-view-subtask(title="{{ subtask.title }}") {{_ "view-it"}}
if canModifyCard
a.js-delete-subtask.toggle-delete-subtask-dialog {{_ "delete"}}...
diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js
index 9a6666a3..087824f7 100644
--- a/client/components/cards/subtasks.js
+++ b/client/components/cards/subtasks.js
@@ -88,6 +88,17 @@ BlazeComponent.extendComponent({
}
this.toggleDeleteDialog.set(!this.toggleDeleteDialog.get());
},
+ 'click .js-view-subtask'(event) {
+ if($(event.target).hasClass('js-view-subtask')){
+ const subtask = this.currentData().subtask;
+ const board = subtask.board();
+ FlowRouter.go('card', {
+ boardId: board._id,
+ slug: board.slug,
+ cardId: subtask._id,
+ });
+ }
+ },
};
return [{
diff --git a/client/components/cards/subtasks.styl b/client/components/cards/subtasks.styl
index 5bb2d4bd..c2f09aa1 100644
--- a/client/components/cards/subtasks.styl
+++ b/client/components/cards/subtasks.styl
@@ -37,7 +37,10 @@ textarea.js-add-subtask-item, textarea.js-edit-subtask-item
.js-delete-subtask
@extends .delete-text
+ margin: 0 0.5em
+ .js-view-subtask
+ @extends .delete-text
.js-confirm-subtask-delete
background-color: darken(white, 3%)