Helper cleanup

This commit is contained in:
Mark McDowall 2013-06-06 19:39:12 -07:00
commit 626d48c8ea
16 changed files with 89 additions and 83 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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