2013-08-01 06:32:36 +00:00
|
|
|
'use strict';
|
|
|
|
define(
|
|
|
|
[
|
|
|
|
'marionette',
|
|
|
|
'Series/Details/SeasonMenu/ItemView'
|
|
|
|
], function (Marionette, ItemView) {
|
|
|
|
return Marionette.CollectionView.extend({
|
|
|
|
|
|
|
|
itemView: ItemView,
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
|
|
|
|
if (!options.episodeCollection) {
|
|
|
|
throw 'episodeCollection is needed';
|
|
|
|
}
|
|
|
|
|
|
|
|
this.episodeCollection = options.episodeCollection;
|
|
|
|
},
|
|
|
|
|
|
|
|
itemViewOptions: function () {
|
|
|
|
return {
|
2013-08-04 01:27:12 +00:00
|
|
|
episodeCollection: this.episodeCollection
|
2013-08-01 06:32:36 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2013-08-04 01:27:12 +00:00
|
|
|
appendHtml: function(collectionView, itemView){
|
2013-08-01 06:32:36 +00:00
|
|
|
var childrenContainer = $(collectionView.childrenContainer || collectionView.el);
|
|
|
|
childrenContainer.prepend(itemView.el);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|