mirror of
https://github.com/wekan/wekan.git
synced 2026-03-10 15:42:34 +01:00
Merge branch 'devel' into nested-tasks
This commit is contained in:
commit
3eba6ef285
65 changed files with 791 additions and 103 deletions
|
|
@ -218,10 +218,13 @@ class CardReceivedDate extends CardDate {
|
|||
}
|
||||
|
||||
classes() {
|
||||
let classes = 'received-date' + ' ';
|
||||
if (this.date.get().isBefore(this.now.get(), 'minute') &&
|
||||
this.now.get().isBefore(this.data().dueAt)) {
|
||||
classes += 'current';
|
||||
let classes = 'received-date ';
|
||||
const dueAt = this.data().dueAt;
|
||||
if (dueAt) {
|
||||
if (this.date.get().isBefore(this.now.get(), 'minute') &&
|
||||
this.now.get().isBefore(dueAt)) {
|
||||
classes += 'current';
|
||||
}
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
|
|
@ -249,9 +252,12 @@ class CardStartDate extends CardDate {
|
|||
|
||||
classes() {
|
||||
let classes = 'start-date' + ' ';
|
||||
if (this.date.get().isBefore(this.now.get(), 'minute') &&
|
||||
this.now.get().isBefore(this.data().dueAt)) {
|
||||
classes += 'current';
|
||||
const dueAt = this.data().dueAt;
|
||||
if (dueAt) {
|
||||
if (this.date.get().isBefore(this.now.get(), 'minute') &&
|
||||
this.now.get().isBefore(dueAt)) {
|
||||
classes += 'current';
|
||||
}
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
|
|
@ -279,18 +285,23 @@ class CardDueDate extends CardDate {
|
|||
|
||||
classes() {
|
||||
let classes = 'due-date' + ' ';
|
||||
|
||||
// if endAt exists & is < dueAt, dueAt doesn't need to be flagged
|
||||
if ((this.data().endAt !== 0) &&
|
||||
(this.data().endAt !== null) &&
|
||||
(this.data().endAt !== '') &&
|
||||
(this.data().endAt !== undefined) &&
|
||||
(this.date.get().isBefore(this.data().endAt)))
|
||||
const endAt = this.data().endAt;
|
||||
const theDate = this.date.get();
|
||||
const now = this.now.get();
|
||||
|
||||
if ((endAt !== 0) &&
|
||||
(endAt !== null) &&
|
||||
(endAt !== '') &&
|
||||
(endAt !== undefined) &&
|
||||
(theDate.isBefore(endAt)))
|
||||
classes += 'current';
|
||||
else if (this.now.get().diff(this.date.get(), 'days') >= 2)
|
||||
else if (now.diff(theDate, 'days') >= 2)
|
||||
classes += 'long-overdue';
|
||||
else if (this.now.get().diff(this.date.get(), 'minute') >= 0)
|
||||
else if (now.diff(theDate, 'minute') >= 0)
|
||||
classes += 'due';
|
||||
else if (this.now.get().diff(this.date.get(), 'days') >= -1)
|
||||
else if (now.diff(theDate, 'days') >= -1)
|
||||
classes += 'almost-due';
|
||||
return classes;
|
||||
}
|
||||
|
|
@ -318,12 +329,16 @@ class CardEndDate extends CardDate {
|
|||
|
||||
classes() {
|
||||
let classes = 'end-date' + ' ';
|
||||
if (this.data.dueAt.diff(this.date.get(), 'days') >= 2)
|
||||
classes += 'long-overdue';
|
||||
else if (this.data.dueAt.diff(this.date.get(), 'days') > 0)
|
||||
classes += 'due';
|
||||
else if (this.data.dueAt.diff(this.date.get(), 'days') <= 0)
|
||||
classes += 'current';
|
||||
const dueAt = this.data.dueAt;
|
||||
if (dueAt) {
|
||||
const diff = dueAt.diff(this.date.get(), 'days');
|
||||
if (diff >= 2)
|
||||
classes += 'long-overdue';
|
||||
else if (diff > 0)
|
||||
classes += 'due';
|
||||
else if (diff <= 0)
|
||||
classes += 'current';
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
margin-bottom: 9px
|
||||
margin-bottom: 2px
|
||||
|
||||
&.placeholder
|
||||
background: darken(white, 20%)
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
flex-wrap: wrap
|
||||
background-color: #fff
|
||||
min-height: 20px
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.15)
|
||||
box-shadow: 0 0px 16px rgba(0,0,0,0.15) inset
|
||||
border-radius: 2px
|
||||
color: #4d4d4d
|
||||
overflow: hidden
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue