mirror of
https://github.com/wekan/wekan.git
synced 2026-03-13 08:56:13 +01:00
Fix Add List popup to not open after adding new board or there being no lists at all.
Thanks to xet7 !
This commit is contained in:
parent
89f86caf69
commit
7e378be1d8
1 changed files with 0 additions and 30 deletions
|
|
@ -212,29 +212,6 @@ Template.boardBody.onCreated(function () {
|
|||
return boardView === 'board-view-lists';
|
||||
};
|
||||
|
||||
this.openNewListForm = () => {
|
||||
const openInlineFormButton = this.find('.js-list-composer .js-open-inlined-form');
|
||||
if (openInlineFormButton) {
|
||||
openInlineFormButton.click();
|
||||
return;
|
||||
}
|
||||
|
||||
const boardCanvas = this.find('.board-canvas') || this.firstNode;
|
||||
if (boardCanvas) {
|
||||
Popup.open('addList').call(
|
||||
Utils.getCurrentBoard(),
|
||||
{
|
||||
currentTarget: boardCanvas,
|
||||
target: boardCanvas,
|
||||
preventDefault() {},
|
||||
},
|
||||
{
|
||||
dataContextIfCurrentDataIsUndefined: Utils.getCurrentBoard(),
|
||||
},
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// fix swimlanes sort field if there are null values
|
||||
const currentBoardData = Utils.getCurrentBoard();
|
||||
if (currentBoardData && Swimlanes) {
|
||||
|
|
@ -626,13 +603,6 @@ Template.boardBody.onRendered(function () {
|
|||
}
|
||||
});
|
||||
|
||||
// If there is no data in the board (ie, no lists) we autofocus the list
|
||||
// creation form by clicking on the corresponding element.
|
||||
const currentBoard = Utils.getCurrentBoard();
|
||||
if (Utils.canModifyBoard() && currentBoard.lists().length === 0) {
|
||||
tpl.openNewListForm();
|
||||
}
|
||||
|
||||
dragscroll.reset();
|
||||
Utils.setBackgroundImage();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue