From a78debc461944f55de246db15a1dd29353dec4ae Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 8 Oct 2015 23:25:04 +0200 Subject: Support app deployment under a path prefix Fixes #133 --- client/components/activities/activities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/components/activities') diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index 5c5d8370..9a1435ef 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -55,7 +55,7 @@ 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)); }, @@ -69,7 +69,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())); }, -- cgit v1.2.3-1-g7c22 From 7d57ce896baeac74498e8b76b5812ceb6df8b950 Mon Sep 17 00:00:00 2001 From: Xavier Priour Date: Wed, 14 Oct 2015 19:54:40 +0200 Subject: Import single card: create an 'importCard' activity entry --- client/components/activities/activities.jade | 5 +++++ client/components/activities/activities.js | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'client/components/activities') diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade index 85b1276e..c611ad75 100644 --- a/client/components/activities/activities.jade +++ b/client/components/activities/activities.jade @@ -26,6 +26,9 @@ template(name="boardActivities") if($eq activityType 'createCard') | {{{_ 'activity-added' cardLink boardLabel}}}. + if($eq activityType 'importCard') + | {{{_ 'activity-imported' cardLink boardLabel sourceLink}}}. + if($eq activityType 'archivedCard') | {{{_ 'activity-archived' cardLink}}}. @@ -72,6 +75,8 @@ template(name="cardActivities") +memberName(user=user) if($eq activityType 'createCard') | {{_ 'activity-added' cardLabel list.title}}. + if($eq activityType 'importCard') + | {{{_ 'activity-imported' cardLabel list.title sourceLink}}}. if($eq activityType 'joinMember') if($eq currentUser._id member._id) | {{_ 'activity-joined' cardLabel}}. diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index 9a1435ef..b80493f7 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -60,6 +60,13 @@ BlazeComponent.extendComponent({ }, card.title)); }, + sourceLink() { + const source = this.currentData().source; + return source && Blaze.toHTML(HTML.A({ + href: source.url, + }, source.system)); + }, + memberLink() { return Blaze.toHTMLWithData(Template.memberName, { user: this.currentData().member(), -- cgit v1.2.3-1-g7c22 From 4540bd36c4b07080ea5d29f0fb31bb20e637c2d5 Mon Sep 17 00:00:00 2001 From: Xavier Priour Date: Mon, 19 Oct 2015 00:59:50 +0200 Subject: Import board: import comments and log activities --- client/components/activities/activities.jade | 56 +++++++++++++++------------- client/components/activities/activities.js | 17 +++++++-- 2 files changed, 45 insertions(+), 28 deletions(-) (limited to 'client/components/activities') diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade index c611ad75..28a9f9c9 100644 --- a/client/components/activities/activities.jade +++ b/client/components/activities/activities.jade @@ -14,41 +14,56 @@ template(name="boardActivities") p.activity-desc +memberName(user=user) - if($eq activityType 'createBoard') - | {{_ 'activity-created' boardLabel}}. + if($eq activityType 'addAttachment') + | {{{_ 'activity-attached' attachmentLink cardLink}}}. - if($eq activityType 'createList') - | {{_ 'activity-added' list.title boardLabel}}. + if($eq activityType 'addBoardMember') + | {{{_ 'activity-added' memberLink boardLabel}}}. + + if($eq activityType 'addComment') + | {{{_ 'activity-on' cardLink}}} + a.activity-comment(href="{{ card.absoluteUrl }}") + +viewer + = comment.text + + if($eq activityType 'archivedCard') + | {{{_ 'activity-archived' cardLink}}}. if($eq activityType 'archivedList') | {{_ 'activity-archived' list.title}}. + if($eq activityType 'createBoard') + | {{_ 'activity-created' boardLabel}}. + if($eq activityType 'createCard') | {{{_ 'activity-added' cardLink boardLabel}}}. + if($eq activityType 'createList') + | {{_ 'activity-added' list.title boardLabel}}. + + if($eq activityType 'importBoard') + | {{{_ 'activity-imported-board' boardLabel sourceLink}}}. + if($eq activityType 'importCard') | {{{_ 'activity-imported' cardLink boardLabel sourceLink}}}. - if($eq activityType 'archivedCard') - | {{{_ 'activity-archived' cardLink}}}. + if($eq activityType 'importList') + | {{{_ 'activity-imported' listLabel boardLabel sourceLink}}}. - if($eq activityType 'restoredCard') - | {{{_ 'activity-sent' cardLink boardLabel}}}. + if($eq activityType 'joinMember') + if($eq currentUser._id member._id) + | {{{_ 'activity-joined' cardLink}}}. + else + | {{{_ 'activity-added' memberLink cardLink}}}. if($eq activityType 'moveCard') | {{{_ 'activity-moved' cardLink oldList.title list.title}}}. - if($eq activityType 'addBoardMember') - | {{{_ 'activity-added' memberLink boardLabel}}}. - if($eq activityType 'removeBoardMember') | {{{_ 'activity-excluded' memberLink boardLabel}}}. - if($eq activityType 'joinMember') - if($eq currentUser._id member._id) - | {{{_ 'activity-joined' cardLink}}}. - else - | {{{_ 'activity-added' memberLink cardLink}}}. + if($eq activityType 'restoredCard') + | {{{_ 'activity-sent' cardLink boardLabel}}}. if($eq activityType 'unjoinMember') if($eq currentUser._id member._id) @@ -56,15 +71,6 @@ template(name="boardActivities") else | {{{_ 'activity-removed' memberLink cardLink}}}. - if($eq activityType 'addComment') - | {{{_ 'activity-on' cardLink}}} - a.activity-comment(href="{{ card.absoluteUrl }}") - +viewer - = comment.text - - if($eq activityType 'addAttachment') - | {{{_ 'activity-attached' attachmentLink cardLink}}}. - span.activity-meta {{ moment createdAt }} template(name="cardActivities") diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index b80493f7..b25c0ca8 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -60,11 +60,22 @@ BlazeComponent.extendComponent({ }, card.title)); }, + listLabel() { + return this.currentData().list().title; + }, + sourceLink() { const source = this.currentData().source; - return source && Blaze.toHTML(HTML.A({ - href: source.url, - }, source.system)); + if(source) { + if(source.url) { + return Blaze.toHTML(HTML.A({ + href: source.url, + }, source.system)); + } else { + return source.system; + } + } + return null; }, memberLink() { -- cgit v1.2.3-1-g7c22 From c6b12dc5ada1b37d759796fefe0dbc5b327f130c Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 21 Oct 2015 04:34:44 +0200 Subject: Upgrade peerlibrary:blaze-components to v0.14 This change includes method renames and others UI related packages updates. --- client/components/activities/activities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/activities') diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index b25c0ca8..a491c2e8 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; -- cgit v1.2.3-1-g7c22 From 31b60d82fcae64a844805a2a76a0af25fb9c16c2 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Fri, 23 Oct 2015 16:56:55 +0200 Subject: Upgrade Meteor to 1.2.1-rc4 This version includes a more complete selection of ES2015 polyfills that I started used across the code base, for instance by replacing `$.trim(str)` by `str.trim()`. --- client/components/activities/activities.js | 4 ++-- client/components/activities/comments.js | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'client/components/activities') diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index a491c2e8..64e9865d 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -101,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, diff --git a/client/components/activities/comments.js b/client/components/activities/comments.js index 08401caa..f9bbcff8 100644 --- a/client/components/activities/comments.js +++ b/client/components/activities/comments.js @@ -23,12 +23,13 @@ BlazeComponent.extendComponent({ commentFormIsOpen.set(true); }, 'submit .js-new-comment-form'(evt) { - const input = this.getInput(); - if ($.trim(input.val())) { + const input = this.getInput() + const text = input.val().trim(); + if (text) { CardComments.insert({ + text, boardId: this.currentData().boardId, cardId: this.currentData()._id, - text: input.val(), }); resetCommentInput(input); Tracker.flush(); @@ -72,8 +73,9 @@ EscapeActions.register('inlinedForm', docId: Session.get('currentCard'), }; const commentInput = $('.js-new-comment-input'); - if ($.trim(commentInput.val())) { - UnsavedEdits.set(draftKey, commentInput.val()); + const draft = commentInput.val().trim(); + if (draft) { + UnsavedEdits.set(draftKey, draft); } else { UnsavedEdits.reset(draftKey); } -- cgit v1.2.3-1-g7c22 From 3ad672a20b8e216684bbcb932b792d67548c2484 Mon Sep 17 00:00:00 2001 From: Dominik Ferber Date: Tue, 27 Oct 2015 17:38:04 +0100 Subject: Add missing semicolon --- client/components/activities/comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/activities') diff --git a/client/components/activities/comments.js b/client/components/activities/comments.js index f9bbcff8..18bf9ef0 100644 --- a/client/components/activities/comments.js +++ b/client/components/activities/comments.js @@ -23,7 +23,7 @@ BlazeComponent.extendComponent({ commentFormIsOpen.set(true); }, 'submit .js-new-comment-form'(evt) { - const input = this.getInput() + const input = this.getInput(); const text = input.val().trim(); if (text) { CardComments.insert({ -- cgit v1.2.3-1-g7c22