Added season pass for toggling monitored status of seasons

Linked from missing
This commit is contained in:
Mark McDowall 2013-08-05 02:09:41 -07:00
commit 6ca17942f0
12 changed files with 316 additions and 22 deletions

39
UI/SeasonPass/Layout.js Normal file
View 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
}));
});
}
});
});