Fixed colours on Calendar

pull/2/head
Mark McDowall 12 years ago
parent 98c5ee4bea
commit b420592553

@ -49,6 +49,7 @@ namespace NzbDrone.Core.Datastore
Mapper.Entity<Episode>().RegisterModel("Episodes")
.Ignore(e => e.SeriesTitle)
.Ignore(e => e.HasFile)
.Relationship()
.HasOne(episode => episode.EpisodeFile, episode => episode.EpisodeFileId);

@ -26,5 +26,9 @@ namespace NzbDrone.Core.Tv
public LazyLoaded<EpisodeFile> EpisodeFile { get; set; }
public Boolean HasFile
{
get { return EpisodeFileId > 0; }
}
}
}

@ -8,11 +8,6 @@
border-color : #eeeeee;
}
.primary {
border-color : #007ccd;
background-color : #007ccd;
}
.fc-event-skin {
background-color : #007ccd;
border : 1px solid #007ccd;
@ -24,6 +19,11 @@
.clickable;
}
.primary {
border-color : #007ccd;
background-color : #007ccd;
}
.info {
border-color : #14b8d4;
background-color : #14b8d4;
@ -69,37 +69,17 @@
border-top : 1px solid #eeeeee;
padding-top : 10px;
.primary {
border-color : #007ccd;
}
.info {
border-color : #14b8d4;
}
h4 {
font-weight : 500;
color : #008dcd;
margin : 5px 0px;
}
.inverse {
border-color : #333333;
}
.warning {
border-color : #ffa93c;
}
p {
color : #999999;
margin: 0px;
}
.danger {
border-color : #ea494a;
}
.date {
text-align : center;
display : inline-block;
@ -121,6 +101,32 @@
}
}
.episode-title {
.btn-link;
color: @linkColor;
margin-top: 1px;
}
.primary {
border-color : #007ccd;
}
.info {
border-color : #14b8d4;
}
.inverse {
border-color : #333333;
}
.warning {
border-color : #ffa93c;
}
.danger {
border-color : #ea494a;
}
.purple {
border-color : #7932ea;
}
@ -128,10 +134,4 @@
.success {
border-color : #4cb158;
}
.episode-title {
.btn-link;
color: @linkColor;
margin-top: 1px;
}
}

@ -29,7 +29,7 @@ define(
if (this.has('series')) {
var start = Date.create(this.get('airDate'));
var runtime = this.get('series').runtime;
var runtime = this.get('series').get('runtime');
return start.addMinutes(runtime);
}
@ -37,20 +37,23 @@ define(
return undefined;
},
statusLevel : function () {
var episodeFileId = this.get('episodeFileId');
var hasFile = this.get('hasFile');
var currentTime = Date.create();
var start = Date.create(this.get('airDate'));
var end = Date.create(this.get('end'));
console.log(this.get('end'));
if (currentTime.isBetween(start, end)) {
return 'warning';
}
if (start.isBefore(currentTime) && episodeFileId === 0) {
if (start.isBefore(currentTime) && !hasFile) {
return 'danger';
}
if (status === 'Ready') {
if (hasFile) {
return 'success';
}

Loading…
Cancel
Save