You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
37 lines
1.3 KiB
12 years ago
|
"use strict";
|
||
|
define(['app', 'Series/Details/SeasonCollectionView','Shared/LoadingView'], function () {
|
||
|
NzbDrone.Series.Details.SeriesDetailsLayout = Backbone.Marionette.Layout.extend({
|
||
|
|
||
|
itemViewContainer: '.x-series-seasons',
|
||
|
template : 'Series/Details/SeriesDetailsTemplate',
|
||
|
|
||
|
regions: {
|
||
|
seasons: '#seasons'
|
||
|
},
|
||
|
|
||
|
onShow: function () {
|
||
|
|
||
|
var self = this;
|
||
|
|
||
|
this.seasons.show(new NzbDrone.Shared.LoadingView());
|
||
|
|
||
|
this.seasonCollection = new NzbDrone.Series.SeasonCollection();
|
||
|
this.episodeCollection = new NzbDrone.Series.EpisodeCollection();
|
||
|
|
||
|
$.when(this.episodeCollection.fetch({data: { seriesId: this.model.id }}), this.seasonCollection.fetch({data: { seriesId: this.model.id }}))
|
||
|
.done(function () {
|
||
|
self.seasons.show(new NzbDrone.Series.Details.SeasonCollectionView({
|
||
|
collection : self.seasonCollection,
|
||
|
episodeCollection: self.episodeCollection
|
||
|
}));
|
||
|
}
|
||
|
);
|
||
|
},
|
||
|
|
||
|
onClose: function () {
|
||
|
$('.backstretch').remove();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
);
|