added quality profile label

This commit is contained in:
kay.one 2013-06-08 15:23:17 -07:00
commit c4badd72bd
12 changed files with 22 additions and 40 deletions

View file

@ -1,17 +1,10 @@
'use strict';
define(['app', 'Quality/QualityProfileCollection', 'Series/Index/List/ItemView', 'Config'], function (app, qualityProfileCollection) {
define(['app', 'Series/Index/List/ItemView', 'Config'], function () {
NzbDrone.Series.Index.List.CollectionView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Series.Index.List.ItemView,
itemViewContainer : '#x-series-list',
template : 'Series/Index/List/CollectionTemplate',
qualityProfileCollection: qualityProfileCollection,
initialize: function () {
this.qualityProfileCollection.fetch();
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
}
template : 'Series/Index/List/CollectionTemplate'
});
});
});

View file

@ -32,14 +32,14 @@
{{#if isContinuing}}
{{#if nextAiring}}
<span class="label">{{date nextAiring}}</span>
{{else}}
<span class="label label-inverse">Continuing</span>
{{/if}}
<span class="label label-info">Season {{seasonCount}}</span>
{{else}}
<span class="label label-important">Ended</span>
<span class="label label-info">{{seasonCount}} Seasons</span>
{{/if}}
{{> QualityProfilePartial qualityProfile}}
</div>
<div class="span2">
<div class="progress">

View file

@ -18,11 +18,7 @@ define([
events: {
'click .x-edit' : 'editSeries',
'click .x-remove': 'removeSeries',
},
initialize: function (options) {
this.qualityProfileCollection = options.qualityProfiles;
'click .x-remove': 'removeSeries'
},
editSeries: function () {

View file

@ -1,17 +1,10 @@
'use strict';
define(['app', 'Quality/QualityProfileCollection', 'Series/Index/Posters/ItemView', 'Config'], function (app, qualityProfileCollection) {
define(['app', 'Series/Index/Posters/ItemView', 'Config'], function () {
NzbDrone.Series.Index.Posters.CollectionView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Series.Index.Posters.ItemView,
itemViewContainer : '#x-series-posters',
template : 'Series/Index/Posters/CollectionTemplate',
qualityProfileCollection: qualityProfileCollection,
initialize: function () {
this.qualityProfileCollection.fetch();
this.itemViewOptions = { qualityProfiles: this.qualityProfileCollection };
}
template : 'Series/Index/Posters/CollectionTemplate'
});
});
});

View file

@ -23,8 +23,6 @@
{{#if isContinuing}}
{{#if nextAiring}}
<span class="label label-inverse">{{date nextAiring}}</span>
{{else}}
<span class="label label-inverse">Continuing</span>
{{/if}}
<span class="label label-info">Season {{seasonCount}}</span>
{{else}}

View file

@ -2,7 +2,6 @@
define([
'app',
'Quality/QualityProfileCollection',
'Series/SeriesCollection',
'Series/Edit/EditSeriesView',
'Series/Delete/DeleteSeriesView'
@ -26,9 +25,6 @@ define([
'mouseleave .x-series-poster': 'posterHoverAction'
},
initialize: function (options) {
this.qualityProfileCollection = options.qualityProfiles;
},
editSeries: function () {
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});