Use Popup.back() instead of Popup.close() to get no conflicts if a Popup is opened as "Sub Popup"

- .back() is also .close() if there is no "popup layer" left
This commit is contained in:
Martin Filser 2021-10-21 10:35:16 +02:00
parent a59dfa8fc0
commit b9250e4be4
17 changed files with 82 additions and 82 deletions

View file

@ -496,7 +496,7 @@ BlazeComponent.extendComponent({
evt.preventDefault();
const linkedId = $('.js-select-cards option:selected').val();
if (!linkedId) {
Popup.close();
Popup.back();
return;
}
const _id = Cards.insert({
@ -511,7 +511,7 @@ BlazeComponent.extendComponent({
linkedId,
});
Filter.addException(_id);
Popup.close();
Popup.back();
},
'click .js-link-board'(evt) {
//LINK BOARD
@ -522,7 +522,7 @@ BlazeComponent.extendComponent({
!impBoardId ||
Cards.findOne({ linkedId: impBoardId, archived: false })
) {
Popup.close();
Popup.back();
return;
}
const _id = Cards.insert({
@ -537,7 +537,7 @@ BlazeComponent.extendComponent({
linkedId: impBoardId,
});
Filter.addException(_id);
Popup.close();
Popup.back();
},
},
];
@ -584,7 +584,7 @@ BlazeComponent.extendComponent({
});
}
if (!board) {
Popup.close();
Popup.back();
return;
}
const boardId = board._id;
@ -711,7 +711,7 @@ BlazeComponent.extendComponent({
},
);
}
Popup.close();
Popup.back();
},
},
];