First swimlane draft, no functionality

This commit is contained in:
Andrés Manelli 2018-01-19 12:22:03 -03:00
parent 8b6a2eade3
commit 690a5b9703
16 changed files with 474 additions and 173 deletions

View file

@ -18,7 +18,7 @@ BlazeComponent.extendComponent({
// callback, we basically solve all issues related to reactive updates. A
// comment below provides further details.
onRendered() {
const boardComponent = this.parentComponent();
const boardComponent = this.parentComponent().parentComponent();
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
const $cards = this.$('.js-minicards');
$cards.sortable({

View file

@ -4,7 +4,7 @@ template(name="listBody")
if cards.count
+inlinedForm(autoclose=false position="top")
+addCardForm(listId=_id position="top")
each cards
each cards ../../_id
a.minicard-wrapper.js-minicard(href=absoluteUrl
class="{{#if cardIsSelected}}is-selected{{/if}}"
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")

View file

@ -36,6 +36,7 @@ BlazeComponent.extendComponent({
const members = formComponent.members.get();
const labelIds = formComponent.labels.get();
const swimlaneId = this.parentComponent().parentComponent().data()._id;
if (title) {
const _id = Cards.insert({
title,
@ -44,6 +45,7 @@ BlazeComponent.extendComponent({
listId: this.data()._id,
boardId: this.data().board()._id,
sort: sortIndex,
swimlaneId: swimlaneId,
});
// In case the filter is active we need to add the newly inserted card in
// the list of exceptions -- cards that are not filtered. Otherwise the