1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Calendar past events are grayed out, today's background is gray

This commit is contained in:
Mark McDowall 2013-07-17 22:52:13 -07:00
parent 07ba92ba87
commit 8d2fc4945b
3 changed files with 23 additions and 7 deletions

View File

@ -85,19 +85,27 @@ define(
var start = Moment(element.get('airDate')); var start = Moment(element.get('airDate'));
var end = Moment(element.get('end')); var end = Moment(element.get('end'));
var statusLevel = 'primary';
if (currentTime.isAfter(start) && currentTime.isBefore(end)) { if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
return 'warning'; statusLevel = 'warning';
} }
if (start.isBefore(currentTime) && !hasFile) { else if (start.isBefore(currentTime) && !hasFile) {
return 'danger'; statusLevel = 'danger';
} }
if (hasFile) { else if (hasFile) {
return 'success'; statusLevel = 'success';
} }
return 'primary'; var test = currentTime.startOf('day').format('LLLL');
if (end.isBefore(currentTime.startOf('day'))) {
statusLevel += ' past'
}
return statusLevel;
} }
}); });
}); });

View File

@ -26,6 +26,14 @@
h2 { h2 {
font-size : 17.5px; font-size : 17.5px;
} }
.fc-state-highlight {
background: #f1f1f1;
}
.past {
opacity: 0.8;
}
} }
.event { .event {