mirror of https://github.com/Sonarr/Sonarr
Fixed DateCells
This commit is contained in:
parent
40f49d7385
commit
fe48fd9fe9
|
@ -14,10 +14,9 @@ define(
|
||||||
var date = this.model.get(this.column.get('name'));
|
var date = this.model.get(this.column.get('name'));
|
||||||
|
|
||||||
if (date) {
|
if (date) {
|
||||||
this.$el.html(FormatHelpers.DateHelper(date));
|
this.$el.html('<div>' + FormatHelpers.DateHelper(date) + '</div>');
|
||||||
|
|
||||||
//TODO: Figure out why this makes the series grid freak out
|
this.$el.children('div').attr('title', Moment(date).format('LLLL'));
|
||||||
//this.$el.attr('title', Moment(date).format('LLLL'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -24,8 +24,12 @@ define(
|
||||||
return date.fromNow(true);
|
return date.fromNow(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: It would be nice to not have to hack this...
|
if (date.isBefore(Moment().add('days', -6))) {
|
||||||
|
return date.fromNow();
|
||||||
|
}
|
||||||
|
|
||||||
var calendarDate = date.calendar();
|
var calendarDate = date.calendar();
|
||||||
|
//TODO: It would be nice to not have to hack this...
|
||||||
return calendarDate.substring(0, calendarDate.indexOf(' at '));
|
return calendarDate.substring(0, calendarDate.indexOf(' at '));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue