mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-26 23:06:43 -04:00
Calendar/Date localization
New: Choose calendar starting day of week New: Choose prefered date/time formats New: Option to disable relative dates and show absolute dates instead
This commit is contained in:
@@ -26,7 +26,7 @@ define(
|
||||
EpisodeNumberCell,
|
||||
EpisodeWarningCell,
|
||||
CommandController,
|
||||
Moment,
|
||||
moment,
|
||||
_,
|
||||
Messenger) {
|
||||
return Marionette.Layout.extend({
|
||||
@@ -213,15 +213,15 @@ define(
|
||||
},
|
||||
|
||||
_shouldShowEpisodes: function () {
|
||||
var startDate = Moment().add('month', -1);
|
||||
var endDate = Moment().add('year', 1);
|
||||
var startDate = moment().add('month', -1);
|
||||
var endDate = moment().add('year', 1);
|
||||
|
||||
return this.episodeCollection.some(function (episode) {
|
||||
|
||||
var airDate = episode.get('airDateUtc');
|
||||
|
||||
if (airDate) {
|
||||
var airDateMoment = Moment(airDate);
|
||||
var airDateMoment = moment(airDate);
|
||||
|
||||
if (airDateMoment.isAfter(startDate) && airDateMoment.isBefore(endDate)) {
|
||||
return true;
|
||||
@@ -235,7 +235,7 @@ define(
|
||||
templateHelpers: function () {
|
||||
|
||||
var episodeCount = this.episodeCollection.filter(function (episode) {
|
||||
return episode.get('hasFile') || (episode.get('monitored') && Moment(episode.get('airDateUtc')).isBefore(Moment()));
|
||||
return episode.get('hasFile') || (episode.get('monitored') && moment(episode.get('airDateUtc')).isBefore(moment()));
|
||||
}).length;
|
||||
|
||||
var episodeFileCount = this.episodeCollection.where({ hasFile: true }).length;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="col-md-10 col-xs-8">
|
||||
{{#if_eq status compare="continuing"}}
|
||||
{{#if nextAiring}}
|
||||
<span class="label label-default">{{NextAiring nextAiring}}</span>
|
||||
<span class="label label-default">{{RelativeDate nextAiring}}</span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<span class="label label-danger">Ended</span>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="labels">
|
||||
{{#if_eq status compare="continuing"}}
|
||||
{{#if nextAiring}}
|
||||
<span class="label label-default">{{NextAiring nextAiring}}</span>
|
||||
<span class="label label-default">{{RelativeDate nextAiring}}</span>
|
||||
{{/if}}
|
||||
{{/if_eq}}
|
||||
{{> EpisodeProgressPartial }}
|
||||
|
||||
@@ -65,9 +65,9 @@ define(
|
||||
cell : 'integer'
|
||||
},
|
||||
{
|
||||
name : 'profileId',
|
||||
label: 'Profile',
|
||||
cell : ProfileCell
|
||||
name : 'profileId',
|
||||
label : 'Profile',
|
||||
cell : ProfileCell
|
||||
},
|
||||
{
|
||||
name : 'network',
|
||||
|
||||
@@ -10,7 +10,7 @@ define(
|
||||
'Mixins/AsSortedCollection',
|
||||
'Mixins/AsPersistedStateCollection',
|
||||
'moment'
|
||||
], function (_, Backbone, PageableCollection, SeriesModel, SeriesData, AsFilteredCollection, AsSortedCollection, AsPersistedStateCollection, Moment) {
|
||||
], function (_, Backbone, PageableCollection, SeriesModel, SeriesData, AsFilteredCollection, AsSortedCollection, AsPersistedStateCollection, moment) {
|
||||
var Collection = PageableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/series',
|
||||
model: SeriesModel,
|
||||
@@ -63,13 +63,13 @@ define(
|
||||
var nextAiring = model.get(attr);
|
||||
|
||||
if (nextAiring) {
|
||||
return Moment(nextAiring).unix();
|
||||
return moment(nextAiring).unix();
|
||||
}
|
||||
|
||||
var previousAiring = model.get(attr.replace('nextAiring', 'previousAiring'));
|
||||
|
||||
if (previousAiring) {
|
||||
return 10000000000 - Moment(previousAiring).unix();
|
||||
return 10000000000 - moment(previousAiring).unix();
|
||||
}
|
||||
|
||||
return Number.MAX_VALUE;
|
||||
|
||||
Reference in New Issue
Block a user