summaryrefslogtreecommitdiffstats
path: root/client/components/activities/activities.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-10-31 10:27:20 +0100
committerMaxime Quandalle <maxime@quandalle.com>2015-10-31 12:49:58 +0100
commit2b134ff7a986eb97f8ec360321be284a7a8ea11e (patch)
tree0ff579909b402db5916b66ec7bc7469534881a15 /client/components/activities/activities.js
parent3507c6565bb16b5f45c6f269f7376902f8b1ff37 (diff)
parent41b23f88aea0f421226f92b081cdb1b61c64bde4 (diff)
downloadwekan-2b134ff7a986eb97f8ec360321be284a7a8ea11e.tar.gz
wekan-2b134ff7a986eb97f8ec360321be284a7a8ea11e.tar.bz2
wekan-2b134ff7a986eb97f8ec360321be284a7a8ea11e.zip
Merge branch 'devel' into minicard-editor
Conflicts: client/components/lists/listBody.js
Diffstat (limited to 'client/components/activities/activities.js')
-rw-r--r--client/components/activities/activities.js28
1 files changed, 23 insertions, 5 deletions
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index 5c5d8370..64e9865d 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -9,7 +9,7 @@ BlazeComponent.extendComponent({
// XXX Should we use ReactiveNumber?
this.page = new ReactiveVar(1);
this.loadNextPageLocked = false;
- const sidebar = this.componentParent(); // XXX for some reason not working
+ const sidebar = this.parentComponent(); // XXX for some reason not working
sidebar.callFirstWith(null, 'resetNextPeak');
this.autorun(() => {
const mode = this.data().mode;
@@ -55,11 +55,29 @@ BlazeComponent.extendComponent({
cardLink() {
const card = this.currentData().card();
return card && Blaze.toHTML(HTML.A({
- href: card.absoluteUrl(),
+ href: FlowRouter.path(card.absoluteUrl()),
'class': 'action-card',
}, card.title));
},
+ listLabel() {
+ return this.currentData().list().title;
+ },
+
+ sourceLink() {
+ const source = this.currentData().source;
+ if(source) {
+ if(source.url) {
+ return Blaze.toHTML(HTML.A({
+ href: source.url,
+ }, source.system));
+ } else {
+ return source.system;
+ }
+ }
+ return null;
+ },
+
memberLink() {
return Blaze.toHTMLWithData(Template.memberName, {
user: this.currentData().member(),
@@ -69,7 +87,7 @@ BlazeComponent.extendComponent({
attachmentLink() {
const attachment = this.currentData().attachment();
return attachment && Blaze.toHTML(HTML.A({
- href: attachment.url({ download: true }),
+ href: FlowRouter.path(attachment.url({ download: true })),
target: '_blank',
}, attachment.name()));
},
@@ -83,9 +101,9 @@ BlazeComponent.extendComponent({
},
'submit .js-edit-comment'(evt) {
evt.preventDefault();
- const commentText = this.currentComponent().getValue();
+ const commentText = this.currentComponent().getValue().trim();
const commentId = Template.parentData().commentId;
- if ($.trim(commentText)) {
+ if (commentText) {
CardComments.update(commentId, {
$set: {
text: commentText,