summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-01-06 15:34:31 +0200
committerLauri Ojansivu <x@xet7.org>2018-01-06 15:34:31 +0200
commitccb14beb83b824e2ff814886648e662d5f7781a0 (patch)
tree9eaf14e387d001a586c8a9654dd820d33c4816f7
parent22158b4941104ceb25f6467b68c36b12ebd3a4c7 (diff)
parent17bb4641078e5a5f05a63c3dc507a65427a0893b (diff)
downloadwekan-ccb14beb83b824e2ff814886648e662d5f7781a0.tar.gz
wekan-ccb14beb83b824e2ff814886648e662d5f7781a0.tar.bz2
wekan-ccb14beb83b824e2ff814886648e662d5f7781a0.zip
Merge branch 'mmarschall-different-icons-for-start-and-due-date' into devel
Different icons for start and due date. Thanks to mmarschall ! Closes #1414
-rw-r--r--CHANGELOG.md8
-rw-r--r--client/components/cards/cardDate.js14
-rw-r--r--client/components/cards/cardDate.styl14
3 files changed, 28 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec5d9a7c..b077bdc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+# Upcoming Wekan release
+
+This release adds the following new features:
+
+* [Different icons for start and due date](https://github.com/wekan/wekan/pull/1420).
+
+Thanks to GitHub user mmarschall for contributions.
+
# v0.63 2017-12-20 Wekan release
This release adds the following new features:
diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js
index 3f69f384..abf6a42b 100644
--- a/client/components/cards/cardDate.js
+++ b/client/components/cards/cardDate.js
@@ -171,11 +171,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)) {
- return 'current';
+ classes += 'current';
}
- return '';
+ return classes;
}
showTitle() {
@@ -200,13 +201,14 @@ class CardDueDate extends CardDate {
}
classes() {
+ let classes = 'due-date' + ' ';
if (this.now.get().diff(this.date.get(), 'days') >= 2)
- return 'long-overdue';
+ classes += 'long-overdue';
else if (this.now.get().diff(this.date.get(), 'minute') >= 0)
- return 'due';
+ classes += 'due';
else if (this.now.get().diff(this.date.get(), 'days') >= -1)
- return 'almost-due';
- return '';
+ classes += 'almost-due';
+ return classes;
}
showTitle() {
diff --git a/client/components/cards/cardDate.styl b/client/components/cards/cardDate.styl
index 1631baa5..e0c3fc9e 100644
--- a/client/components/cards/cardDate.styl
+++ b/client/components/cards/cardDate.styl
@@ -49,10 +49,20 @@
&:hover, &.is-active
background-color: darken(#fd5d47, 7)
+ &.due-date
+ time
+ &::before
+ content: "\f090" // symbol: fa-sign-in
+
+ &.start-date
+ time
+ &::before
+ content: "\f08b" // symbol: fa-sign-out
+
time
&::before
font: normal normal normal 14px/1 FontAwesome
font-size: inherit
-webkit-font-smoothing: antialiased
- content: "\f017" // clock symbol
- margin-right: 0.3em \ No newline at end of file
+ margin-right: 0.3em
+