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/cards/attachments.jade | 2 +- client/components/cards/minicard.jade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'client/components/cards') diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade index 59eaf077..e519650b 100644 --- a/client/components/cards/attachments.jade +++ b/client/components/cards/attachments.jade @@ -15,7 +15,7 @@ template(name="attachmentsGalery") .attachment-thumbnail if isUploaded if isImage - img.attachment-thumbnail-img(src=url) + img.attachment-thumbnail-img(src="{{pathfor url}}") else span.attachment-thumbnail-ext= extension else diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 660b0fa5..573b3da1 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -2,7 +2,7 @@ template(name="minicard") .minicard if cover .minicard-cover - img(src=cover.url) + img(src="{{pathFor cover.url}}") if labels .minicard-labels each labels -- cgit v1.2.3-1-g7c22 From bf46a214050cf468d2b08436a8d070ed5c24c852 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Tue, 13 Oct 2015 14:10:51 +0200 Subject: Fix a typo in a function call introduced in a78debc --- client/components/cards/attachments.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/cards') diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade index e519650b..168fc2c8 100644 --- a/client/components/cards/attachments.jade +++ b/client/components/cards/attachments.jade @@ -15,7 +15,7 @@ template(name="attachmentsGalery") .attachment-thumbnail if isUploaded if isImage - img.attachment-thumbnail-img(src="{{pathfor url}}") + img.attachment-thumbnail-img(src="{{pathFor url}}") else span.attachment-thumbnail-ext= extension else -- cgit v1.2.3-1-g7c22 From 43de3b8a01b001ec665294fa8bd75f5d01df7df0 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 14 Oct 2015 23:40:00 +0200 Subject: Prevent dublicated empty labels of the same color --- client/components/cards/labels.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/cards') diff --git a/client/components/cards/labels.js b/client/components/cards/labels.js index d2ee0140..6a411561 100644 --- a/client/components/cards/labels.js +++ b/client/components/cards/labels.js @@ -69,12 +69,12 @@ Template.formLabel.events({ Template.createLabelPopup.events({ // Create the new label 'submit .create-label'(evt, tpl) { + evt.preventDefault(); const board = Boards.findOne(Session.get('currentBoard')); const name = tpl.$('#labelName').val().trim(); const color = Blaze.getData(tpl.find('.fa-check')).color; board.addLabel(name, color); Popup.back(); - evt.preventDefault(); }, }); -- cgit v1.2.3-1-g7c22 From f3fc154eb0cf25c46871510a0d4004037188ec15 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Tue, 20 Oct 2015 19:06:20 +0200 Subject: Re-implement label deletion This was not ported during v0.9 re-factor. Fixes #322 --- client/components/cards/labels.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/cards') diff --git a/client/components/cards/labels.jade b/client/components/cards/labels.jade index a868627c..31bd4d06 100644 --- a/client/components/cards/labels.jade +++ b/client/components/cards/labels.jade @@ -18,7 +18,7 @@ template(name="editLabelPopup") form.edit-label +formLabel button.primary.wide.left(type="submit") {{_ 'save'}} - span.right + button.js-delete-label.negate.wide.right {{_ 'delete'}} template(name="deleteLabelPopup") p {{_ "label-delete-pop"}} -- 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/cards/cardDetails.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'client/components/cards') diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 58ce28e4..5e07abab 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -13,19 +13,19 @@ BlazeComponent.extendComponent({ }, reachNextPeak() { - const activitiesComponent = this.componentChildren('activities')[0]; + const activitiesComponent = this.childrenComponents('activities')[0]; activitiesComponent.loadNextPage(); }, onCreated() { this.isLoaded = new ReactiveVar(false); - this.componentParent().showOverlay.set(true); - this.componentParent().mouseHasEnterCardDetails = false; + this.parentComponent().showOverlay.set(true); + this.parentComponent().mouseHasEnterCardDetails = false; }, scrollParentContainer() { const cardPanelWidth = 510; - const bodyBoardComponent = this.componentParent(); + const bodyBoardComponent = this.parentComponent(); const $cardContainer = bodyBoardComponent.$('.js-lists'); const $cardView = this.$(this.firstNode()); @@ -52,7 +52,7 @@ BlazeComponent.extendComponent({ }, onDestroyed() { - this.componentParent().showOverlay.set(false); + this.parentComponent().showOverlay.set(false); }, events() { @@ -83,8 +83,8 @@ BlazeComponent.extendComponent({ 'click .js-add-members': Popup.open('cardMembers'), 'click .js-add-labels': Popup.open('cardLabels'), 'mouseenter .js-card-details'() { - this.componentParent().showOverlay.set(true); - this.componentParent().mouseHasEnterCardDetails = true; + this.parentComponent().showOverlay.set(true); + this.parentComponent().mouseHasEnterCardDetails = true; }, })]; }, -- cgit v1.2.3-1-g7c22 From aa974aa54ab6e5b7db7450206d12b44ffb3a0306 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 22 Oct 2015 04:02:12 +0200 Subject: Prefer ES5 methods over underscore utilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 07cc454 (ie the switch to Meteor 1.2) we includes the `es5-shim` polyfill to support methods like `Array.prototype.forEach` in a consistent way across all supported browsers (IE8+). MDG recently released a blog post recommending the use of these native methods instead of underscore [0]. We know follow this recommendation. This commit also favor some ES6 features (argument defaults, destructing assignment) in places where we didn’t use them. [0]: http://info.meteor.com/blog/es2015-get-started --- client/components/cards/cardDetails.js | 5 +++-- client/components/cards/labels.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'client/components/cards') diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 5e07abab..2d2679ec 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -62,7 +62,8 @@ BlazeComponent.extendComponent({ }, }; - return [_.extend(events, { + return [{ + ...events, 'click .js-close-card-details'() { Utils.goBoardId(this.data().boardId); }, @@ -86,7 +87,7 @@ BlazeComponent.extendComponent({ this.parentComponent().showOverlay.set(true); this.parentComponent().mouseHasEnterCardDetails = true; }, - })]; + }]; }, }).register('cardDetails'); diff --git a/client/components/cards/labels.js b/client/components/cards/labels.js index 6a411561..4e61a0c6 100644 --- a/client/components/cards/labels.js +++ b/client/components/cards/labels.js @@ -13,7 +13,7 @@ BlazeComponent.extendComponent({ }, labels() { - return _.map(labelColors, (color) => { + return labelColors.map((color) => { return { color, name: '' }; }); }, -- 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/cards/cardDetails.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/components/cards') diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 2d2679ec..fa818c5a 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -75,8 +75,8 @@ BlazeComponent.extendComponent({ }, 'submit .js-card-details-title'(evt) { evt.preventDefault(); - const title = this.currentComponent().getValue(); - if ($.trim(title)) { + const title = this.currentComponent().getValue().trim(); + if (title) { this.data().setTitle(title); } }, @@ -106,7 +106,7 @@ BlazeComponent.extendComponent({ close(isReset = false) { if (this.isOpen.get() && !isReset) { - const draft = $.trim(this.getValue()); + const draft = this.getValue().trim(); if (draft !== Cards.findOne(Session.get('currentCard')).description) { UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue()); } -- cgit v1.2.3-1-g7c22