1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 09:12:17 +00:00

Fixed colours on Calendar

This commit is contained in:
Mark McDowall 2013-07-07 23:39:19 -07:00
parent 98c5ee4bea
commit b420592553
4 changed files with 43 additions and 35 deletions

View file

@ -49,6 +49,7 @@ public static void Map()
Mapper.Entity<Episode>().RegisterModel("Episodes") Mapper.Entity<Episode>().RegisterModel("Episodes")
.Ignore(e => e.SeriesTitle) .Ignore(e => e.SeriesTitle)
.Ignore(e => e.HasFile)
.Relationship() .Relationship()
.HasOne(episode => episode.EpisodeFile, episode => episode.EpisodeFileId); .HasOne(episode => episode.EpisodeFile, episode => episode.EpisodeFileId);

View file

@ -26,5 +26,9 @@ public class Episode : ModelBase
public LazyLoaded<EpisodeFile> EpisodeFile { get; set; } public LazyLoaded<EpisodeFile> EpisodeFile { get; set; }
public Boolean HasFile
{
get { return EpisodeFileId > 0; }
}
} }
} }

View file

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

View file

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