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

pull/24/head
Mark McDowall 11 years ago
parent 07ba92ba87
commit 8d2fc4945b

@ -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';
}
else if (start.isBefore(currentTime) && !hasFile) {
statusLevel = 'danger';
} }
if (start.isBefore(currentTime) && !hasFile) { else if (hasFile) {
return 'danger'; statusLevel = 'success';
} }
if (hasFile) { var test = currentTime.startOf('day').format('LLLL');
return 'success';
if (end.isBefore(currentTime.startOf('day'))) {
statusLevel += ' past'
} }
return 'primary'; return statusLevel;
} }
}); });
}); });

@ -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 {

@ -39,7 +39,7 @@ define(
tooltip = 'Episode has not aired'; tooltip = 'Episode has not aired';
} }
} }
this.$el.html('<i class="{0}" title="{1}"/>'.format(icon, tooltip)); this.$el.html('<i class="{0}" title="{1}"/>'.format(icon, tooltip));
} }

Loading…
Cancel
Save