mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Helper cleanup
This commit is contained in:
parent
1fb944976e
commit
626d48c8ea
16 changed files with 89 additions and 83 deletions
|
@ -3,9 +3,6 @@ define(['app'], function () {
|
|||
NzbDrone.Series.EpisodeModel = Backbone.Model.extend({
|
||||
|
||||
mutators: {
|
||||
bestDateString : function () {
|
||||
return bestDateString(this.get('airDate'));
|
||||
},
|
||||
paddedEpisodeNumber: function () {
|
||||
return this.get('episodeNumber').pad(2);
|
||||
},
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
<div class="row">
|
||||
<div class="span8">
|
||||
{{#if isContinuing}}
|
||||
{{#if bestDateString}}
|
||||
<span class="label">{{bestDateString}}</span>
|
||||
{{#if nextAiring}}
|
||||
<span class="label">{{date nextAiring}}</span>
|
||||
{{else}}
|
||||
<span class="label label-inverse">Continuing</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<div class="center">
|
||||
<div class="labels">
|
||||
{{#if isContinuing}}
|
||||
{{#if bestDateString}}
|
||||
<span class="label label-inverse air-date" title="{{shortDate}}">{{bestDateString}}</span>
|
||||
{{#if nextAiring}}
|
||||
<span class="label label-inverse">{{date nextAiring}}</span>
|
||||
{{else}}
|
||||
<span class="label label-inverse">Continuing</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -16,7 +16,6 @@ define([
|
|||
|
||||
ui: {
|
||||
'progressbar': '.progress .bar',
|
||||
'airDate': '.air-date',
|
||||
'controls': '.series-controls'
|
||||
},
|
||||
|
||||
|
@ -31,10 +30,6 @@ define([
|
|||
this.qualityProfileCollection = options.qualityProfiles;
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.ui.airDate.tooltip();
|
||||
},
|
||||
|
||||
editSeries: function () {
|
||||
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
|
|
|
@ -6,7 +6,7 @@ Backgrid.AirDateCell = Backgrid.Cell.extend({
|
|||
this.$el.empty();
|
||||
var airDate = this.model.get(this.column.get("name"));
|
||||
|
||||
this.$el.html(bestDateString(airDate));
|
||||
this.$el.html(NzbDrone.Shared.FormatHelpers.DateHelper(airDate));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,6 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo
|
|||
urlRoot: NzbDrone.Constants.ApiRoot + '/series',
|
||||
|
||||
mutators: {
|
||||
bestDateString: function () {
|
||||
return bestDateString(this.get('nextAiring'));
|
||||
},
|
||||
|
||||
percentOfEpisodes: function () {
|
||||
var episodeCount = this.get('episodeCount');
|
||||
var episodeFileCount = this.get('episodeFileCount');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue