mirror of
https://github.com/Radarr/Radarr
synced 2024-12-29 11:25:26 +00:00
f63869bcfa
Oh, so pretty, I feel pretty and witty and gay! And I pity Any girl who isn't me today.
46 lines
1.6 KiB
JavaScript
46 lines
1.6 KiB
JavaScript
"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'
|
|
},
|
|
|
|
ui: {
|
|
header: '.x-header'
|
|
},
|
|
|
|
initialize: function () {
|
|
$('body').addClass('backdrop');
|
|
},
|
|
|
|
onShow: function () {
|
|
var self = this;
|
|
|
|
$.backstretch(this.model.get('fanArt'));
|
|
|
|
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();
|
|
$('body').removeClass('backdrop');
|
|
}
|
|
});
|
|
}
|
|
);
|