summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicu Tofan <nicu.tofan@gmail.com>2018-06-24 10:44:09 +0300
committerNicu Tofan <nicu.tofan@gmail.com>2018-06-26 14:32:50 +0300
commit989b026b33508feaa6ba806a624b95a93298327c (patch)
tree8227d83eb29a33ae7a05b21937fc18317594d1f2
parent4ac6a507cdd3e7a4610c8961e0a9f76f945a5e6d (diff)
downloadwekan-989b026b33508feaa6ba806a624b95a93298327c.tar.gz
wekan-989b026b33508feaa6ba806a624b95a93298327c.tar.bz2
wekan-989b026b33508feaa6ba806a624b95a93298327c.zip
Can now navigate to subtask
-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%)