mirror of
https://github.com/wekan/wekan.git
synced 2026-01-30 05:05:17 +01:00
Merge branch 'devel' into minicard-editor
Conflicts: client/components/lists/listBody.js
This commit is contained in:
commit
2b134ff7a9
54 changed files with 1027 additions and 310 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue