mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 13:18:49 +01:00
Add auto-width and constraint support in list
This commit is contained in:
parent
9576f6807b
commit
f7aa5d0871
3 changed files with 11 additions and 3 deletions
|
|
@ -7,11 +7,13 @@
|
|||
border-left: 1px solid #ccc;
|
||||
padding: 0;
|
||||
float: left;
|
||||
flex: 1;
|
||||
}
|
||||
[id^="swimlane-"] .list:first-child {
|
||||
min-width: 20px;
|
||||
}
|
||||
.list.list-auto-width {
|
||||
flex: 1;
|
||||
}
|
||||
.list:first-child {
|
||||
border-left: none;
|
||||
flex: none;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
template(name='list')
|
||||
.list.js-list(id="js-list-{{_id}}"
|
||||
style="{{#unless collapsed}}{{#if autoWidth}}min-{{/if}}width:{{listWidth}}px;{{/unless}}"
|
||||
style="{{#unless collapsed}}min-width:{{listWidth}}px;max-width:{{listConstraint}}px;{{/unless}}"
|
||||
class="{{#if collapsed}}list-collapsed{{/if}} {{#if autoWidth}}list-auto-width{{/if}}")
|
||||
+listHeader
|
||||
+listBody
|
||||
|
|
|
|||
|
|
@ -201,10 +201,16 @@ BlazeComponent.extendComponent({
|
|||
return user.getListWidth(list.boardId, list._id);
|
||||
},
|
||||
|
||||
listConstraint() {
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
const list = Template.currentData();
|
||||
return user.getListConstraint(list.boardId, list._id);
|
||||
},
|
||||
|
||||
autoWidth() {
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
const list = Template.currentData();
|
||||
return user.hasAutoWidth(list.boardId);
|
||||
return user.isAutoWidth(list.boardId);
|
||||
},
|
||||
}).register('list');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue