Merge branch 'swimlane-default' of https://github.com/mark-i-m/wekan

This commit is contained in:
Lauri Ojansivu 2023-08-07 16:30:59 +03:00
commit eb16cd19bb
4 changed files with 6 additions and 4 deletions

View file

@ -147,7 +147,8 @@ BlazeComponent.extendComponent({
);
// FIXME(mark-i-m): where do we put constants?
if (height < 100 || !height) {
// also in imports/i18n/data/en.i18n.json
if (height != -1 && (height < 100 || !height)) {
Template.instance()
.$('.swimlane-height-error')
.click();

View file

@ -3,7 +3,7 @@ template(name="swimlane")
+swimlaneHeader
unless collapseSwimlane
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}"
style="height:{{swimlaneHeight}}px;")
style="height:{{swimlaneHeight}};")
if isMiniScreen
if currentListIsInThisSwimlane _id
+list(currentList)

View file

@ -227,7 +227,8 @@ BlazeComponent.extendComponent({
swimlaneHeight() {
const user = Meteor.user();
const swimlane = Template.currentData();
return user.getSwimlaneHeight(swimlane.boardId, swimlane._id);
const height = user.getSwimlaneHeight(swimlane.boardId, swimlane._id);
return height == -1 ? "auto" : (height + "px");
},
}).register('swimlane');

View file

@ -798,7 +798,7 @@ Users.helpers({
if (swimlaneHeights[boardId] && swimlaneHeights[boardId][listId]) {
return swimlaneHeights[boardId][listId];
} else {
return 270; //TODO(mark-i-m): default?
return -1;
}
},