mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 20:45:07 -05:00
Re-introduces the "fit lists to content" auto-width mode that the width rework removed, now following the same Shared/Personal scope as fixed widths: - Shared mode (allowsPersonalListWidth=false): auto-width is a per-board setting (board.autoWidth), the same for everyone; togglable by members with write access (server method setBoardAutoWidth, gated on board membership like applyListWidth). - Personal mode: auto-width is per-user (the existing profile.autoWidthBoards). - models/boards.js: add `autoWidth` field + getter/setter. - server/models/users.js: add setBoardAutoWidth method. - client list.js: effectiveAutoWidth(); autoWidth() helper; canResizeList() returns false in auto mode. - list.jade: add `list-auto-width` class and omit `--list-width` when auto, so CSS fits the list to content and hides the resize handle. - listHeader popup: re-add the Auto list width toggle (writes to board or profile depending on scope; shown only to those who may change it). - wekanCreator: carry board.autoWidth through import. - docs + CHANGELOG. Verified live: shared auto-width applies to all members (class set, no --list-width, handle hidden); personal auto-width is per-user (one member auto, the other keeps a fixed width + handle). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
608 B
Plaintext
14 lines
608 B
Plaintext
template(name='list')
|
|
.list.js-list(id="js-list-{{_id}}"
|
|
style="{{#unless collapsed}}{{#unless autoWidth}}--list-width:{{listWidth}}px;{{/unless}}{{/unless}}"
|
|
class="{{#if collapsed}}list-collapsed{{/if}} {{#if autoWidth}}list-auto-width{{/if}} {{#if isMiniScreen}}mobile-view{{/if}}")
|
|
+listHeader
|
|
unless collapsed
|
|
+listBody
|
|
if canResizeList
|
|
.list-resize-handle.js-list-resize-handle.nodragscroll
|
|
|
|
template(name='miniList')
|
|
a.mini-list.js-select-list.js-list(id="js-list-{{_id}}" class="{{#if isMiniScreen}}mobile-view{{/if}}")
|
|
+listHeader
|