1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 01:02:05 +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")
.Ignore(e => e.SeriesTitle)
.Ignore(e => e.HasFile)
.Relationship()
.HasOne(episode => episode.EpisodeFile, episode => episode.EpisodeFileId);

View file

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

View file

@ -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;
}
}

View file

@ -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';
}