mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added season pass for toggling monitored status of seasons
Linked from missing
This commit is contained in:
parent
694714726c
commit
6ca17942f0
12 changed files with 316 additions and 22 deletions
39
UI/SeasonPass/Layout.js
Normal file
39
UI/SeasonPass/Layout.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'Series/SeriesCollection',
|
||||
'Series/SeasonCollection',
|
||||
'SeasonPass/SeriesCollectionView',
|
||||
'Shared/LoadingView'
|
||||
], function (Marionette,
|
||||
SeriesCollection,
|
||||
SeasonCollection,
|
||||
SeriesCollectionView,
|
||||
LoadingView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'SeasonPass/LayoutTemplate',
|
||||
|
||||
regions: {
|
||||
series: '#x-series'
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
var self = this;
|
||||
|
||||
this.series.show(new LoadingView());
|
||||
|
||||
this.seriesCollection = SeriesCollection;
|
||||
this.seasonCollection = new SeasonCollection();
|
||||
|
||||
var promise = this.seasonCollection.fetch();
|
||||
|
||||
promise.done(function () {
|
||||
self.series.show(new SeriesCollectionView({
|
||||
collection: self.seriesCollection,
|
||||
seasonCollection: self.seasonCollection
|
||||
}));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue