mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 05:08:48 +01:00
make default swimlane auto-height
This commit is contained in:
parent
5bb794e3bb
commit
406766a82b
4 changed files with 5 additions and 3 deletions
|
|
@ -147,6 +147,7 @@ BlazeComponent.extendComponent({
|
||||||
);
|
);
|
||||||
|
|
||||||
// FIXME(mark-i-m): where do we put constants?
|
// FIXME(mark-i-m): where do we put constants?
|
||||||
|
// also in imports/i18n/data/en.i18n.json
|
||||||
if (height < 100 || !height) {
|
if (height < 100 || !height) {
|
||||||
Template.instance()
|
Template.instance()
|
||||||
.$('.swimlane-height-error')
|
.$('.swimlane-height-error')
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ template(name="swimlane")
|
||||||
+swimlaneHeader
|
+swimlaneHeader
|
||||||
unless collapseSwimlane
|
unless collapseSwimlane
|
||||||
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}"
|
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}"
|
||||||
style="height:{{swimlaneHeight}}px;")
|
style="height:{{swimlaneHeight}};")
|
||||||
if isMiniScreen
|
if isMiniScreen
|
||||||
if currentListIsInThisSwimlane _id
|
if currentListIsInThisSwimlane _id
|
||||||
+list(currentList)
|
+list(currentList)
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,8 @@ BlazeComponent.extendComponent({
|
||||||
swimlaneHeight() {
|
swimlaneHeight() {
|
||||||
const user = Meteor.user();
|
const user = Meteor.user();
|
||||||
const swimlane = Template.currentData();
|
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');
|
}).register('swimlane');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -798,7 +798,7 @@ Users.helpers({
|
||||||
if (swimlaneHeights[boardId] && swimlaneHeights[boardId][listId]) {
|
if (swimlaneHeights[boardId] && swimlaneHeights[boardId][listId]) {
|
||||||
return swimlaneHeights[boardId][listId];
|
return swimlaneHeights[boardId][listId];
|
||||||
} else {
|
} else {
|
||||||
return 270; //TODO(mark-i-m): default?
|
return -1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue