2013-06-22 09:24:24 +03:00
|
|
|
'use strict';
|
2013-06-25 02:41:59 +03:00
|
|
|
define(
|
|
|
|
[
|
|
|
|
'marionette',
|
|
|
|
'Series/Details/SeasonLayout'
|
|
|
|
], function (Marionette, SeasonLayout) {
|
|
|
|
return Marionette.CollectionView.extend({
|
2013-06-01 22:31:39 +03:00
|
|
|
|
2013-06-25 02:41:59 +03:00
|
|
|
itemView: SeasonLayout,
|
2013-06-01 22:31:39 +03:00
|
|
|
|
2013-06-25 02:41:59 +03:00
|
|
|
initialize: function (options) {
|
2013-06-01 22:31:39 +03:00
|
|
|
|
2013-06-25 02:41:59 +03:00
|
|
|
if (!options.episodeCollection) {
|
|
|
|
throw 'episodeCollection is needed';
|
|
|
|
}
|
2013-06-01 22:31:39 +03:00
|
|
|
|
2013-06-25 02:41:59 +03:00
|
|
|
this.episodeCollection = options.episodeCollection;
|
2013-06-29 03:35:21 +03:00
|
|
|
this.series = options.series;
|
2013-06-25 02:41:59 +03:00
|
|
|
},
|
2013-06-01 22:31:39 +03:00
|
|
|
|
2013-06-25 02:41:59 +03:00
|
|
|
itemViewOptions: function () {
|
|
|
|
return {
|
2013-06-29 03:35:21 +03:00
|
|
|
episodeCollection: this.episodeCollection,
|
|
|
|
series : this.series
|
2013-06-25 02:41:59 +03:00
|
|
|
};
|
|
|
|
}
|
2013-06-01 22:31:39 +03:00
|
|
|
|
2013-06-25 02:41:59 +03:00
|
|
|
});
|
2013-06-01 22:31:39 +03:00
|
|
|
});
|