Merge branch 'devel' into minicard-editor

Conflicts:
	client/components/lists/listBody.js
This commit is contained in:
Maxime Quandalle 2015-10-31 10:27:20 +01:00
commit 2b134ff7a9
54 changed files with 1027 additions and 310 deletions

View file

@ -11,8 +11,8 @@ BlazeComponent.extendComponent({
options = options || {};
options.position = options.position || 'top';
const forms = this.componentChildren('inlinedForm');
let form = _.find(forms, (component) => {
const forms = this.childrenComponents('inlinedForm');
let form = forms.find((component) => {
return component.data().position === options.position;
});
if (!form && forms.length > 0) {
@ -26,8 +26,8 @@ BlazeComponent.extendComponent({
const firstCardDom = this.find('.js-minicard:first');
const lastCardDom = this.find('.js-minicard:last');
const textarea = $(evt.currentTarget).find('textarea');
let title = textarea.val();
const position = Blaze.getData(evt.currentTarget).position;
const position = this.currentData().position;
let title = textarea.val().trim();
let sortIndex;
if (position === 'top') {
sortIndex = Utils.calculateIndex(null, firstCardDom).base;
@ -62,7 +62,7 @@ BlazeComponent.extendComponent({
}
});
if ($.trim(title)) {
if (title) {
const _id = Cards.insert({
title,
listId: this.data()._id,