Fixed stuff :)

NzbDrone.Console works again
Added empty collection message for Series
This commit is contained in:
Mark McDowall
2013-02-17 16:46:13 -08:00
parent b0940ed8de
commit e2314a7b17
9 changed files with 16 additions and 12 deletions
@@ -6,9 +6,12 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
itemViewContainer: 'tbody',
template: 'Series/SeriesCollectionTemplate',
qualityProfileCollection: qualityProfileCollection,
emptyView: NzbDrone.Series.EmptySeriesCollectionView,
initialize: function () {
this.collection = new NzbDrone.Series.SeriesCollection();
//Todo: This caused the onRendered event to be trigger twice, which displays two empty collection messages
//http://stackoverflow.com/questions/13065176/backbone-marionette-composit-view-onrender-executing-twice
this.collection.fetch();
this.qualityProfileCollection.fetch();
@@ -19,7 +22,6 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
table : '.x-series-table'
},
onItemRemoved: function()
{
this.ui.table.trigger('update');
@@ -84,5 +86,9 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
}
}
});
});
NzbDrone.Series.EmptySeriesCollectionView = Backbone.Marionette.CompositeView.extend({
template: 'Series/EmptySeriesCollectionTemplate',
tagName: 'tr'
});