mirror of
https://github.com/wekan/wekan.git
synced 2026-03-01 11:20:15 +01:00
Most Unicode Icons back to Font Awesome 4.7 for better accessibility. Less always visible buttons, More at ☰ Men.
Thanks to xet7 !
This commit is contained in:
parent
440f553de0
commit
7ad04f4535
84 changed files with 1828 additions and 1381 deletions
|
|
@ -161,29 +161,35 @@ body.list-resizing-active * {
|
|||
/* Use original display for consistent button positioning */
|
||||
display: block !important;
|
||||
position: relative !important;
|
||||
/* Prevent vertical expansion but allow normal height */
|
||||
overflow: hidden !important;
|
||||
/* Allow overflow for text wrapping and forms */
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
/* Clearfix for floated buttons */
|
||||
.list-header::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Ensure title text doesn't cause height changes for all lists */
|
||||
.list-header .list-header-name {
|
||||
/* Prevent text wrapping to maintain consistent height */
|
||||
white-space: nowrap !important;
|
||||
/* Truncate text with ellipsis if too long */
|
||||
text-overflow: ellipsis !important;
|
||||
/* Allow text wrapping to flow below buttons */
|
||||
white-space: normal !important;
|
||||
/* Ensure proper line height */
|
||||
line-height: 1.2 !important;
|
||||
/* Ensure it doesn't overflow */
|
||||
overflow: hidden !important;
|
||||
/* Add margin to prevent overlap with buttons */
|
||||
margin-right: 120px !important;
|
||||
/* Ensure it doesn't overflow horizontally */
|
||||
overflow-wrap: break-word !important;
|
||||
word-wrap: break-word !important;
|
||||
/* Full width since buttons are now absolutely positioned above */
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* Position elements from right to left: hamburger, add card, drag handle */
|
||||
/* Position elements at top aligned with collapse button */
|
||||
.list-header .js-open-list-menu {
|
||||
position: absolute !important;
|
||||
top: 2.5vh !important;
|
||||
right: 1.5vw !important;
|
||||
top: 5px !important;
|
||||
right: 10px !important;
|
||||
z-index: 15 !important;
|
||||
display: inline-block !important;
|
||||
padding: 4px !important;
|
||||
|
|
@ -191,8 +197,8 @@ body.list-resizing-active * {
|
|||
|
||||
.list-header .list-header-plus-top {
|
||||
position: absolute !important;
|
||||
top: 2.5vh !important;
|
||||
right: 3.25vw !important;
|
||||
top: 5px !important;
|
||||
right: 10px !important;
|
||||
z-index: 15 !important;
|
||||
display: inline-block !important;
|
||||
padding: 4px !important;
|
||||
|
|
@ -200,8 +206,8 @@ body.list-resizing-active * {
|
|||
|
||||
.list-header .list-header-handle-desktop {
|
||||
position: absolute !important;
|
||||
top: 2.5vh !important;
|
||||
right: 6.5vw !important;
|
||||
top: 5px !important;
|
||||
right: 40px !important;
|
||||
z-index: 15 !important;
|
||||
display: inline-block !important;
|
||||
cursor: move !important;
|
||||
|
|
@ -245,42 +251,61 @@ body.list-resizing-active * {
|
|||
}
|
||||
.list.list-collapsed {
|
||||
flex: none;
|
||||
min-width: 60px;
|
||||
max-width: 80px;
|
||||
width: 60px;
|
||||
min-width: 30px;
|
||||
max-width: 30px;
|
||||
width: 30px;
|
||||
min-height: 60vh;
|
||||
height: 60vh;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
.list.list-collapsed .list-header {
|
||||
padding: 1vh 1.5vw 0.5vh;
|
||||
min-height: 2.5vh !important;
|
||||
height: auto !important;
|
||||
padding: 5px 0;
|
||||
min-height: 100% !important;
|
||||
height: 100% !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
overflow: visible !important;
|
||||
width: 100%;
|
||||
max-width: 60px;
|
||||
margin: 0 auto;
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
margin: 0;
|
||||
}
|
||||
.list.list-collapsed .list-header .js-collapse {
|
||||
margin: 0 auto 0 auto;
|
||||
position: relative !important;
|
||||
left: -10px !important;
|
||||
margin: 5px auto;
|
||||
z-index: 10;
|
||||
padding: 8px 12px;
|
||||
font-size: 12px;
|
||||
padding: 5px;
|
||||
font-size: 16px;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
width: fit-content;
|
||||
width: auto;
|
||||
left: auto !important;
|
||||
top: auto !important;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-header-handle {
|
||||
position: absolute !important;
|
||||
top: 30px !important;
|
||||
right: 1.5vw !important;
|
||||
z-index: 15 !important;
|
||||
position: static !important;
|
||||
margin: 5px auto;
|
||||
z-index: 10;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
width: auto;
|
||||
top: auto !important;
|
||||
right: auto !important;
|
||||
}
|
||||
|
||||
.list.list-collapsed .list-header .list-header-handle-desktop {
|
||||
position: static !important;
|
||||
margin: 5px auto;
|
||||
z-index: 10;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
width: auto;
|
||||
top: auto !important;
|
||||
right: auto !important;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated {
|
||||
width: auto !important;
|
||||
|
|
@ -288,30 +313,43 @@ body.list-resizing-active * {
|
|||
margin: 20px 0 0 0 !important;
|
||||
position: relative !important;
|
||||
overflow: visible !important;
|
||||
transform: rotate(90deg);
|
||||
transform-origin: center center;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated h2.list-header-name {
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
overflow: visible;
|
||||
white-space: nowrap;
|
||||
display: block !important;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
color: #333;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid #ddd;
|
||||
padding: 0;
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
width: 100vh;
|
||||
height: 30px;
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
top: 50%;
|
||||
transform: translateY(calc(-50% + 20px)) rotate(0deg);
|
||||
width: auto;
|
||||
height: auto;
|
||||
position: static;
|
||||
left: auto;
|
||||
top: auto;
|
||||
transform: none;
|
||||
z-index: 10;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
pointer-events: none;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.list.list-composer,
|
||||
.list-composer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Show list-composer when inside an active inlined form */
|
||||
form.inlined-form .list-composer {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.list.list-composer .open-list-composer,
|
||||
|
|
@ -348,16 +386,17 @@ body.list-resizing-active * {
|
|||
display: none;
|
||||
}
|
||||
.list-header .list-header-name {
|
||||
display: inline;
|
||||
display: block;
|
||||
font-size: clamp(14px, 3vw, 18px);
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
min-height: 1.2vh;
|
||||
min-width: 4vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
}
|
||||
/* Sum badge shown before list title */
|
||||
.list-header .list-sum-badge {
|
||||
|
|
@ -398,6 +437,8 @@ body.list-resizing-active * {
|
|||
.list-header .list-header-plus-top {
|
||||
color: #a6a6a6;
|
||||
margin-right: 15px;
|
||||
vertical-align: middle;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.list-header .list-header-collapse-right {
|
||||
color: #a6a6a6;
|
||||
|
|
@ -406,41 +447,38 @@ body.list-resizing-active * {
|
|||
color: #a6a6a6;
|
||||
margin-right: 15px;
|
||||
}
|
||||
/* List header collapse button styling */
|
||||
.list-header .list-header-collapse-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* List header collapse button styling - positioned at top left */
|
||||
.list-header .js-collapse {
|
||||
position: absolute !important;
|
||||
top: 5px !important;
|
||||
left: 10px !important;
|
||||
color: #a6a6a6;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
vertical-align: top;
|
||||
padding: 5px 8px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
line-height: 1.2;
|
||||
min-width: 30px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
text-decoration: none;
|
||||
margin: 0;
|
||||
z-index: 15;
|
||||
}
|
||||
.list-header .js-collapse:hover {
|
||||
background-color: transparent;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.list-header .list-header-collapse-container > div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
/* Title text container - full width below buttons */
|
||||
.list-header > div {
|
||||
padding-top: 25px;
|
||||
width: 100%;
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.list.list-collapsed .list-header .js-collapse {
|
||||
display: inline-block !important;
|
||||
|
|
@ -448,132 +486,155 @@ body.list-resizing-active * {
|
|||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Hide menu button in collapsed state */
|
||||
.list.list-collapsed .list-header .js-open-list-menu,
|
||||
.list.list-collapsed .list-header .list-header-menu {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Responsive adjustments for collapsed lists */
|
||||
@media (min-width: 768px) {
|
||||
.list.list-collapsed {
|
||||
min-width: 60px;
|
||||
max-width: 80px;
|
||||
width: 60px;
|
||||
min-width: 30px;
|
||||
max-width: 30px;
|
||||
width: 30px;
|
||||
min-height: 60vh;
|
||||
height: 60vh;
|
||||
}
|
||||
.list.list-collapsed .list-header {
|
||||
max-width: 60px;
|
||||
margin: 0 auto;
|
||||
min-height: 2.5vh !important;
|
||||
height: auto !important;
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
margin: 0;
|
||||
min-height: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated {
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
margin: 20px 0 0 0 !important;
|
||||
position: relative !important;
|
||||
transform: rotate(90deg);
|
||||
flex: 1;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated h2.list-header-name {
|
||||
width: 100vh;
|
||||
width: auto;
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
height: auto;
|
||||
line-height: 1.2;
|
||||
padding: 0;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
top: 50%;
|
||||
transform: translateY(calc(-50% + 120px)) rotate(0deg);
|
||||
position: static;
|
||||
left: auto;
|
||||
top: auto;
|
||||
transform: none;
|
||||
text-align: center;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
display: block !important;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid #ddd;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #333;
|
||||
z-index: 10;
|
||||
}
|
||||
.list.list-collapsed .list-header .js-collapse {
|
||||
margin: 0 auto 20px auto;
|
||||
margin: 5px auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.list.list-collapsed {
|
||||
min-width: 30px;
|
||||
max-width: 30px;
|
||||
width: 30px;
|
||||
min-height: 60vh;
|
||||
height: 60vh;
|
||||
}
|
||||
.list.list-collapsed .list-header {
|
||||
min-height: 2.5vh !important;
|
||||
height: auto !important;
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
min-height: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated {
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
margin: 20px 0 0 0 !important;
|
||||
position: relative !important;
|
||||
transform: rotate(90deg);
|
||||
flex: 1;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated h2.list-header-name {
|
||||
width: 100vh;
|
||||
width: auto;
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
height: auto;
|
||||
line-height: 1.2;
|
||||
padding: 0;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
top: 50%;
|
||||
transform: translateY(calc(-50% + 120px)) rotate(0deg);
|
||||
position: static;
|
||||
left: auto;
|
||||
top: auto;
|
||||
transform: none;
|
||||
text-align: center;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
display: block !important;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid #ddd;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #333;
|
||||
z-index: 10;
|
||||
}
|
||||
.list.list-collapsed .list-header .js-collapse {
|
||||
margin: 0 auto 20px auto;
|
||||
margin: 5px auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.list.list-collapsed {
|
||||
min-width: 30px;
|
||||
max-width: 30px;
|
||||
width: 30px;
|
||||
min-height: 60vh;
|
||||
height: 60vh;
|
||||
}
|
||||
.list.list-collapsed .list-header {
|
||||
min-height: 2.5vh !important;
|
||||
height: auto !important;
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
min-height: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated {
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
margin: 20px 0 0 0 !important;
|
||||
position: relative !important;
|
||||
transform: rotate(90deg);
|
||||
flex: 1;
|
||||
}
|
||||
.list.list-collapsed .list-header .list-rotated h2.list-header-name {
|
||||
width: 100vh;
|
||||
width: auto;
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
height: auto;
|
||||
line-height: 1.2;
|
||||
padding: 0;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
top: 50%;
|
||||
transform: translateY(calc(-50% + 40px)) rotate(0deg);
|
||||
text-align: left;
|
||||
position: static;
|
||||
left: auto;
|
||||
top: auto;
|
||||
transform: none;
|
||||
text-align: center;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
display: block !important;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid #ddd;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #333;
|
||||
z-index: 10;
|
||||
}
|
||||
.list.list-collapsed .list-header .js-collapse {
|
||||
margin: 0 auto 20px auto;
|
||||
margin: 5px auto;
|
||||
}
|
||||
}
|
||||
.list-header .list-header-collapse {
|
||||
|
|
@ -596,6 +657,8 @@ body.list-resizing-active * {
|
|||
}
|
||||
.js-open-list-menu {
|
||||
font-size: 18px;
|
||||
vertical-align: middle;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.list-body {
|
||||
flex: 1 1 auto;
|
||||
|
|
@ -1078,9 +1141,9 @@ body.list-resizing-active * {
|
|||
white-space: normal !important;
|
||||
overflow: visible !important;
|
||||
text-overflow: clip !important;
|
||||
display: inline-block !important;
|
||||
/* Reserve space for right-side controls (menu, handle, count) */
|
||||
max-width: calc(100% - 120px) !important;
|
||||
display: block !important;
|
||||
/* Full width since buttons are absolutely positioned */
|
||||
width: 100% !important;
|
||||
/* Break long words to avoid overflow */
|
||||
word-break: break-word !important;
|
||||
}
|
||||
|
|
@ -1173,3 +1236,48 @@ body.list-resizing-active * {
|
|||
.list-header-indigo {
|
||||
border-bottom: 6px solid #4b0082;
|
||||
}
|
||||
|
||||
.list.list-collapsed .collapsed-list-drag-area {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: grab;
|
||||
user-select: none;
|
||||
}
|
||||
.list.list-collapsed .collapsed-list-drag-area:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
.list.list-collapsed .list-header-name-collapsed {
|
||||
writing-mode: vertical-rl;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.list.list-collapsed .list-header .js-collapse {
|
||||
position: relative !important;
|
||||
left: -10px !important;
|
||||
color: #333;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: block !important;
|
||||
align-items: initial;
|
||||
justify-content: initial;
|
||||
font-size: 16px !important;
|
||||
box-shadow: none;
|
||||
margin: 5px auto;
|
||||
z-index: 10;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,20 +276,21 @@ BlazeComponent.extendComponent({
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// Only enable resize for non-collapsed, non-auto-width lists
|
||||
const isAutoWidth = this.autoWidth();
|
||||
const isCollapsed = Utils.getListCollapseState(list);
|
||||
if (isCollapsed || isAutoWidth) {
|
||||
$resizeHandle.hide();
|
||||
return;
|
||||
}
|
||||
// Reactively show/hide resize handle based on collapse and auto-width state
|
||||
this.autorun(() => {
|
||||
const isAutoWidth = this.autoWidth();
|
||||
const isCollapsed = Utils.getListCollapseState(list);
|
||||
if (isCollapsed || isAutoWidth) {
|
||||
$resizeHandle.hide();
|
||||
} else {
|
||||
$resizeHandle.show();
|
||||
}
|
||||
});
|
||||
|
||||
let isResizing = false;
|
||||
let startX = 0;
|
||||
let startWidth = 0;
|
||||
let minWidth = 100; // Minimum width as defined in the existing code
|
||||
let maxWidth = this.listConstraint() || 1000; // Use constraint as max width
|
||||
let listConstraint = this.listConstraint(); // Store constraint value for use in event handlers
|
||||
const component = this; // Store reference to component for use in event handlers
|
||||
|
||||
|
|
@ -318,7 +319,7 @@ BlazeComponent.extendComponent({
|
|||
|
||||
const currentX = e.pageX || e.originalEvent.touches[0].pageX;
|
||||
const deltaX = currentX - startX;
|
||||
const newWidth = Math.max(minWidth, Math.min(maxWidth, startWidth + deltaX));
|
||||
const newWidth = Math.max(minWidth, startWidth + deltaX);
|
||||
|
||||
// Apply the new width immediately for real-time feedback
|
||||
$list[0].style.setProperty('--list-width', `${newWidth}px`);
|
||||
|
|
@ -343,7 +344,7 @@ BlazeComponent.extendComponent({
|
|||
// Calculate final width
|
||||
const currentX = e.pageX || e.originalEvent.touches[0].pageX;
|
||||
const deltaX = currentX - startX;
|
||||
const finalWidth = Math.max(minWidth, Math.min(maxWidth, startWidth + deltaX));
|
||||
const finalWidth = Math.max(minWidth, startWidth + deltaX);
|
||||
|
||||
// Ensure the final width is applied
|
||||
$list[0].style.setProperty('--list-width', `${finalWidth}px`);
|
||||
|
|
@ -466,3 +467,16 @@ Template.miniList.events({
|
|||
Session.set('currentList', listId);
|
||||
},
|
||||
});
|
||||
|
||||
// Enable drag-reorder for collapsed lists from .js-collapsed-list-drag area
|
||||
this.$('.js-collapsed-list-drag').draggable({
|
||||
axis: 'x',
|
||||
helper: 'clone',
|
||||
revert: 'invalid',
|
||||
start(evt, ui) {
|
||||
boardComponent.setIsDragging(true);
|
||||
},
|
||||
stop(evt, ui) {
|
||||
boardComponent.setIsDragging(false);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@ template(name="listBody")
|
|||
unless collapsed
|
||||
.list-body(class="{{#unless isVerticalScrollbars}}no-scrollbars{{/unless}}")
|
||||
.minicards.clearfix.js-minicards(class="{{#if reachedWipLimit}}js-list-full{{/if}}")
|
||||
if cards.length
|
||||
+inlinedForm(autoclose=false position="top")
|
||||
+addCardForm(listId=_id position="top")
|
||||
+inlinedForm(autoclose=false position="top")
|
||||
+addCardForm(listId=_id position="top")
|
||||
ul.sidebar-list
|
||||
each customFieldsSum
|
||||
li
|
||||
|
|
@ -26,13 +25,8 @@ template(name="listBody")
|
|||
+minicard(this)
|
||||
if (showSpinner (idOrNull ../../_id))
|
||||
+spinnerList
|
||||
|
||||
if canSeeAddCard
|
||||
+inlinedForm(autoclose=false position="bottom")
|
||||
+addCardForm(listId=_id position="bottom")
|
||||
else
|
||||
a.open-minicard-composer.js-card-composer.js-open-inlined-form(title="{{_ 'add-card-to-bottom-of-list'}}")
|
||||
| ➕
|
||||
+inlinedForm(autoclose=false position="bottom")
|
||||
+addCardForm(listId=_id position="bottom")
|
||||
|
||||
template(name="spinnerList")
|
||||
.sk-spinner.sk-spinner-list(
|
||||
|
|
@ -54,7 +48,8 @@ template(name="addCardForm")
|
|||
|
||||
.add-controls.clearfix
|
||||
button.primary.confirm(type="submit") {{_ 'add'}}
|
||||
a.js-close-inlined-form | ❌
|
||||
a.js-close-inlined-form
|
||||
i.fa.fa-times-thin
|
||||
.add-controls.clearfix
|
||||
unless currentBoard.isTemplatesBoard
|
||||
unless currentBoard.isTemplateBoard
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ template(name="listHeader")
|
|||
if isMiniScreen
|
||||
if currentList
|
||||
a.list-header-left-icon.js-unselect-list
|
||||
| ◀️
|
||||
i.fa.fa-caret-left
|
||||
else
|
||||
if collapsed
|
||||
if showCardsCountForList cards.length
|
||||
|
|
@ -30,22 +30,21 @@ template(name="listHeader")
|
|||
|
|
||||
span.list-sum-badge(title="{{_ 'sum-of-number-fields'}}") ∑ {{numberFieldsSum}}
|
||||
else
|
||||
div.list-header-collapse-container
|
||||
a.list-collapse-indicator.js-collapse(title="{{_ 'collapse'}}")
|
||||
if collapsed
|
||||
| ▶
|
||||
else
|
||||
| 🔽
|
||||
div(class="{{#if collapsed}}list-rotated{{/if}}")
|
||||
h2.list-header-name(
|
||||
title="{{ moment modifiedAt 'LLL' }}"
|
||||
class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
|
||||
+viewer
|
||||
= title
|
||||
if wipLimit.enabled
|
||||
| (
|
||||
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|
||||
|/#{wipLimit.value})
|
||||
a.list-collapse-indicator.js-collapse(title="{{_ 'collapse'}}")
|
||||
if collapsed
|
||||
i.fa.fa-caret-right
|
||||
else
|
||||
i.fa.fa-caret-down
|
||||
div(class="{{#if collapsed}}list-rotated{{/if}}")
|
||||
h2.list-header-name(
|
||||
title="{{ moment modifiedAt 'LLL' }}"
|
||||
class="{{#unless collapsed}}{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}{{/unless}}")
|
||||
+viewer
|
||||
= title
|
||||
if wipLimit.enabled
|
||||
| (
|
||||
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|
||||
|/#{wipLimit.value})
|
||||
unless collapsed
|
||||
if showCardsCountForList cards.length
|
||||
span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
|
||||
|
|
@ -55,22 +54,29 @@ template(name="listHeader")
|
|||
if isMiniScreen
|
||||
if currentList
|
||||
if isWatching
|
||||
i.list-header-watch-icon | 👁️
|
||||
i.list-header-watch-icon i.fa.fa-eye
|
||||
div.list-header-menu
|
||||
unless currentUser.isCommentOnly
|
||||
unless currentUser.isReadOnly
|
||||
unless currentUser.isReadAssignedOnly
|
||||
if canSeeAddCard
|
||||
a.js-add-card.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}") ➕
|
||||
a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}") ☰
|
||||
a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
|
||||
i.fa.fa-bars
|
||||
else
|
||||
a.list-header-menu-icon.js-select-list ▶️
|
||||
a.list-header-menu-icon.js-select-list
|
||||
i.fa.fa-caret-right
|
||||
unless currentUser.isWorker
|
||||
if isTouchScreenOrShowDesktopDragHandles
|
||||
a.list-header-handle.handle.js-list-handle ↕️
|
||||
a.list-header-handle.handle.js-list-handle
|
||||
i.fa.fa-arrows
|
||||
else if currentUser.isBoardMember
|
||||
if isWatching
|
||||
i.list-header-watch-icon | 👁️
|
||||
i.list-header-watch-icon i.fa.fa-eye
|
||||
unless currentUser.isCommentOnly
|
||||
unless currentUser.isReadOnly
|
||||
unless currentUser.isReadAssignedOnly
|
||||
if isTouchScreenOrShowDesktopDragHandles
|
||||
a.list-header-handle-desktop.handle.js-list-handle(title="{{_ 'drag-list'}}")
|
||||
i.fa.fa-arrows
|
||||
unless collapsed
|
||||
div.list-header-menu
|
||||
unless currentUser.isCommentOnly
|
||||
|
|
@ -78,11 +84,8 @@ template(name="listHeader")
|
|||
unless currentUser.isReadAssignedOnly
|
||||
//if isBoardAdmin
|
||||
// a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
|
||||
if isTouchScreenOrShowDesktopDragHandles
|
||||
a.list-header-handle-desktop.handle.js-list-handle(title="{{_ 'drag-list'}}") ↕️
|
||||
if canSeeAddCard
|
||||
a.js-add-card.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}") ➕
|
||||
a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}") ☰
|
||||
a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
|
||||
i.fa.fa-bars
|
||||
|
||||
template(name="editListTitleForm")
|
||||
.list-composer
|
||||
|
|
@ -90,31 +93,42 @@ template(name="editListTitleForm")
|
|||
.edit-controls.clearfix
|
||||
button.primary.confirm(type="submit") {{_ 'save'}}
|
||||
a.js-close-inlined-form
|
||||
| ❌
|
||||
i.fa.fa-times-thin
|
||||
|
||||
template(name="listActionPopup")
|
||||
unless currentUser.isReadOnly
|
||||
unless currentUser.isReadAssignedOnly
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-add-card.list-header-plus-top
|
||||
i.fa.fa-plus
|
||||
i.fa.fa-arrow-up
|
||||
| {{_ 'add-card-to-top-of-list'}}
|
||||
li
|
||||
a.js-add-card.list-header-plus-bottom
|
||||
| ➕
|
||||
| ⬇️
|
||||
i.fa.fa-plus
|
||||
i.fa.fa-arrow-down
|
||||
| {{_ 'add-card-to-bottom-of-list'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-add-list
|
||||
i.fa.fa-plus
|
||||
| {{_ 'add-list'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-set-list-width
|
||||
| ↔️
|
||||
i.fa.fa-arrows-h
|
||||
| {{_ 'set-list-width'}}
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-toggle-watch-list
|
||||
if isWatching
|
||||
| 👁️
|
||||
i.fa.fa-eye
|
||||
| {{_ 'unwatch'}}
|
||||
else
|
||||
| 🙈
|
||||
i.fa.fa-eye-slash
|
||||
| {{_ 'watch'}}
|
||||
unless currentUser.isCommentOnly
|
||||
unless currentUser.isReadOnly
|
||||
|
|
@ -123,33 +137,33 @@ template(name="listActionPopup")
|
|||
ul.pop-over-list
|
||||
li
|
||||
a.js-set-color-list
|
||||
| 🎨
|
||||
i.fa.fa-paint-brush
|
||||
| {{_ 'set-color-list'}}
|
||||
ul.pop-over-list
|
||||
if cards.length
|
||||
li
|
||||
a.js-select-cards
|
||||
| ☑️
|
||||
i.fa.fa-select-square
|
||||
| {{_ 'list-select-cards'}}
|
||||
if currentUser.isBoardAdmin
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-set-wip-limit
|
||||
| 🚫
|
||||
i.fa.fa-ban
|
||||
| {{#if isWipLimitEnabled }}{{_ 'edit-wip-limit'}}{{else}}{{_ 'setWipLimitPopup-title'}}{{/if}}
|
||||
unless currentUser.isWorker
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-close-list
|
||||
| ➡️
|
||||
| 📦
|
||||
i.fa.fa-arrow-right
|
||||
i.fa.fa-archive
|
||||
| {{_ 'archive-list'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-more
|
||||
| 🔗
|
||||
i.fa.fa-link
|
||||
| {{_ 'listMorePopup-title'}}
|
||||
|
||||
template(name="boardLists")
|
||||
|
|
@ -166,7 +180,7 @@ template(name="listMorePopup")
|
|||
span.clearfix
|
||||
span {{_ 'link-list'}}
|
||||
= ' '
|
||||
| {{#if board.isPublic}}🌐{{else}}🔒{{/if}}
|
||||
i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
|
||||
input.inline-input(type="text" readonly value="{{ rootUrl }}")
|
||||
| {{_ 'added'}}
|
||||
span.date(title=list.createdAt) {{ moment createdAt 'LLL' }}
|
||||
|
|
@ -186,7 +200,7 @@ template(name="setWipLimitPopup")
|
|||
ul.pop-over-list
|
||||
li: a.js-enable-wip-limit {{_ 'enable-wip-limit'}}
|
||||
if isWipLimitEnabled
|
||||
| ✅
|
||||
i.fa.fa-check
|
||||
if isWipLimitEnabled
|
||||
p
|
||||
input.wip-limit-value(type="number" value="{{ wipLimitValue }}" min="1" max="99")
|
||||
|
|
@ -228,6 +242,29 @@ template(name="setListColorPopup")
|
|||
// note: we use the swimlane palette to have more than just the border
|
||||
span.card-label.palette-color.js-palette-color(class="card-details-{{color}}")
|
||||
if(isSelected color)
|
||||
| ✅
|
||||
i.fa.fa-check
|
||||
button.primary.confirm.js-submit {{_ 'save'}}
|
||||
button.js-remove-color.negate.wide.right {{_ 'unset-color'}}
|
||||
|
||||
template(name="addListPopup")
|
||||
form.js-add-list-form
|
||||
input.list-name-input.full-line(type="text" placeholder="{{_ 'add-list'}}" autocomplete="off" autofocus)
|
||||
if currentSwimlaneData
|
||||
if swimlaneLists.length
|
||||
label {{_ 'add-after-list'}}
|
||||
select.list-position-input.full-line
|
||||
each swimlaneLists
|
||||
option(value="{{_id}}" selected="{{$eq _id currentListIdValue}}") {{increment @index}} {{title}}
|
||||
else
|
||||
if currentBoard.lists.length
|
||||
label {{_ 'add-after-list'}}
|
||||
select.list-position-input.full-line
|
||||
each currentBoard.lists
|
||||
option(value="{{_id}}" selected="{{$eq _id currentListIdValue}}") {{increment @index}} {{title}}
|
||||
.edit-controls.clearfix
|
||||
button.primary.confirm.js-submit-add-list(type="submit") {{_ 'save'}}
|
||||
unless currentBoard.isTemplatesBoard
|
||||
unless currentBoard.isTemplateBoard
|
||||
span.quiet
|
||||
| {{_ 'or'}}
|
||||
a.js-list-template {{_ 'template'}}
|
||||
|
|
|
|||
|
|
@ -123,15 +123,6 @@ BlazeComponent.extendComponent({
|
|||
this.collapsed(!this.collapsed());
|
||||
},
|
||||
'click .js-open-list-menu': Popup.open('listAction'),
|
||||
'click .js-add-card.list-header-plus-top'(event) {
|
||||
const listDom = $(event.target).parents(
|
||||
`#js-list-${this.currentData()._id}`,
|
||||
)[0];
|
||||
const listComponent = BlazeComponent.getComponentForElement(listDom);
|
||||
listComponent.openForm({
|
||||
position: 'top',
|
||||
});
|
||||
},
|
||||
'click .js-unselect-list'() {
|
||||
Session.set('currentList', null);
|
||||
},
|
||||
|
|
@ -204,14 +195,27 @@ Template.listActionPopup.helpers({
|
|||
|
||||
Template.listActionPopup.events({
|
||||
'click .js-list-subscribe'() {},
|
||||
'click .js-add-card.list-header-plus-top'(event) {
|
||||
const listDom = $(`#js-list-${this._id}`)[0];
|
||||
const listComponent = BlazeComponent.getComponentForElement(listDom);
|
||||
if (listComponent) {
|
||||
listComponent.openForm({
|
||||
position: 'top',
|
||||
});
|
||||
}
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-add-card.list-header-plus-bottom'(event) {
|
||||
const listDom = $(`#js-list-${this._id}`)[0];
|
||||
const listComponent = BlazeComponent.getComponentForElement(listDom);
|
||||
listComponent.openForm({
|
||||
position: 'bottom',
|
||||
});
|
||||
if (listComponent) {
|
||||
listComponent.openForm({
|
||||
position: 'bottom',
|
||||
});
|
||||
}
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-add-list': Popup.open('addList'),
|
||||
'click .js-set-list-width': Popup.open('setListWidth'),
|
||||
'click .js-set-color-list': Popup.open('setListColor'),
|
||||
'click .js-select-cards'() {
|
||||
|
|
@ -440,3 +444,105 @@ BlazeComponent.extendComponent({
|
|||
];
|
||||
},
|
||||
}).register('setListWidthPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.currentBoard = Utils.getCurrentBoard();
|
||||
this.currentSwimlaneId = new ReactiveVar(null);
|
||||
this.currentListId = new ReactiveVar(null);
|
||||
|
||||
// Get the swimlane context from opener
|
||||
const openerData = Popup.getOpenerComponent()?.data();
|
||||
|
||||
// If opened from swimlane menu, openerData is the swimlane
|
||||
if (openerData?.type === 'swimlane' || openerData?.type === 'template-swimlane') {
|
||||
this.currentSwimlane = openerData;
|
||||
this.currentSwimlaneId.set(openerData._id);
|
||||
} else if (openerData?._id) {
|
||||
// If opened from list menu, get swimlane from the list
|
||||
const list = ReactiveCache.getList({ _id: openerData._id });
|
||||
this.currentSwimlane = list?.swimlaneId ? ReactiveCache.getSwimlane({ _id: list.swimlaneId }) : null;
|
||||
this.currentSwimlaneId.set(this.currentSwimlane?._id || null);
|
||||
this.currentListId.set(openerData._id);
|
||||
}
|
||||
},
|
||||
|
||||
currentSwimlaneData() {
|
||||
const swimlaneId = this.currentSwimlaneId.get();
|
||||
return swimlaneId ? ReactiveCache.getSwimlane({ _id: swimlaneId }) : null;
|
||||
},
|
||||
|
||||
currentListIdValue() {
|
||||
return this.currentListId.get();
|
||||
},
|
||||
|
||||
swimlaneLists() {
|
||||
const swimlaneId = this.currentSwimlaneId.get();
|
||||
if (swimlaneId) {
|
||||
return ReactiveCache.getLists({ swimlaneId, archived: false }).sort((a, b) => a.sort - b.sort);
|
||||
}
|
||||
return this.currentBoard.lists;
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'submit .js-add-list-form'(evt) {
|
||||
evt.preventDefault();
|
||||
|
||||
const titleInput = this.find('.list-name-input');
|
||||
const title = titleInput?.value.trim();
|
||||
|
||||
if (!title) return;
|
||||
|
||||
let sortIndex = 0;
|
||||
const boardId = Utils.getCurrentBoardId();
|
||||
const swimlaneId = this.currentSwimlane?._id;
|
||||
|
||||
const positionInput = this.find('.list-position-input');
|
||||
|
||||
if (positionInput && positionInput.value) {
|
||||
const positionId = positionInput.value.trim();
|
||||
const selectedList = ReactiveCache.getList({ boardId, _id: positionId, archived: false });
|
||||
|
||||
if (selectedList) {
|
||||
sortIndex = selectedList.sort + 1;
|
||||
} else {
|
||||
// No specific position, add at end of swimlane
|
||||
if (swimlaneId) {
|
||||
const swimlaneLists = ReactiveCache.getLists({ swimlaneId, archived: false });
|
||||
const lastSwimlaneList = swimlaneLists.sort((a, b) => b.sort - a.sort)[0];
|
||||
sortIndex = Utils.calculateIndexData(lastSwimlaneList, null).base;
|
||||
} else {
|
||||
const lastList = this.currentBoard.getLastList();
|
||||
sortIndex = Utils.calculateIndexData(lastList, null).base;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// No position input, add at end of swimlane
|
||||
if (swimlaneId) {
|
||||
const swimlaneLists = ReactiveCache.getLists({ swimlaneId, archived: false });
|
||||
const lastSwimlaneList = swimlaneLists.sort((a, b) => b.sort - a.sort)[0];
|
||||
sortIndex = Utils.calculateIndexData(lastSwimlaneList, null).base;
|
||||
} else {
|
||||
const lastList = this.currentBoard.getLastList();
|
||||
sortIndex = Utils.calculateIndexData(lastList, null).base;
|
||||
}
|
||||
}
|
||||
|
||||
Lists.insert({
|
||||
title,
|
||||
boardId: Session.get('currentBoard'),
|
||||
sort: sortIndex,
|
||||
type: 'list',
|
||||
swimlaneId: swimlaneId,
|
||||
});
|
||||
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-list-template': Popup.open('searchElement'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('addListPopup');
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ template(name="minilist")
|
|||
class="minicard-{{colorClass}}")
|
||||
.minicard-title
|
||||
.handle
|
||||
span.drag-handle(title="{{_ 'dragList'}}") ↕️
|
||||
span.drag-handle(title="{{_ 'dragList'}}")
|
||||
i.fa.fa-arrows
|
||||
+viewer
|
||||
= title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue